Airtime 2.5.2.1 issue with Icecast and Pypo on fresh install [solved]
  • Hello all,
      I'm testing out a new Airtime install and I am having
    issues with the Icecast stream metadata and connection being updated via
    the Web interface.
    Basically a fresh install of Airtime on a local server.
    I
    loaded up 35,000 mp3s which the media-monitor processed without any
    problems (after I ensured the permissions were owned by www-data).

    Now
    I'm testing the Stream and I've noticed that the Stream Settings page
    is having no impact on the stream that Airtime is attempting to create.
    I have disabled the stream via the interface and it persists.

    If I stop icecast it shuts down the stream. But when I relaunch Icecast there is a reconnection by this process.
    airtime-liquidsoap /usr/local/lib/python2.7/dist-packages/airtime_playout-1.0-py2.7.egg/liquidsoap/ls_script.liq --verbose -f

    That process is not affected by /etc/init.d/airtime-liquidsoap stop and start.
    But if I kill the process it will respawn with the applied server settings.

    So I'm not sure exactly where the misconfiguration and/or disconnect between airtime web and airtime backend is.

    Now I have updated metadata but my playback is silent.
    It may have something to do with this error from /var/log/airtime/pypo/pypo.log
    2016-01-01
    13:47:32,124 DEBUG - [api_client.py : __call__() : line 140] -
    http://192.168.1.100:80/api/version/api_key/####KEYREMOVED####
    2016-01-01 13:47:32,178 INFO - [api_client.py : is_server_compatible() : line 236] - Unable to get Airtime API version number.

    Although when I access the URL with the APIKEY I get
    {"airtime_version":"2.5.2","api_version":"1.1"}
    At
    this point the server appears to be running correctly based upon the
    ?config URL but no sound is being played by the Icecast server even
    though I've killed and restarted all of the processes.

    I'm going to try a soft reboot of the server to see how it comes back up.

    Ok when I restarted airtime-playout was not running.
    I manually started it with sudo service airtime-playout restart<br><br>Now airtime-playout is crashing.<br>This is all that is repeated in the logs.<br>
    2016-01-01 14:12:36,385 DEBUG - [__main__.py : configure_locale() : line 107] - Before ANSI_X3.4-1968
    2016-01-01
    14:12:36,386 DEBUG - [__main__.py : configure_locale() : line 111] - No
    locale currently set. Attempting to get default locale.

    2016-01-01 14:12:36,386 INFO - [__main__.py : configure_locale() : line 129] - New locale set to: en_US.UTF-8
    2016-01-01 14:12:36,386 DEBUG - [__main__.py : configure_locale() : line 134] - sys default encoding UTF-8
    2016-01-01 14:12:36,386 DEBUG - [__main__.py : configure_locale() : line 135] - After UTF-8
    2016-01-01 14:12:36,387 INFO - [__main__.py : &lt;module&gt;() : line 221] - ###########################################
    2016-01-01 14:12:36,387 INFO - [__main__.py : &lt;module&gt;() : line 222] - #&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; *** pypo&nbsp; ***&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; #
    2016-01-01 14:12:36,387 INFO - [__main__.py : &lt;module&gt;() : line 223] - #&nbsp;&nbsp; Liquidsoap Scheduled Playout System&nbsp;&nbsp; #
    2016-01-01 14:12:36,388 INFO - [__main__.py : &lt;module&gt;() : line 224] - ###########################################
    2016-01-01 14:12:36,388 INFO - [__main__.py : &lt;module&gt;() : line 229] - Timezone: ('EST', 'EDT')
    2016-01-01 14:12:36,388 INFO - [__main__.py : &lt;module&gt;() : line 230] - UTC time: 2016-01-01 19:12:36.388178
    2016-01-01
    14:12:36,390 DEBUG - [api_client.py : __call__() : line 140] -
    http://192.168.1.100:80/api/version/api_key/REMOVEDAPIKEY

    Not sure what to try next at this point. I'll update this post if I'm able to diagnose the issue myself.
    Post edited by Robbt at 2016-01-03 07:44:29
  • 4 Comments sorted by
  • Just as a side note in case anyone is searching the forums for issues with hardware playback.

    I had issues enabling audio playout on my server.

    I am using 14.04 Ubuntu server for the install.

    I'm using a USB based soundcard (a Griffin Powerwave to be exact)

    It was recognized by Ubuntu but liquidsoap was failing to start.

    The first thing I needed to do was install alsa-utils
    sudo apt-get install alsa-utils

    I was able to test the playback with speaker-test to confirm the audio drivers were working but still no luck with liquidsoap.

    I found this post which was helpful and pointed out I needed to create a /etc/asound.conf file to have a default sound card on Ubuntu server.

    I created one like this.
     pcm.!default {
    type hw
    card 0
    }

    ctl.!default {
    type hw
    card 0
    }
    But I was getting permission errors still.

    This fix was relatively easy. I just needed to add the www-data to the audio group and restart liquidsoap and it worked.

    sudo addgroup www-data audio
    The errors I was getting in case anyone is searching for this were
     [threads:1] Thread "alsa_out(default)" aborts with exception Alsa error: Permission denied!
    and
    [threads:1] Thread "alsa_out(default)" aborts with exception Alsa error: No such file or directory!
  • Ok, it works now. This last issue was actually created by myself in editing the airtime-playout code at /usr/local/lib/python2.7/dist-packages/api_clients-1.0-py2.7.egg/api_clients/api_client.py
    I had uncommented the version check which was incorrect
    I uncommented this line        logger.info('Airtime version found: ' + str(version))
    but that is incorrect as version doesn't exist as a variable instead it is        
    logger.info('Airtime version found: ' + str(api_version))

    Rerunning sudo -u www-data airtime-playout.

    Now killing all of the airtime-playout I restarted it manually and it mainly appears to be working.
    So this is my log of the issues I ran into.

    I think initially based upon the logs the issue was caused by the is_server_compatible check failing.
    All I did to modify it was make it log the Airtime version found.

    Ok so testing the web interface the issue that appears remaining is that I need to manually restart liquidsoap to get it to register changes in the airtime web interface.

    sudo service airtime-liquidsoap restart

    Does the trick and I can live with that for now.

    The other remaining issue is that the track metadata isn't being passed. Initially I thought this was because I was using the ogg vorbis stream without the metadata check but evidently there is something else afoot as I switched to Mp3 and modified the Stream label to include the show and it is only passing through the show to the player.

    More testing will be necessary.
  • And now the metadata is updating. So I'm not sure what changed there either.
  • Robbt thank you very much about the comments. I was stuck at the "Permission denied" error for a while.