Zombified Airtime!
  • Ok, I'm having a bit of problems with Airtime 2.2.0 lately. :)

    On this other server, I did upgraded from 2.1.3 to 2.2.0, but I think this problem appeared even with 2.1.3.

    On this same machine, I connected an USB audio card which is used to feed live show from studio. That card is managed with a custom liquidsoap script, triggered by a web page. That script is connected to the Master DJ input of Airtime (all on the same host) configured with automatico switch on and off. So, when the stream from the local audio card is enabled, the studio goes live.

    Everything works fine, but after some days something happens and when the studio is triggered on, its stream does not replace the "default" stream (I did the "automatic playlist hack). Even the Master DJ is not visually enabled on Airtime. At a first glance, it seems that RabbitMQ has gone wild, but if I restart it then the Master DJ became enabled, but still the live stream does not replace the "default" stream.

    If I restart the machine, all starts working fine. I did not try to restart all single services, but I suppose that that will do the trick as well.

    I'm attaching here all the logs from airtime and the custom script I use to feed Master DJ. The bad thing happened today, 27 nov 2012, at about and after 10:00am.

    AIRTIME_STATUS_URL             = http://localhost:80/api/status/format/json/api_key/%%api_key%%
    AIRTIME_SERVER_RESPONDING      = OK
    KERNEL_VERSION                 = 2.6.32-5-amd64
    MACHINE_ARCHITECTURE           = x86_64
    TOTAL_MEMORY_MBYTES            = 2027388
    TOTAL_SWAP_MBYTES              = UNKNOWN
    AIRTIME_VERSION                = 2.2.0
    OS                             = Debian GNU/Linux 6.0.6 (squeeze) x86_64
    CPU                            = AMD Athlon(tm) II X2 250 Processor
    WEB_SERVER                     = Apache
    PLAYOUT_ENGINE_PROCESS_ID      = 16537
    PLAYOUT_ENGINE_RUNNING_SECONDS = 6
    PLAYOUT_ENGINE_MEM_PERC        = 0.7%
    PLAYOUT_ENGINE_CPU_PERC        = 0.0%
    LIQUIDSOAP_PROCESS_ID          = 29815
    LIQUIDSOAP_RUNNING_SECONDS     = 5556
    LIQUIDSOAP_MEM_PERC            = 2.8%
    LIQUIDSOAP_CPU_PERC            = 13.3%
    MEDIA_MONITOR_PROCESS_ID       = 29832
    MEDIA_MONITOR_RUNNING_SECONDS  = 5556
    MEDIA_MONITOR_MEM_PERC         = 3.8%
    MEDIA_MONITOR_CPU_PERC         = 1.0%
    RABBITMQ_PROCESS_ID            = 29731
    RABBITMQ_RUNNING_SECONDS       = 5548
    RABBITMQ_MEM_PERC              = 1.4%
    RABBITMQ_CPU_PERC              = 0.0%

    (Sorry, I did not think of running airtime-check-status when Airtime was zombified!)

    incasinatamente,
    Francesco P.

  • 2 Comments sorted by
  • I took a quick look at the logs.

    At 10:02:21, it looks like your custom ls script kicked in:

    2012/11/27 10:02:21 [lang:3] master connected
    2012/11/27 10:02:21 [decoder:3] Method "MAD" accepted "audio/mpeg".
    2012/11/27 10:02:21 [lang:3] /usr/lib/airtime/pypo/bin/liquidsoap_scripts/notify.sh --source-name=master_dj --source-status=true &
    2012/11/27 10:02:21 [threads:3] Created thread "harbor source feeding" (2 total).
    2012/11/27 10:02:21 [master_harbor:3] Decoding...
    2012/11/27 10:02:21 [lang:3] master connected
    2012/11/27 10:02:22 [master_harbor:3] New metadata chunk ? -- Live from studio!.
    2012/11/27 10:02:24 [mksafe:3] Switch to audio_to_stereo_5517 with transition.

    and it begins to work. However, in the background your fallback playlists continues to play - this shouldn't really have any negative effect, but it might make sense to pause the background music if only to make the logs more legible. 

    At 10:17:42 the master source finishes:

    2012/11/27 10:17:42 [master_harbor:2] Feeding stopped: End_of_file.
    2012/11/27 10:17:42 [lang:3] /usr/lib/airtime/pypo/bin/liquidsoap_scripts/notify.sh --source-name=master_dj --source-status=false &
    2012/11/27 10:17:42 [threads:3] Thread "harbor source feeding" terminated (1 remaining).

    but then reconnects again at 10:18. Finally at 10:20 it appears you restart the computer.

    What exactly did you hear during this time? Was it silence, or the fallback playlists? It's hard to infer what was played from the log files. If you disable fallback playlists while the master source is connected, things will be much easier to debug.
    Airtime Pro Hosting: http://airtime.pro
  • Thanks Martin! :)

    The background playlist is always running, it would require a bit of time to implement the start/stop logic for that playlist, to be triggered from an external script... I have no time! ;) And I think that all the people that used this hack are in the same situation, aren't they? :?

    However, every time that my custom script had been connected, Airtime half ignored it: the background playlist kept running even if the "Master DJ" light was turned on!

    I can only

    So far, I programmed that computer to reboot ad 5am, and it seems that there are no more problem. I can not restart airtime services, because Monit goes crazy if I try and keeps trying to restart them...

    accontentatamente,
    Francesco P.