live-stream authentication fails - and other frustrations
  • I'd installed airtime from the source tarball, on Ubuntu 14.04
    LTS.   The web-based setup went sensibly.   But I couldn't configure it
    to accept a live feed - I would set a "master" username ("source"), a password, port (8004) and
    mountpoint (/feedme), and it would listen on port 8004.

    But when I tried connecting to that master port with Butt (1.13) or Mixxx, it would
    always complain of an authentication error, even though I'd set the user/password via the System -> Streams screen to the same thing that
    Butt/Mixxx were using.  And I could see them sending the proper
    messages, like
      SOURCE /feedme HTTP/1.0
      Authorization: Basic (followed by the base64 for "source:<the specified password>")
      Content-Type: audio/mpeg
    and so on.

    When I connect with Mixxx to an Ubuntu 12.04.5 LTS system with Airtime installed from the debian package, with the same stream settings applied (same password, port, etc.), it works fine - Mixxx connects to the Airtime master stream as expected.

    But with Airtime installed from source on my 14.04 system, master-harbor authentication always fails:

    HTTP/1.0 401 Unauthorized
    WWW-Authenticate: Basic realm="Liquidsoap harbor"
    Content-Type: text/html

    Digging in the code, the airtime-liquidsoap
    script contained an incorrect absolute path for - it calls it in /usr/lib/airtime/pypo/bin/liquidsoap_scripts/, but the source-package install script had put it under

    The git-repo copy of Airtime replaces that hardwired path with something that looks promising, the variable auth_path:
            ret = get_process_lines("python #{auth_path} --master #{user} #{password}")
    But when I install this version, master-harbor authentication still fails with the same symptoms as before.   I suspect it's still not looking in the right place for, but how can I tell?

    Other frustrations:

    /etc/init.d/airtime-liquidsoap restart doesn't work - it tries to kill the wrong pid, since airtime-liquidsoap seems to routinely exit and (somehow) get restarted, without going through the daemon system.  Even if I directly kill -TERM the airtime-liquidsoap process, something (init?) automagically creates a new process a few seconds later.  It's not being monitored by 'monit' - the install script doesn't set that up.  

    There's got to be something better than a reboot whenever I want to test adding a new log message to ls_script.liq.

    Another annoyance: the initial apache setup created by the git-repo Airtime "install" script doesn't allow access from anywhere, even localhost.  

    But I'm most concerned with getting basic live-stream authentication working reliably.  With that, I can get on the air.

    (I'd have been happy to use the pre-packaged Debian version, which installed and ran nicely, except that it only seems to work with Ubuntu 12, which is getting uncomfortably old.)

    Post edited by Stuart Levy at 2016-01-03 04:59:43
  • 6 Comments sorted by

  • Another annoyance: the initial apache setup created by the git-repo Airtime "install" script doesn't allow access from anywhere, even localhost.   "
    Having the same problem when i install the github version.

    Also i have another problem with icecast or shoutcast, when installing on unbuntu 14.04 or 12.04. The installation of wget
    goes well only when i go to stream setting i see that the icecastserver is running fine, but when i change anything in the stream settings and i press save the icecast server stops working. only says getting information from server.   

    When i do a purge and fresh install of icecast it works untill i save something in stream setting again.  When  i install a shoutcast server it never works.    

    When i do a auto install it installs airtime 2.5.1 and everything works fine, when i install a shoutcast server all works fine, only i want to use the version because this of the bugfixes in the linked shows, does anybody have suggestions.  Cheers René
    Post edited by René Ooms at 2016-01-04 07:04:13
  • I'm slowly working my way through testing as well. I haven't ran into the exact same issues as you but I did notice that the github apache config was set-up incorrectly.

    With regards to airtime liquidsoap restart you need to use service airtime-liquidsoap restart as the init.d doesn't work as you pointed out. But service does.

    My suspicion is that you are having issues with liquidsoap if it is crashing and restarting it is possibly a configuration issue. You could try stopping the service and then manually starting it with
    sudo -u www-data airtime-liquidsoap - I did this to find out that it wasn't starting correctly and I googled the error and found that it was due to a old packaged copy of liquidsoap with ubuntu 12.04. I could of tried the sourcefabric deb package but I forgot they existed and updated my system to 14.04 and the included version worked.

    That or you could check the /var/log/airtime-liquidsoap/lsscript.log file and see if it provides any additional hints.

    I think there were indeed some configuration bugs that were introduced with a lot of the changes introduced by Have you created any bugs at for the issues you found ?
    I want to help the development team work out these issues as they are preventing people from utilizing the new version.
  • As for the incorrect path, changing /usr/lib/airtime/pypo/bin/liquidsoap_scripts/ to /usr/local/lib/python2.7/dist-packages/airtime_playout-1.0-py2.7.egg/liquidsoap/ solves the authentication issue. 

    That should be all you need to do to get it working. 
  • Thanks - this is helpful.

    • After manually fixing the web-server config so that local access worked, authentication started working too.  It needed the /api/... calls to talk to itself.
    • Thanks for "service"!   It succeeds in restarting processes that have gone through a few rebirths.
    • Like René Ooms, I can't change stream settings using just the web interface.   When I do, it reports successful change, but doesn't apply the settings to the running system.  And, /etc/airtime/liquidsoap.cfg does not get updated.    And the web interface says it is trying to connect to the aircast outgoing stream (orange, not green as it should be).

      Workaround: if I use the web interface, then manually "sudo service airtime-liquidsoap restart", then liquidsoap.cfg is correctly rewritten and the changes are indeed successfully applied.
    And, thank you Robbt to the pointer to bug reporting.   I will do that next!
  • I will take a look at the pionters and workaround, Thanks Robbt and Stuart
  • Same issue with auth fail trying to connect, I did as above change:

    Still cant get it to work, this is driving me crazy :P
    Debian 8.2