Jan 02

Good Morning Admin,

so you updated your proxmox installation and rebooted… waited patiently… and it didn’t come back? uh oh?
Hopefully you have some kind of console to see those nice errors..

Loading initial ramdisk ...
oading, please wait...
[ 2.394422] megaraid_sas 0000:02:00.0: INIT adapter done
modprobe: module unknown not found in modules.dep
mount: mounting ZFS=rpool/ROOT/pve-1 on /root failed: No such file or directory
Target filesystem doesn't have requested /sbin/init.
mount: mounting /dev on /root/dev failed: No such file or directory
No init found. Try passing init= bootarg.
modprobe: module ehci-orion not found in modules.dep


BusyBox v1.22.1 (Debian 1:1.22.0-9+deb8u1) built-in shell (ash)
Enter 'help' for a list of built-in commands.

/bin/sh: can't access tty; job control turned off

After lots of fuzzing around, booting one old kernel etc. 
it comes all down to broken -pve5 GRUB packages.

Solution (inside initramfs)

modprobe zfs
zpool import -R /rpool -N rpool
zpool mount -a
mount -t proc proc /rpool/proc
mount -t sysfs sys /rpool/sys/
mount -o bind /dev /rpool/dev/
mount devpts /dev/pts -t devpts
chroot /rpool
/etc/init.d/networking start
/etc/init.d/ssh start
#now you can finally get rid of this console (which seems to timeout every freakin 10seconds on those fujitsu boxes) and login via SSH.

now my tool of choice is aptitude, was searching for the package “grub-pc” using the “/” command. Then chose the previous -pve4 version of it and hit “!” a couple times till it said its was going to downgrade 5 packages. You can also hit “e” to examine which packages exactly. After hitting “g” for GO, it actually downgrades everything. I took the package maintainers version of grub config. After a sync & reboot, it booted the new kernel.

You might wanna block further upgrades of grub using “aptitude hold grub-pc”. Note this works only if aptitude is your tool of choice. Using apt-get will not consider those “holds”.

Hopefully this helps some of you.

Sep 22
dovecot: master: Warning: service(imap-login): process_limit (256) reached, client connections are being dropped

So you found this error message in your server logs and noticed you cannot login anymore via IMAP because all available ‘slots’ have been consumed. My working theory is, it is related to the IOS7 release and it’s IPv6 support.  With privacy extensions enabled ( See RFC 4941 ) it looks like the IOS device is grabbing a new IPv6 address every time it wakes up. This is a perfect fine behaviour if it weren’t for IMAP IDLE. From my understanding, IMAP idle is sort of a long lasting SSL tunnel with a very long TTL. This way your client doesn’t need to be online all the time and only wakes up, if there anything new on the server ( RFC 2177 ).

Workaround: Break IMAP IDLE. Not really, but at least reduce the TTL for the Tunnel by somewhat. Don’t be to harsh, otherwise your’e mobile device is gonna wake up too often, therefore consuming too much power. I set it to 30minutes.

protocol imap {
 #process_limit = 512
 # process_min_avail = 5
 imap_idle_notify_interval = 30 mins
 mail_max_userip_connections = 10
}
#You can check your configuration by using "doveconf -N" before reloading/restarting.

If it works, dovecot will drop the connections to not responsive ‘expired’ IPv6 IPs, freeing resources.

