I've got a very frustrating problem with Airtime 2.0.2 running on Debian Squeeze.
If I install it from package it throws an error in the post-installation script, though everything is working except liquidsoap. That is indicated in the service status.
The thing is though, that I can run liquidsoap in the shell, e.g.
xxx@xxx:/root$ liquidsoap 'output.icecast(%vorbis, host="localhost", port=8000, password="xxx", mount="test_128", sine())' 2012/03/12 20:06:36 >>> LOG START 2012/03/12 20:06:36 [protocols.external:3] Didn't find "ufetch". 2012/03/12 20:06:36 [protocols.external:3] Found "/usr/bin/wget". 2012/03/12 20:06:36 [main:3] Liquidsoap 1.0.0 2012/03/12 20:06:36 [main:3] Using: graphics=[distributed with Ocaml] pcre=6.0.1 dtools=0.2.2 duppy=0.4.2 duppy.syntax=0.4.2 cry=0.2.2 mm=0.2.0 ogg=0.4.3 vorbis=0.6.1 mad=0.4.4 flac=0.1.0 flac.ogg=0.1.0 dynlink=[distributed with Ocaml] lame=0.3.1 alsa=0.2.1 ao=0.2.0 taglib=0.2.0 camomile=0.7.1 portaudio=0.2.0 pulseaudio=0.1.2 2012/03/12 20:06:36 [dynamic.loader:2] Could not load plugins in directory /usr/local/lib/liquidsoap/1.0.0/plugins. 2012/03/12 20:06:36 [frame:3] Using 44100Hz audio, 25Hz video, 44100Hz master. 2012/03/12 20:06:36 [frame:3] Frame size must be a multiple of 1764 ticks = 1764 audio samples = 1 video samples. 2012/03/12 20:06:36 [frame:3] Targetting 'frame.duration': 0.04s = 1764 audio samples = 1764 ticks. 2012/03/12 20:06:36 [frame:3] Frames last 0.04s = 1764 audio samples = 1 video samples = 1764 ticks. 2012/03/12 20:06:36 [threads:3] Created thread "generic queue #1". 2012/03/12 20:06:36 [threads:3] Created thread "generic queue #2". 2012/03/12 20:06:36 [test_128:3] Connecting mount test_128 for source@localhost... 2012/03/12 20:06:36 [test_128:3] Connection setup was successful. 2012/03/12 20:06:36 [threads:3] Created thread "wallclock_main" (1 total). 2012/03/12 20:06:36 [clock.wallclock_main:3] Streaming loop starts, synchronized with wallclock.
No, I can run liquidsoap as long as I want in the foreground, but I cannot run it in the background with the init script /etc/init.d/liquidsoap
That's why (I guess) Airtime states the service as not working.
But I just realised that liquidsoap requires a configuration file (.liq) in /etc/liquidsoap to run it in background. In my /etc/liquidsoap there was only a radio.liq.example file, though. So I added a test configuration (sine output) et voila:
root@xxx:~# /etc/init.d/liquidsoap start Starting channels: airtime.liq FATAL ERROR: Log directory "/usr/local/var/log/liquidsoap" does not exist. To change it, add the following to your script: set("log.file.path", "<path>") OK
Still have no clue why this is not working. A misconfiguration?
I realized that as soon as I ran this script (in foreground) I could connect to the streaming server in the web admin, the status indication of airtime-liquidsoap is still red.
root@xxx:~# service airtime-playout restart Restarting Airtime Playout: start-stop-daemon: unable to alter nice level by -15 (Operation not permitted) Done.
It looks like their problem is related to not having root permissions, which is what I thought your problem might be when I asked for the EUID. It's strange that you don't have permission to alter the "nice" level, when you are the superuser.
Any differences between your system and a standard Squeeze install?
I was going to suggest removing that parameter as a temporary workaround. It isn't really necessary, it's just to make Liquidsoap play nice if the system is under very heavy load (give other processes higher CPU priority).
After spending a day on this issue I could resolve it :)
The problem was that the airtime-liquidsoap failed to restart, but there were no errors in the logs nor any other indication (not even in the system status in the web interface).
In /etc/init.d/airtime-liquidsoap I removed --nicelevel -15 from the parameters and restarted the service with $ sudo invoke-rc.d airtime-liquidsoap restart
The service restarted, the settings updated and liquidsoap could connect to Shoutcast!