<?xml version="1.0" encoding="UTF-8"?>
<rss version="2.0"
	xmlns:content="http://purl.org/rss/1.0/modules/content/"
	xmlns:wfw="http://wellformedweb.org/CommentAPI/"
	xmlns:dc="http://purl.org/dc/elements/1.1/"
	xmlns:atom="http://www.w3.org/2005/Atom"
	xmlns:sy="http://purl.org/rss/1.0/modules/syndication/"
	xmlns:slash="http://purl.org/rss/1.0/modules/slash/"
	>

<channel>
	<title>Alt om ingenting og litt i mellom &#187; Server</title>
	<atom:link href="http://hovenko.no/blog/category/teknologi/server/feed/" rel="self" type="application/rss+xml" />
	<link>https://hovenko.no/blog</link>
	<description>En blogg av Knut-Olav</description>
	<lastBuildDate>Mon, 10 Mar 2025 19:25:02 +0000</lastBuildDate>
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	<generator>http://wordpress.org/?v=3.2.1</generator>
		<item>
		<title>Installasjon av Debian i XEN krever 1GB minne i Xen-konfigurasjon</title>
		<link>https://hovenko.no/blog/2023/09/17/installasjon-av-debian-i-xen-krever-1gb-minne-i-xen-konfigurasjon/</link>
		<comments>https://hovenko.no/blog/2023/09/17/installasjon-av-debian-i-xen-krever-1gb-minne-i-xen-konfigurasjon/#comments</comments>
		<pubDate>Sun, 17 Sep 2023 20:35:29 +0000</pubDate>
		<dc:creator>Knut-Olav</dc:creator>
				<category><![CDATA[Linux]]></category>
		<category><![CDATA[Server]]></category>
		<category><![CDATA[Teknologi]]></category>

		<guid isPermaLink="false">http://hovenko.no/blog/?p=992</guid>
		<description><![CDATA[Jeg skulle installere Debian i Xen-node og fulgte oppskriften på https://wiki.xenproject.org/wiki/Debian_Guest_Installation_Using_Debian_Installer. Jeg forsøkte netinst og cdrom via pygrub, men ingen av metodene fungerte. Jeg fikk feilmeldinger ala: [ 2.957523] steal-ctty[125]: segfault at 0 ip 00007fbce02c4160 sp 00007ffe4dde3830 error 4 in libc.so.6[7fbce021f000+148000] [ 2.957551] Code: 8b e8 74 36 04 00 0f 1f 40 00 55 [...]]]></description>
			<content:encoded><![CDATA[<p>Jeg skulle installere Debian i Xen-node og fulgte oppskriften på <a href="https://wiki.xenproject.org/wiki/Debian_Guest_Installation_Using_Debian_Installer">https://wiki.xenproject.org/wiki/Debian_Guest_Installation_Using_Debian_Installer</a>.<br />
Jeg forsøkte netinst og cdrom via pygrub, men ingen av metodene fungerte.</p>
<p>Jeg fikk feilmeldinger ala:</p>
<pre><code>[    2.957523] steal-ctty[125]: segfault at 0 ip 00007fbce02c4160 sp
00007ffe4dde3830 error 4 in libc.so.6[7fbce021f000+148000]
[    2.957551] Code: 8b e8 74 36 04 00 0f 1f 40 00 55 48 89 e5 41 57 41 56 41 55 41
54 53 48 83 ec 48 64 48 8b 04 25 28 00 00 00 48 89 45 c8 31 c0 &lt;80> 3f 00 0f 84
47 01 00 00 49 89 f4 be 2f 00 00 00 48 89 fb 49 89
Segmentation fault
cat: can't open '/var/log/reopen-console': No such file or directory
rm: can't remove '/var/log/reopen-console': No such file or directory
touch: /var/run/brltty-Xorg: No such file or directory
</code></pre>
<p>Tok ikke vare på mine eksakte feilmeldinger, men jeg fant mailingliste-tråden <a href="https://bugs.debian.org/cgi-bin/bugreport.cgi?bug=932149">https://bugs.debian.org/cgi-bin/bugreport.cgi?bug=932149</a> om problemet, og med løsningen.</p>
<p>Selv om Debian er ganske gjærrig på CPU- og minnebruk, så viste det seg at jeg måtte sette &#8220;memory=1024M&#8221; i Xen-konfigurasjonen til den nye virtuelle serveren. Det holdt ikke med 512M.</p>
<p>Jeg endte opp med å installere fra CDROM-image med kernel og initrd fra <a href="https://deb.debian.org/debian/dists/Debian12.1/main/installer-amd64/current/images/cdrom/xen/">https://deb.debian.org/debian/dists/Debian12.1/main/installer-amd64/current/images/cdrom/xen/</a>.<br />
Og med følgende XEN-node-konfigurasjon i <tt>/etc/xen/vm_srv-2023-1</tt>:</p>
<pre><code>name = "srv-DEBIAN"

kernel  = "/xen/install-media/Debian12.1-installer-amd64-cdrom-xen/vmlinuz"
ramdisk = "/xen/install-media/Debian12.1-installer-amd64-cdrom-xen/initrd.gz"
extra   = "debian-installer/exit/always_halt=true -- console=hvc0 xencons=tty"

vcpus  = 1
memory = 1024

vif = [ 'mac=00:11:22:33:44:55,bridge=xenbr0' ]

disk = [
    'file:/xen/install-media/debian-12.1.0-amd64-netinst.iso,xvdd:cdrom,r',
    'phy:/dev/vg-data/xen-srv-DEBIAN-root,xvda,w',
    'phy:/dev/vg-data/xen-srv-DEBIAN-swap,xvdb,w'
]

on_poweroff = 'destroy'
on_reboot   = 'restart'
on_crash    = 'restart'
</code></pre>
]]></content:encoded>
			<wfw:commentRss>https://hovenko.no/blog/2023/09/17/installasjon-av-debian-i-xen-krever-1gb-minne-i-xen-konfigurasjon/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Logitech Media Server on skinny Debian Jessie</title>
		<link>https://hovenko.no/blog/2016/08/29/logitech-media-server-on-skinny-debian-jessie/</link>
		<comments>https://hovenko.no/blog/2016/08/29/logitech-media-server-on-skinny-debian-jessie/#comments</comments>
		<pubDate>Mon, 29 Aug 2016 21:11:33 +0000</pubDate>
		<dc:creator>Knut-Olav</dc:creator>
				<category><![CDATA[English-posts]]></category>
		<category><![CDATA[Linux]]></category>
		<category><![CDATA[Server]]></category>
		<category><![CDATA[Teknologi]]></category>
		<category><![CDATA[Debian]]></category>
		<category><![CDATA[Squeezebox]]></category>

		<guid isPermaLink="false">http://hovenko.no/blog/?p=895</guid>
		<description><![CDATA[WAV/PCM files were not played by Logitech Media Server, with zero logging in /var/log/squeezeboxserver/server.log, on a tiny installation of Debian Jessie. I tried to tune log levels and found some tools lacking, such as &#8220;flac&#8221; and &#8220;lame&#8221;, but none of them fixed my problem, and still no explanation in the log files. But I found [...]]]></description>
			<content:encoded><![CDATA[<p>WAV/PCM files were not played by Logitech Media Server, with zero logging in <tt>/var/log/squeezeboxserver/server.log</tt>, on a tiny installation of Debian Jessie.</p>
<p>I tried to tune log levels and found some tools lacking, such as &#8220;flac&#8221; and &#8220;lame&#8221;, but none of them fixed my problem, and still no explanation in the log files.</p>
<p>But I found something in the logs that led me in the right direction:<br />
<code>
<pre>
[16-08-29 23:03:04.3358] Slim::Player::TranscodingHelper::enabledFormat (209) Checking to see if wav-flc-*-* is enabled
[16-08-29 23:03:04.3360] Slim::Player::TranscodingHelper::checkBin (250)    enabled
[16-08-29 23:03:04.3362] Slim::Player::TranscodingHelper::checkBin (252)   Found command: [flac] -cs --totally-silent --compression-level-0 $START$ $END$ -- $FILE$ | [sox] -q -t flac - -t flac -C 0 $RESAMPLE$ -
[16-08-29 23:03:04.3364] Slim::Player::TranscodingHelper::getConvertCommand2 (446) Matched: wav->flc via: [flac] -cs --totally-silent --compression-level-0 $START$ $END$ -- $FILE$ | [sox] -q -t flac - -t flac -C 0 $RESAMPLE$ -
</pre>
<p></code></p>
<p>I was missing the &#8220;sox&#8221; tool!<br />
So, I installed &#8220;sox&#8221;, and now the media server is properly encoding WAV/PCM audio files to FLAC (or something).</p>
]]></content:encoded>
			<wfw:commentRss>https://hovenko.no/blog/2016/08/29/logitech-media-server-on-skinny-debian-jessie/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Cryptic error message from Courier IMAP server &#8211; Permission Denied</title>
		<link>https://hovenko.no/blog/2012/07/02/cryptic-error-message-from-courier-imap-server-permission-denied/</link>
		<comments>https://hovenko.no/blog/2012/07/02/cryptic-error-message-from-courier-imap-server-permission-denied/#comments</comments>
		<pubDate>Mon, 02 Jul 2012 00:40:24 +0000</pubDate>
		<dc:creator>Knut-Olav</dc:creator>
				<category><![CDATA[English-posts]]></category>
		<category><![CDATA[Server]]></category>
		<category><![CDATA[Teknologi]]></category>
		<category><![CDATA[Courier-IMAP]]></category>
		<category><![CDATA[Debian]]></category>
		<category><![CDATA[debugging]]></category>
		<category><![CDATA[IT]]></category>
		<category><![CDATA[server]]></category>

		<guid isPermaLink="false">http://hovenko.no/blog/?p=749</guid>
		<description><![CDATA[I have debugged this error message for the last couple of days. Jul 1 23:11:56 lance imapd: LOGIN, user=knut-olav@hoven.ws, ip=[::ffff:AAA.BBB.CCC.DDD], port=[48700], protocol=IMAP Jul 1 23:11:56 lance imapd: knut-olav@hoven.ws: Permission denied The solution was pretty simple. The /tmp folder had bad permissions. This server was only meant for hosting email services, so bad permissions on /tmp [...]]]></description>
			<content:encoded><![CDATA[<p>I have debugged this error message for the last couple of days.<br />
<code>
<pre>Jul  1 23:11:56 lance imapd: LOGIN, user=knut-olav@hoven.ws, ip=[::ffff:AAA.BBB.CCC.DDD], port=[48700], protocol=IMAP
Jul  1 23:11:56 lance imapd: knut-olav@hoven.ws: Permission denied</pre>
<p></code></p>
<p>The solution was pretty simple.</p>
<p>The /tmp folder had bad permissions. This server was only meant for hosting email services, so bad permissions on /tmp folder was actually not an issue earlier.</p>
<p>I guess the wrong permissions were caused by my custom XEN node setup using multiple partitions, including a partition just for /tmp.</p>
<p><strong>Debugging was quite hard</strong></p>
<p>Authentication was successful, as I got a different error message when authenticating with a known bad password.</p>
<p>I debugged it using strace. It wasn&#8217;t easy, as courier imap forks out child processes for each connection, which I had to strace as well.</p>
<p><code>
<pre># strace /usr/sbin/couriertcpd -address=0 -maxprocs=40 -maxperip=20 -nodnslookup -noidentlookup 143 /usr/lib/courier/courier/imaplogin /usr/bin/imapd Maildir</pre>
<p></code></p>
<p>Connect to port 143 using telnet.<br />
Log in using this command:<br />
<code>
<pre>i login MY_EMAIL_USERNAME MY_PASSWORD
</pre>
<p></code></p>
<p>Then find the imap process PID. Look for a process running as user <tt>vmail</tt>:</p>
<p><code>
<pre>$ ps axuw|grep imapd
#...
vmail      362  0.0  1.0   4616  1344 ?        S    01:46   0:00 /usr/bin/imapd /var/spool/mail/vmail/hoven.ws/knut-olav/Maildir/
#...
</pre>
<p></code></p>
<p>In this case, the PID is 362. Then attach strace to it using <tt>strace -p 362</tt>, as sudo.</p>
<p>From the telnet interface, I entered a couple of commands like these:<br />
<code>
<pre>2 select "INBOX"
5 UID fetch 1:10 (UID RFC822.SIZE FLAGS BODY.PEEK[HEADER.FIELDS (From To Cc Bcc Subject Date Message-ID Priority X-Priority References Newsgroups In-Reply-To Content-Type)])
</pre>
<p></code></p>
<p>Then I found this somewhere down into the strace output:<br />
<code>
<pre>
open("/tmp/tmpfWsezjv", O_RDWR|O_CREAT|O_EXCL, 0600) = -1 EACCES (Permission denied)
write(2, "ERR: knut-olav@hoven.ws: Permiss"..., 43) = 43
</pre>
<p></code></p>
<p><strong>Fixing the problem</strong><br />
<tt>chmod 1777 /tmp</tt></p>
<p>As I wrote earier&#8230; a simple solution.</p>
]]></content:encoded>
			<wfw:commentRss>https://hovenko.no/blog/2012/07/02/cryptic-error-message-from-courier-imap-server-permission-denied/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
	</channel>
</rss>