Sep 22 11:04:36 mx dovecot: imap(email@server): Disconnected: Disconnected in IDLE bytes=273/1229
Sep 22 11:04:37 mx dovecot: imap(email@server): Disconnected: Disconnected in IDLE bytes=237/1161
Sep 22 11:04:37 mx dovecot: imap(email@server): Disconnected: Disconnected in IDLE bytes=189/1073
Sep 22 11:04:37 mx dovecot: imap(email@server): Disconnected: Disconnected in IDLE bytes=222/1132
Sep 22 11:04:37 mx dovecot: imap(email@server): Disconnected: Disconnected in IDLE bytes=294/1268
Sep 22 11:04:37 mx dovecot: imap(email@server): Disconnected: Disconnected in IDLE bytes=273/1229
Sep 22 11:04:37 mx dovecot: imap(email@server): Disconnected: Disconnected in IDLE bytes=222/1211
Sep 22 11:04:40 mx dovecot: imap(email@server): Disconnected: Disconnected in IDLE bytes=246/1180
Sep 22 11:04:40 mx dovecot: imap(email@server): Disconnected: Disconnected in IDLE bytes=288/1258
Sep 22 11:04:40 mx dovecot: imap(email@server): Disconnected: Disconnected in IDLE bytes=252/1190
Sep 22 11:04:40 mx dovecot: imap(email@server): Disconnected: Disconnected in IDLE bytes=273/1229
Sep 22 11:04:40 mx dovecot: imap(email@server): Disconnected: Disconnected in IDLE bytes=267/1219
Sep 22 11:04:40 mx dovecot: imap(email@server): Disconnected: Disconnected in IDLE bytes=288/1258
Sep 22 11:04:40 mx dovecot: imap(email@server): Disconnected: Disconnected in IDLE bytes=252/1190
Sep 22 11:04:40 mx dovecot: imap(email@server): Disconnected: Disconnected in IDLE bytes=165/1104
Sep 22 11:04:40 mx dovecot: imap(email@server): Disconnected: Disconnected in IDLE bytes=210/1112
Sep 22 11:04:40 mx dovecot: imap(email@server): Disconnected: Disconnected in IDLE bytes=216/1201
Sep 22 11:04:40 mx dovecot: imap(email@server): Disconnected: Disconnected in IDLE bytes=237/1161
Sep 22 11:04:40 mx dovecot: imap(email@server): Disconnected: Disconnected in IDLE bytes=189/1073
Sep 22 11:04:40 mx dovecot: imap(email@server): Disconnected: Disconnected in IDLE bytes=237/1161
Sep 22 11:04:40 mx dovecot: imap(email@server): Disconnected: Disconnected in IDLE bytes=273/1229
Sep 22 11:04:41 mx dovecot: imap(email@server): Disconnected: Disconnected in IDLE bytes=216/1122
Sep 22 11:04:41 mx dovecot: imap(email@server): Disconnected: Disconnected in IDLE bytes=258/1200
Sep 22 11:04:41 mx dovecot: imap(email@server): Disconnected: Disconnected in IDLE bytes=201/1172
Sep 22 11:04:41 mx dovecot: imap(email@server): Disconnected: Disconnected in IDLE bytes=252/1190
Sep 22 11:04:41 mx dovecot: imap(email@server): Disconnected: Disconnected in IDLE bytes=231/1151
Sep 22 11:04:41 mx dovecot: imap(email@server): Disconnected: Disconnected in IDLE bytes=231/1151
Sep 22 11:04:41 mx dovecot: imap(email@server): Disconnected: Disconnected in IDLE bytes=252/1190
Sep 22 11:04:41 mx dovecot: imap(email@server): Disconnected: Disconnected in IDLE bytes=189/1073
Tagged with:
Feb 23

Another fancy error message that took me some time to figure out. I haven’t even found the entire reason yet, but found a workaround.
The error is thrown by accessing the repository catalog in the Contao Backend.

Ok, since i use a Gentoo Installation, that is always up2date, but sometimes runs into some dependency problems i wasn’t sure if the SOAP part of PHP has some generic error. First try was to search for the WSDL path in the files.

I found it only once, contaoroot/system/config/config.php :
$GLOBALS[‘TL_CONFIG’][‘repository_wsdl’]      = ‘http://www.contao.org/services/repository.wsdl’;
I downloaded the file, placed it locally and changed the value. Worked, so the SOAP part of PHP is working.

After some more fiddling around, checking with tcpdump, it doesn’t even try to connect to the outside world, so i’m assuming i have some other network/naming related issues since this stuff runs on a VM with a RFC1918 private IP but with access to the internet.

Anyway, the better workaround was to use my proxy by adding the following to the config:
$GLOBALS[‘TL_CONFIG’][‘useProxy’] = true;
$GLOBALS[‘TL_CONFIG’][‘proxy_url’] = ‘http://172.20.20.11:3128’;

Original Error Message:
[22-Feb-2012 21:35:50 UTC] PHP Fatal error: Uncaught exception ‘SoapFault’ with message ‘SOAP-ERROR: Parsing WSDL: Couldn’t load from ‘http://www.contao.org/services/repository.wsdl’ : Start tag expected, ‘<‘ not found
‘ thrown in /var/www/xxxxx.de/system/modules/rep_client/RepositoryBackendModule.php on line 139

 

 

