Friday, November 06, 2009

Plan: make my server into a good file server for Macs with Time Machine support.

Found this page: Howto: Make Ubuntu a Perfect Mac File Server and Time Machine Volume

Did:
sudo apt-get build-dep netatalk
sudo apt-get install cracklib2-dev fakeroot libssl-dev
sudo apt-get source netatalk
cd netatalk-2*
sudo DEB_BUILD_OPTIONS=ssl dpkg-buildpackage -rfakeroot
sudo dpkg -i ~/netatalk_2*.deb
Hm, got errors at this point. Hope it won't be a problem.

Did:

echo "netatalk hold" | sudo dpkg --set-selections
Followed the instructions modifying settings file. Left the printer service and old appletalk in, since it seems like the printer daemon was dependent on the old appletalk stuff.
Added -ipaddr to the /etc/netatalk/afpd.conf to make sure the intranet IP address was chosen.

To open up the firewall, did:
sudo ufw allow proto tcp from any to 172.16.1.21 port 548
sudo ufw allow proto udp from any to 172.16.1.21 port 5353
After a bit of 'fippling' by following the article's instructions for creating a disk image etc, it works!

Wednesday, November 04, 2009

Debugging why my squeezeboxserver (version 7.4 under Ubuntu 9.04) can't find my SliMP3 player.

The Squeezeboxserver perl stuff seems to be installed under /usr/share/perl/Slim.

I can see with tcpdump that the player is broadcasting, but the perl squeezeboxserver process doesn't seem to be listening.

Debugging the server with:
perl -d -w /usr/sbin/squeezeboxserver --prefsdir /var/lib/squeezeboxserver/prefs --logdir /var/log/squeezeboxserver/ --cachedir /var/lib/squeezeboxserver/cache --charset utf8 --playeraddr 172.16.1.21 --logfile debuglog --logging debug
which invokes the perl debugger.

Didn't get anywhere. I suspect it may have to do with the two network interfaces on cumulus. Apparently UDP broadcasts only go out on one interface, which is arbitrary unless the server binds to a particular address. That's why I tried the playeraddr command above, which actually helped move the broadcast to the right interface, but that wasn't enough.

The key thing seems to be that although the server is listening to UDP on port 3483 (according to netstat -l), the process isn't receiving or selecting on that socket.

Reinstalling didn't help. Disabled most plugins.

Did a lot of debugging, and playing around with the firewall. After removing the -playeraddr argument to squeezeboxserver, it found the SliMP3. May have been a firewall issue with broadcast addresses?

Problems which have a combination of causes can be so hard to track down...