Liquidsoap fails with ALSA (Airtime 2.3 and Ubuntu 12.10)
  • I'm finally upgrading Airtime to the latest version and have a fresh install of ubuntu Server 12.10 to use as a test machine. Airtime installs fine and running airtime-check-system immediately after the installation checks out. The problems begin once I login and change the output to "Hardware Output". Running airtime-check-system again shows that Liquidsoap has failed:

    AIRTIME_STATUS_URL             = http://localhost:80/api/status/format/json/api_                                 key/%%api_key%%
    AIRTIME_SERVER_RESPONDING      = OK
    KERNEL_VERSION                 = 3.5.0-17-generic
    MACHINE_ARCHITECTURE           = i686
    TOTAL_MEMORY_MBYTES            = 4008468
    TOTAL_SWAP_MBYTES              = 4063228
    AIRTIME_VERSION                = 2.3.1
    OS                             = Ubuntu 12.10 i686
    CPU                            = Intel(R) Core(TM) i3-3220 CPU @ 3.30GHz
    WEB_SERVER                     = Apache/2.2.22 (Ubuntu)
    PLAYOUT_ENGINE_PROCESS_ID      = 6457
    PLAYOUT_ENGINE_RUNNING_SECONDS = 7591
    PLAYOUT_ENGINE_MEM_PERC        = 0.2%
    PLAYOUT_ENGINE_CPU_PERC        = 0.0%
    LIQUIDSOAP_PROCESS_ID          = FAILED
    LIQUIDSOAP_RUNNING_SECONDS     = 0
    LIQUIDSOAP_MEM_PERC            = 0%
    LIQUIDSOAP_CPU_PERC            = 0%
    -- Displaying log file /var/log/airtime/pypo-liquidsoap/ls_script.log
    -- 2013/05/22 15:41:59 [stdout:3] #     pypo notification gateway         #
    -- 2013/05/22 15:41:59 [stdout:3] #########################################
    -- 2013/05/22 15:42:01 [threads:3] Thread "http polling" terminated (0 remaining                                 ).
    -- 2013/05/22 15:42:01 [main:3] Cleaning downloaded files...
    -- 2013/05/22 15:42:01 >>> LOG END
    --
    --
    MEDIA_MONITOR_PROCESS_ID       = 6391
    MEDIA_MONITOR_RUNNING_SECONDS  = 7592
    MEDIA_MONITOR_MEM_PERC         = 0.2%
    MEDIA_MONITOR_CPU_PERC         = 0.0%
    -- There appears to be a problem with your Airtime installation.

    Checking that the config file is OK and has the necessary permissions:

    ls -l /etc/airtime/liquidsoap.cfg
    -rw-r--r-- 1 pypo pypo 1190 May 22 15:48 /etc/airtime/liquidsoap.cfg

    sudo -u pypo /usr/lib/airtime/pypo/bin/airtime-liquidsoap
    #########################################
    #           *** pypo  ***               #
    #     pypo notification gateway         #
    #########################################

    That's really where my troubleshooting knowledge ends?

    Any ideas

    Chris W.




  • 16 Comments sorted by
  • What's the output of

    sudo -u pypo /usr/lib/airtime/pypo/bin/airtime-liquidsoap

    ?
    Airtime Pro Hosting: http://airtime.pro
  • It's the last paragraph above. Simply that banner message.
  • I see, I will need you to do the following:

    open 
    /usr/lib/airtime/pypo/bin/airtime-liquidsoap

    and change line

    ls_path="/usr/bin/airtime-liquidsoap --verbose -f -d"

    to

    ls_path="/usr/bin/airtime-liquidsoap --verbose -f"

    (simply remove the -d). Then run

    sudo -u pypo /usr/lib/airtime/pypo/bin/airtime-liquidsoap

    again
    Airtime Pro Hosting: http://airtime.pro
  • Here's the output:

    2013/05/22 17:07:09 >>> LOG START
    2013/05/22 17:07:09 [protocols.external:3] Didn't find "ufetch".
    2013/05/22 17:07:09 [protocols.external:3] Found "/usr/bin/wget".
    2013/05/22 17:07:09 [main:3] Liquidsoap 1.0.1
    2013/05/22 17:07:09 [main:3] Using: graphics=[distributed with Ocaml] pcre=6.2.5 dtools=0.3.0 duppy=0.4.2 duppy.syntax=0.4.2 cry=0.2.2 mm=0.2.0 xmlplaylist=0.1.3 lastfm=0.3.0 ogg=0.4.3 vorbis=0.6.1 speex=0.2.0 mad=0.4.4 flac=0.1.1 flac.ogg=0.1.1 dynlink=[distributed with Ocaml] lame=0.3.1 gstreamer=0.1.0 voaacenc=0.1.0 theora=0.3.0 schroedinger=0.1.0 gavl=0.1.4 bjack=0.1.3 alsa=0.2.1 ao=0.2.0 samplerate=0.1.1 taglib=0.2.0 magic=0.7.3 camomile=0.8.4 faad=0.3.0 soundtouch=0.1.7 portaudio=0.2.0 pulseaudio=0.1.2 ladspa=0.1.4 dssi=0.1.0 sdl=0.9.0 camlimages=4.0.0 lo=0.1.0 yojson=1.0.3 gd=1.0a5
    2013/05/22 17:07:09 [dynamic.loader:3] Could not find dynamic module for aacplus encoder.
    2013/05/22 17:07:09 [dynamic.loader:2] Loaded plugin file /usr/lib/liquidsoap/1.0.1/plugins/faad.cmxs.
    2013/05/22 17:07:09 [dynamic.loader:2] Loaded plugin file /usr/lib/liquidsoap/1.0.1/plugins/voaacenc.cmxs.
    2013/05/22 17:07:09 [dynamic.loader:2] Loaded plugin file /usr/lib/liquidsoap/1.0.1/plugins/mad.cmxs.
    2013/05/22 17:07:09 [dynamic.loader:2] Loaded plugin file /usr/lib/liquidsoap/1.0.1/plugins/taglib.cmxs.
    2013/05/22 17:07:09 [dynamic.loader:2] Loaded plugin file /usr/lib/liquidsoap/1.0.1/plugins/lame.cmxs.
    2013/05/22 17:07:09 [dynamic.loader:2] Loaded plugin file /usr/lib/liquidsoap/1.0.1/plugins/ogg.cmxs.
    2013/05/22 17:07:09 [dynamic.loader:2] Loaded plugin file /usr/lib/liquidsoap/1.0.1/plugins/flac.cmxs.
    2013/05/22 17:07:09 [dynamic.loader:2] Loaded plugin file /usr/lib/liquidsoap/1.0.1/plugins/vorbis.cmxs.
    2013/05/22 17:07:09 [dynamic.loader:2] Loaded plugin file /usr/lib/liquidsoap/1.0.1/plugins/cry.cmxs.
    2013/05/22 17:07:09 [dynamic.loader:2] Loaded plugin file /usr/lib/liquidsoap/1.0.1/plugins/pulseaudio.cmxs.
    2013/05/22 17:07:09 [dynamic.loader:2] Loaded plugin file /usr/lib/liquidsoap/1.0.1/plugins/flac_ogg.cmxs.
    2013/05/22 17:07:09 [frame:3] Using 44100Hz audio, 25Hz video, 44100Hz master.
    2013/05/22 17:07:09 [frame:3] Frame size must be a multiple of 1764 ticks = 1764 audio samples = 1 video samples.
    2013/05/22 17:07:09 [frame:3] Targetting 'frame.duration': 0.04s = 1764 audio samples = 1764 ticks.
    2013/05/22 17:07:09 [frame:3] Frames last 0.04s = 1764 audio samples = 1 video samples = 1764 ticks.
    2013/05/22 17:07:09 [lang:3] ALSA
    2013/05/22 17:07:09 [lang:3] /usr/lib/airtime/pypo/bin/liquidsoap_scripts/notify.sh --liquidsoap-started &
    2013/05/22 17:07:09 [threads:3] Created thread "generic queue #1".
    2013/05/22 17:07:09 [threads:3] Created thread "generic queue #2".
    2013/05/22 17:07:09 [threads:3] Created thread "non-blocking queue #1".
    2013/05/22 17:07:09 [threads:3] Created thread "http polling" (1 total).
    2013/05/22 17:07:09 [clock.wallclock_pulse:2] Error when starting output pulse_out(liquidsoap:): Pulseaudio error: Connection refused!
    2013/05/22 17:07:09 [clock.wallclock_pulse:3] Raised by primitive operation at file "", line 0, characters 0-0
    2013/05/22 17:07:09 [airtime_128:3] Connecting mount airtime_128 for source@127.0.0.1...

    #########################################
    #           *** pypo  ***               #
    #     pypo notification gateway         #
    #########################################
    2013/05/22 17:07:10 [airtime_128:3] Connection setup was successful.
    2013/05/22 17:07:10 [lang:3] /usr/lib/airtime/pypo/bin/liquidsoap_scripts/notify.sh --connect --stream-id=1 --time=1369238829.86 &
    2013/05/22 17:07:10 [threads:3] Created thread "wallclock_pulse" (2 total).
    2013/05/22 17:07:10 [main:3] Shutdown started!
    2013/05/22 17:07:10 [clock.wallclock_pulse:3] Streaming loop starts, synchronized by active sources.
    2013/05/22 17:07:10 [main:3] Waiting for threads to terminate...
    2013/05/22 17:07:10 [airtime_128:3] Closing connection...
    2013/05/22 17:07:10 [clock.wallclock_pulse:3] Streaming loop stopped.
    2013/05/22 17:07:10 [threads:3] Thread "wallclock_pulse" terminated (1 remaining).
    2013/05/22 17:07:10 [server:3] New client: localhost.
    2013/05/22 17:07:10 [lang:3] streams.scheduled_play_start
    2013/05/22 17:07:10 [lang:3] streams.live_dj_stop
    2013/05/22 17:07:10 [lang:3] streams.master_dj_stop
    2013/05/22 17:07:10 [lang:3] vars.stream_metadata_type
    2013/05/22 17:07:10 [lang:3] vars.station_name
    2013/05/22 17:07:10 [lang:3] vars.default_dj_fade
    2013/05/22 17:07:10 [server:3] Client localhost disconnected.

    #########################################
    #           *** pypo  ***               #
    #     pypo notification gateway         #
    #########################################
    2013/05/22 17:07:10 [server:3] New client: localhost.
    2013/05/22 17:07:10 [server:3] Client localhost disconnected.
    2013/05/22 17:07:10 [server:3] New client: localhost.
    2013/05/22 17:07:10 [lang:3] source.skip
    2013/05/22 17:07:10 [server:3] Client localhost disconnected.
    2013/05/22 17:07:10 [server:3] New client: localhost.
    2013/05/22 17:07:10 [lang:3] dynamic_source.get_id
    2013/05/22 17:07:10 [server:3] Client localhost disconnected.
    2013/05/22 17:07:11 [threads:3] Thread "http polling" terminated (0 remaining).
    2013/05/22 17:07:11 [main:3] Cleaning downloaded files...
    2013/05/22 17:07:11 >>> LOG END

  • 2013/05/22 17:07:09 [clock.wallclock_pulse:2] Error when starting output pulse_out(liquidsoap:): Pulseaudio error: Connection refused!
    2013/05/22 17:07:09 [clock.wallclock_pulse:3] Raised by primitive operation at file "", line 0, characters 0-0

    It looks like you are using PulseAudio. If you are running a server, I believe PulseAudio is not included by default. Either install the pulseaudio packages, or switch to ALSA.
    Airtime Pro Hosting: http://airtime.pro
  • That's odd as I don't have Pulse installed, just ALSA and the top line of the config file (and the Airtime GUI) is set to ALSA
  • Hmm, it may be that if the Liquidsoap binary has been compiled with PulseAudio support, and you attempt to use ALSA, it will still attempt to use ALSA, but may error out before that point simply because it may have checked if PulseAudio was available.

    If this is the case, we have two options. Either compile your own Liquidsoap binary, or use the existing Liquidsoap binary and install the PulseAudio packages.
    Airtime Pro Hosting: http://airtime.pro
  • That'll probably work but I think we're putting the cart before the horse. This is a completely clean install of both the OS and Airtime, we shouldn't have to be installing Pulse if ALSA is installed and I can access the soundcard fine:

    card 0: PCH [HDA Intel PCH], device 0: CONEXANT Analog [CONEXANT Analog]
      Subdevices: 1/1
      Subdevice #0: subdevice #0
    card 0: PCH [HDA Intel PCH], device 3: HDMI 0 [HDMI 0]
      Subdevices: 1/1
      Subdevice #0: subdevice #0

    Airtime-Test-Soundcard:

    airtime-test-soundcard
    Sound API: alsa
    Outputting to soundcard. You should be able to hear a monotonous tone. Press ctrl-c to quit.
    There was an error using the selected sound API. Please select a different API and run this program again. Use the -h option for help

  • Hey,

    What I was trying to say is that if Liquidsoap was compiled with pulseaudio headers, then it most likely expects the pulseaudio library to exist on the system it runs on.

    So installing the pulseaudio packages is just a suggestion, but the best way would be to recompile liquidsoap without pulseaudio support.
    Airtime Pro Hosting: http://airtime.pro
  • Sorry I didn't mean to be quite so rude! Hmm I just installed Airtime using apt-get is the shall I try and install the Liquidsoap package from your own repos?
  • The Liquidsoap binary you have is most likely provided by our own repos. You can verify by doing "dpkg -l | grep liq" and check if there is an "sfo" in the output version string.

    Building the Liquidsoap binary yourself is easy (and detailed instructions are here), however I'll get back to you if there's an easier way around your current situation
    Airtime Pro Hosting: http://airtime.pro
  • Why do you think this has happened? I've installed Airtime smoothly enough before on several machines. Do you think it could be some kind of error thrown up by the sound card itself? 

    Doesn't like like I am using the Sourcefabric ones:
    ii  liquidsoap                         1.0.1+repack1-1                           i386         audio streaming language
    ii  liquidsoap-plugin-faad             1.0.1+repack1-1                           i386         audio streaming language -- FAAD plugin
    ii  liquidsoap-plugin-flac             1.0.1+repack1-1                           i386         audio streaming language -- FLAC plugin
    ii  liquidsoap-plugin-icecast          1.0.1+repack1-1                           i386         audio streaming language -- Icecast plugin
    ii  liquidsoap-plugin-lame             1.0.1+repack1-1                           i386         audio streaming language -- Lame plugin
    ii  liquidsoap-plugin-mad              1.0.1+repack1-1                           i386         audio streaming language -- Mad plugin
    ii  liquidsoap-plugin-ogg              1.0.1+repack1-1                           i386         audio streaming language -- Ogg plugin
    ii  liquidsoap-plugin-pulseaudio       1.0.1+repack1-1                           i386         audio streaming language -- Pulseaudio plugin
    ii  liquidsoap-plugin-taglib           1.0.1+repack1-1                           i386         audio streaming language -- Taglib plugin
    ii  liquidsoap-plugin-voaacenc         1.0.1+repack1-1                           i386         audio streaming language -- Voaacenc plugin
    ii  liquidsoap-plugin-vorbis           1.0.1+repack1-1                           i386         audio streaming language -- Vorbis plugin

    I'll try your link and report back but first I'll try the section in the manual http://sourcefabric.booktype.pro/airtime-23-for-broadcasters/automated-installation/
    Enhanced Liquidsoap packages"

  • OK I've installed the Liquidsoap package:

    dpkg -l | grep liq
    ii  liquidsoap                         1.0.1~quantal~sfo-4                       i386         audio streaming language

    BTW I noticed these errors when the server boots (they didn't seem to pop up in any of the Airtime logs) so i copied them from tty7

    [ OK ] Starting Liquidsoap: Exception: <urlopen error [Errno 111] Connection refused>                                                  
    traceback: Traceback (most recent call last):
    File "/usr/lib/airtime/api_clients/api_client.py", line 87, in __call__                                                           
         response  = urllib2.urlopen(req).read()                                                                                       
    File "/usr/lib/python2.7/urllib2.py", line 127, in urlopen
         return _opener.open(url, data, timeout)                                                                                       
    File "/usr/lib/python2.7/urllib2.py", line 401, in open                                                                           
         response = self._open(req, data)
    File "/usr/lib/python2.7/urllib2.py", line 419, in _open                                                                          
         '_open', req)
    File "/usr/lib/python2.7/urllib2.py", line 379, in _call_chain
         result = func(*args)                                                                                                          
    File "/usr/lib/python2.7/urllib2.py", line 1211, in http_open                                                                     
         return self.do_open(httplib.HTTPConnection, req)
    File "/usr/lib/python2.7/urllib2.py", line 1181, in do_open                                                                       
         raise URLError(err)                                                                                     
    URLError: <urlopen error [Errno 111] Connection refused>
                                                                                                                                                                                          
    <urlopen error [Errno 111] Connection refused>                                                                                  
    Unable to connect to the Airtime server.
    Done.                                                                                                                           
    Starting Airtime Media Monitor: Done.                                                                                           
    Starting Airtime Scheduler Engine: chown: cannot access `/etc/airtime/liquidsoap.cfg': No such file or directory                
    Done.
    Starting icecast2: Starting icecast2                                                                                            
    Detaching from the console
    icecast2.
    Starting liquidsoap channels: no script found in /etc/liquidsoap                                                                 
    * Starting message broker rabbitmq-server
  • That error trace you see has been fixed in 2.4 but is harmless. Is
    Liquidsoap working now?
    On May 23, 2013 8:51 AM, "Chris Weaver" <<br />airtime-support@lists.sourcefabric.org> wrote:

    > OK I've installed the Liquidsoap package:
    >
    > dpkg -l | grep liq
    > ii liquidsoap 1.0.1~quantal~sfo-4
    > i386 audio streaming language
    >
    > BTW I noticed these errors when the server boots (they didn't seem to pop
    > up in any of the Airtime logs) so i copied them from tty7
    >
    > [ OK ] Starting Liquidsoap: Exception: **
    >
    > traceback: Traceback (most recent call last):
    > File "/usr/lib/airtime/api_clients/api_client.py", line 87, in __call__
    >
    > response = urllib2.urlopen(req).read()
    >
    > File "/usr/lib/python2.7/urllib2.py", line 127, in urlopen
    > return _opener.open(url, data, timeout)
    >
    > File "/usr/lib/python2.7/urllib2.py", line 401, in open
    >
    > response = self._open(req, data)
    > File "/usr/lib/python2.7/urllib2.py", line 419, in _open
    >
    > '_open', req)
    > File "/usr/lib/python2.7/urllib2.py", line 379, in _call_chain
    > result = func(*args)
    >
    > File "/usr/lib/python2.7/urllib2.py", line 1211, in http_open
    >
    > return self.do_open(httplib.HTTPConnection, req)
    > File "/usr/lib/python2.7/urllib2.py", line 1181, in do_open
    >
    > raise URLError(err)
    >
    > URLError: **
    >
    >
    >
    > **
    >
    > Unable to connect to the Airtime server.
    > Done.
    >
    > Starting Airtime Media Monitor: Done.
    >
    > Starting Airtime Scheduler Engine: chown: cannot access
    > `/etc/airtime/liquidsoap.cfg': No such file or directory
    > Done.
    > Starting icecast2: Starting icecast2
    >
    > Detaching from the console
    > icecast2.
    > Starting liquidsoap channels: no script found in /etc/liquidsoap
    >
    > * Starting message broker rabbitmq-server
    >
    >
    Airtime Pro Hosting: http://airtime.pro
  • I'm afraid not. I compiled the binaries as per your instructions and now on a whim have tried re-installing on Ubuntu 12.04. Same issue. Do you think it's related to using an Intel HDA based sound card?
  • I had the same problema and I just had to install liquidsoap-plugin-alsa

    apt-get install liquidsoap-plugin-alsa