Mar 13

Ping Logo
I am using a Squid Proxy in my home network to filter outbound access. The WLAN configuration in my iPhone is using this proxy too, but since there is no ‘exclude from proxy’ option there, everything on any ports gets thrown at this Squid Proxy. The Ping Tool is also using a specific port to receive it’s messages. I also sent a mail to the developer, telling him to consider a more friendly port (80,443) for his app so people could use this app also behind firewalls, proxies which you have … at least in a corporate environments.

No answer so far. So here is the solution, at least to get it to work if you have access to your Squid Proxy.


acl http proto http
acl iphone_push dstdomain push.emailmii.net
acl iphone_push_port port 1919
always_direct allow iphone_push
http_access allow CONNECT iphone_push_port iphone_push
http_access allow http iphone_push_port iphone_push

make sure its BEFORE those entries:

http_access deny !Safe_ports
http_access deny CONNECT !SSL_ports
http_access deny all

 

Update: This is obsolete by now. I think they realized to use standard ports.

Tagged with:
Mar 23
  • Update 27 December 09 – minor changes due to new blog system
  • Update 01 May 09 Referring to the “ffmpegthumbnailer” .. it is not a script. It is a real tool which can be found in gentoo portage or here 🙂
  • Update 09 December 08 As there still people coming to this page, i posted my recent WORKING settings to allow for mkv playback as well as the missing bash script.
  • Update 15 Oktober 08 mediatomb.cc got a nice wiki which has alot more details howto setup different kinds of transcodings. Please check them out.
  • Update 28 July 08 Sony Firmware 2.35 finally fixed that problem.

It took a while, but the software (mediatomb) as well as the client (ps3) are finally able to talk to each other. It works almost out of the box with the recent 0.11.0 release for xvid and divx playback on the PS3.

Mediatomb has now the ability to transcode in realtime, allowing you to play other files like matroska .mkv files as well. Mediatomb can forward the file to play to external applications based on mimetype.

A fine howto to get this stuff going under Gentoo can be found That includes a few external scripts for this transcoding stuff. I am using the ffmpeg version (video) for matroska files.

my config.xml looks like this:>

<?xml version=”1.0″ encoding=”UTF-8″?>

<config version=”1″ xmlns=”http://mediatomb.cc/config/1″ xmlns:xsi=”http://www.w3.org/2001/XMLSchema-instance” xsi:schemaLocation=”http://mediatomb.cc/config/1 http://mediatomb.cc/config/1.xsd”>
<server>
<ui enabled=”yes”>
<accounts enabled=”no” session-timeout=”30″>
<account user=”mediatomb” password=”mediatomb”/>
</accounts>
</ui>
<name>MediaTomb</name>
<udn>uuid:eef9e7bf-b63f-4248-8add-a33086ac49d8</udn>
<home>/etc/mediatomb</home>
<webroot>/usr/local/share/mediatomb/web</webroot>
<storage>
<sqlite3 enabled=”no”>
<database-file>mediatomb.db</database-file>
</sqlite3>
<mysql enabled=”yes”>
<host>localhost</host>
<username>mediatomb</username>
<database>mediatomb</database>
<password>YOURPASSWORDHERE</password>
</mysql>
</storage>
<protocolInfo extend=”yes”/><!– For PS3 support change to “yes” –>
<!–
Uncomment the lines below to get rid of jerky avi playback on the
DSM320 or to enable subtitles support on the DSM units
–>
<!–
<custom-http-headers>
<add header=”X-User-Agent: redsonic”/>
</custom-http-headers>
<manufacturerURL>redsonic.com</manufacturerURL>
<modelNumber>105</modelNumber>
–>
<!– Uncomment the line below if you have a Telegent TG100 –>
<!–
<upnp-string-limit>101</upnp-string-limit>
–>
</server>
<import hidden-files=”no”>
<scripting script-charset=”UTF-8″>
<virtual-layout type=”builtin”/>
</scripting>
<mappings>
<extension-mimetype ignore-unknown=”no”>
<map from=”mp3″ to=”audio/mpeg”/>
<map from=”ogg” to=”application/ogg”/>
<map from=”asf” to=”video/x-ms-asf”/>
<map from=”asx” to=”video/x-ms-asf”/>
<map from=”wma” to=”audio/x-ms-wma”/>
<map from=”wax” to=”audio/x-ms-wax”/>
<map from=”wmv” to=”video/x-ms-wmv”/>
<map from=”wvx” to=”video/x-ms-wvx”/>
<map from=”wm” to=”video/x-ms-wm”/>
<map from=”wmx” to=”video/x-ms-wmx”/>
<map from=”m3u” to=”audio/x-mpegurl”/>
<map from=”pls” to=”audio/x-scpls”/>
<map from=”flv” to=”video/x-flv”/>
<!– Uncomment the line below for PS3 divx support –>
<map from=”avi” to=”video/x-divx”/>
<map from=”divx” to=”video/x-divx”/>
<map from=”mkv” to=”video/x-matroska”/>
<map from=”mov” to=”video/quicktime”/>
<map from=”qt” to=”video/quicktime”/>
<map from=”mpg” to=”video/mpeg”/>
<map from=”mpeg” to=”video/mpeg”/>
<!– Uncomment the line below for D-Link DSM / ZyXEL DMA-1000 –>
<!– <map from=”avi” to=”video/avi”/> –>
</extension-mimetype>
<mimetype-upnpclass>
<map from=”audio/*” to=”object.item.audioItem.musicTrack”/>
<map from=”video/*” to=”object.item.videoItem”/>
<map from=”image/*” to=”object.item.imageItem”/>
</mimetype-upnpclass>
<mimetype-contenttype>
<treat mimetype=”audio/mpeg” as=”mp3″/>
<treat mimetype=”application/ogg” as=”ogg”/>
<treat mimetype=”audio/x-flac” as=”flac”/>
<treat mimetype=”image/jpeg” as=”jpg”/>
<treat mimetype=”audio/x-mpegurl” as=”playlist”/>
<treat mimetype=”audio/x-scpls” as=”playlist”/>
<treat mimetype=”audio/x-wav” as=”pcm”/>
<treat mimetype=”audio/L16″ as=”pcm”/>
<treat mimetype=”video/x-msvideo” as=”avi”/>
<treat mimetype=”video/mp4″ as=”mp4″/>
<treat mimetype=”audio/mp4″ as=”mp4″/>
<treat mimetype=”video/x-divx” as=”avi”/>
</mimetype-contenttype>
</mappings>
</import>
<transcoding enabled=”yes”>
<mimetype-profile-mappings>
<transcode mimetype=”video/x-flv” using=”vlcmpeg”/>
<transcode mimetype=”application/ogg” using=”vlcmpeg”/>
<transcode mimetype=”application/ogg” using=”oggflac2raw”/>
<transcode mimetype=”audio/x-flac” using=”audio-common”/>
<transcode mimetype=”video/x-divx” using=”video-common”/>
<transcode mimetype=”video/x-matroska” using=”video-common”/>
<transcode mimetype=”video/quicktime” using=”video-common”/>
</mimetype-profile-mappings>
<profiles>
<profile name=”oggflac2raw” enabled=”yes” type=”external”>
<mimetype>audio/L16</mimetype>
<accept-url>no</accept-url>
<first-resource>yes</first-resource>
<accept-ogg-theora>no</accept-ogg-theora>
<agent command=”ogg123″ arguments=”-d raw -f %out %in”/>
<buffer size=”1048576″ chunk-size=”131072″ fill-size=”262144″/>
</profile>
<profile name=”vlcmpeg” enabled=”yes” type=”external”>
<mimetype>video/mpeg</mimetype>
<accept-url>yes</accept-url>
<first-resource>yes</first-resource>
<accept-ogg-theora>yes</accept-ogg-theora>
<agent command=”vlc” arguments=”-I dummy %in –sout #transcode{venc=ffmpeg,vcodec=mp2v,vb=4096,fps=25,aenc=ffmpeg,acodec=mpga,ab=192,samplerate=44100,channels=2}:standard{access=file,mux=ps,dst=%out} vlc:quit”/>
<buffer size=”14400000″ chunk-size=”512000″ fill-size=”120000″/>
</profile>
<profile name=”audio-common” enabled=”yes” type=”external”>
<mimetype>audio/x-wav</mimetype>
<accept-url>yes</accept-url>
<first-resource>yes</first-resource>
<accept-ogg-theora>no</accept-ogg-theora>
<agent command=”mediatomb-transcode-audio” arguments=”%in %out”/>
<buffer size=”1048576″ chunk-size=”131072″ fill-size=”262144″/>
</profile>
<profile name=”video-common” enabled=”yes” type=”external”>
<mimetype>video/mpeg</mimetype>
<accept-url>yes</accept-url>
<first-resource>yes</first-resource>
<accept-ogg-theora>yes</accept-ogg-theora>
<agent command=”mediatomb-transcode-video-ffmpeg” arguments=”%in %out”/>
<buffer size=”14400000″ chunk-size=”512000″ fill-size=”120000″/>
</profile>
</profiles>
</transcoding>
</config>


# cat /usr/bin/mediatomb-transcode-video-ffmpeg
INPUT="$1"
OUTPUT="$2"
VIDEO_CODEC="mpeg2video"
VIDEO_BITRATE="4096k"
AUDIO_CODEC="mp2"
AUDIO_BITRATE="192k"
AUDIO_SAMPLERATE="48000"
AUDIO_CHANNELS="2"
FORMAT="dvd"
exec /usr/bin/ffmpeg -threads 2 -i "${INPUT}" -vcodec ${VIDEO_CODEC} -b ${VIDEO_BITRATE} \
-acodec ${AUDIO_CODEC} -ab ${AUDIO_BITRATE} -ar ${AUDIO_SAMPLERATE} -ac ${AUDIO_CHANNELS} \
-f ${FORMAT} - > "${OUTPUT}" #2>/dev/null

Hope that helps you guys out there 🙂

Tagged with:
Aug 13

LinuxMagic has some fine tool that helps you manage your Qmail Queue.

In my case, whenever my mailserver is reaching it’s thresholds for SPAM, i’ll clear the Queue, NOT by deleting messages, but by giving them more age. Whatever fits best for you and your customers, but in my case, i have to clear all the MAILER-DEMON messages from time to time because they stack up in the Queue because the FAKE-SENDER-HOST isn’t reachable.


#stop the qmail-send process
svc -d /service/qmail-send

#make sure no more qmail-remote are running
ps -ax|grep qmail-remote

#give all Mailer Demon Notices a high age.
#Results in a LAST delivery attempt on qmailside.
qmail-remove -i -p "MAILER-DAEMON" -X 0

#startup qmail
svc -u /service/qmail-send

#See the logfiles for the magic to happen
2007-08-13 15:55:52.069062500 delivery 911: failure: Sorry,_I_wasn't_able_to_establish_an_SMTP_connection.
_(#4.4.1)/I'm_not_going_to_try_again;
_this_message_has_been_in_the_queue_too_long./

cheers, good stuff!

Mar 15

Since 2 weeks i had to call my ISP like 6 or 7 times to get my DSL link fixed. As i use my gentoo box at home via VPN for all kinds of Webdav, email etc. solutions i was looking for a backup to get INTO that router once the connection fails due the DSL being broken again.

Time to bring my old AVM ISDN card into the game again. I wanted a solution that allows me to DIAL IN to my router via my PowerBook via mobile, getting a proper IP connection to it, mainly for SSH to fix the DSL or whenever necessary to SURF over this connection.

After a lot of searching (this topic seems to be outdated with all this DSL, UMTS around) i finally came up with this configuration:

/etc/ppp/peers/dialin

nodefaultroute
10.50.50.1:
ms-dns 192.168.100.1
noipx
proxyarp
sync
plugin capiplugin.so
msn 123456 #change to local msn
protocol hdlc
cli 123456 #change to dialing number
login
mp
nodefaultroute
unit 5
auth +pap

The authentication uses /etc/ppp/pap-secrets and expects something like this:

#username localhostname password ip_for_dialing_host
dude router blub 10.50.50.2

/etc/inittab

#in order to have the card LISTENING all the time.
p0:23:respawn:/usr/sbin/pppd call dialin

preload preload preload