Connection to Streaming Server Broken
  • First of all many thanks to the developers of Airtime for your fabulous software.

    After the update to 2.0.1 and messing around with my network settings i get the following error message:
    /usr/lib/airtime/pypo/bin/liquidsoap_scripts/notify.sh --error='could not write data to host: Connection refused in write()' --stream-id=1

    Here my system-check:
    AIRTIME_SERVER_RESPONDING      = OK
    KERNEL_VERSION                 = 2.6.35-32-generic
    MACHINE_ARCHITECTURE           = i686
    TOTAL_MEMORY_MBYTES            = 2060576
    TOTAL_SWAP_MBYTES              = UNKNOWN
    AIRTIME_VERSION                = 2.0.1
    OS                             = Ubuntu 10.10 i686
    CPU                            = Intel(R) Core(TM)2 CPU          6600  @ 2.40GHz
    WEB_SERVER                     = Apache/2.2.16 (Ubuntu)
    PLAYOUT_ENGINE_PROCESS_ID      = 6256
    PLAYOUT_ENGINE_RUNNING_SECONDS = 612
    PLAYOUT_ENGINE_MEM_PERC        = 0.4%
    PLAYOUT_ENGINE_CPU_PERC        = 0.0%
    LIQUIDSOAP_PROCESS_ID          = 6263
    LIQUIDSOAP_RUNNING_SECONDS     = 612
    LIQUIDSOAP_MEM_PERC            = 0.7%
    LIQUIDSOAP_CPU_PERC            = 0.9%
    MEDIA_MONITOR_PROCESS_ID       = 6222
    MEDIA_MONITOR_RUNNING_SECONDS  = 613
    MEDIA_MONITOR_MEM_PERC         = 0.4%
    MEDIA_MONITOR_CPU_PERC         = 0.0%
    SHOW_RECORDER_PROCESS_ID       = 6285
    SHOW_RECORDER_RUNNING_SECONDS  = 612
    SHOW_RECORDER_MEM_PERC         = 0.4%
    SHOW_RECORDER_CPU_PERC         = 0.0%
    RABBITMQ_PROCESS_ID            = 1603
    RABBITMQ_RUNNING_SECONDS       = 610
    RABBITMQ_MEM_PERC              = 0.7%
    RABBITMQ_CPU_PERC              = 0.0%


    I think the problem is the connection to apache2. 

    Here some more log stuff:

    DEBUG - [pypo-notify.py : notify_liquidsoap_status() : line 89] - # Calling server to update liquidsoap status    #
    2012-02-17 17:40:46,274 DEBUG - [pypo-notify.py : notify_liquidsoap_status() : line 90] - #################################################
    2012-02-17 17:40:46,274 DEBUG - [pypo-notify.py : notify_liquidsoap_status() : line 91] - msg = could not write data to host: Connection refused in write()
    2012-02-17 17:40:46,460 DEBUG - [pypo-notify.py : notify_liquidsoap_status() : line 93] - Response: null

    Here my airtime.conf:

    [database]
    host = 127.0.0.1
    dbname = airtime
    dbuser = airtime
    dbpass = airtime

    [rabbitmq]
    host = 127.0.0.1
    port = 5672
    user = guest
    password = guest
    vhost = /

    [general]
    api_key = XFGJQJDA7OVTZYMEW4LG
    web_server_user = www-data
    airtime_dir = /usr/share/airtime/
    base_url = localhost
    base_port = 80

    [soundcloud]
    connection_retries = 3
    time_between_retries = 60



    Everything else seems to work normal. Thanks a lot for your help!







     
  • 31 Comments sorted by
  • Hi Rick,

    Sorry about that, I had assumed you installed the tarball instead of the debian package.

    Since you have the Debian package, you should be able to just type

    liquidsoap 'output.icecast(%vorbis, host = "localhost", port = 8000, user = "hackme" password = "hackme", mount = "liq.ogg", sine())'
    Airtime Pro Hosting: http://airtime.pro
  • There is a missing comma after the user.

    liquidsoap 'output.icecast(%vorbis, host = "localhost", port = 8000, user = "hackme", password = "hackme", mount = "liq.ogg", sine())'
    Post edited by Martin Konecny at 2012-02-23 14:12:02
    Airtime Pro Hosting: http://airtime.pro
  • Hi Rick,

    Check your private messages.
    Airtime Pro Hosting: http://airtime.pro
  • Hi,

    We faced the same problem today just after upgrading from 2.0.0 to 2.0.1.

    We fixed it disabling the stream, saving, re-enabling and re-saving in the stream settings tab after rebooted the server.

    Hope this helpful for you too
  • Anyone else with this issue? It seems the problem is related to icecast server. Perhaps a quick restart of this service (sudo service icecast2 restart), will fix it.

    Is this for the debian package version of Airtime, or the tarball?
    Airtime Pro Hosting: http://airtime.pro
  • Debian Squeeze for us Martin
  • The connection problem was not a failure of airtime, but someone did not pay the streaming server service in time  so that is why we got a connection refused error. Sorry, for the false alarm Martin. 


    @Radio-Libriamoci Web 
    Thanks for the hint anyway








    X_X
  • I can't verify this exactly, however when I added our licensed stream to the config today it's not working at all. i.e. I can tune-in directly using the local icecast (internally and externally) but out second stream is not sending anything.



  • So first stream is connected to your local icecast, and the second one is connected to a licensed icecast server?

    Airtime Pro Hosting: http://airtime.pro
  • Stream 1 : Local (out of the box config) 
    Stream 2 : Needs to connect to loudcaster.com

    The basic config is icecast connects to them on port 3044 to one of their icecast servers. When we tried to connect yesterday nothing happened. I asked them to verify and after looking in their logs they found no connection from our source IP at all.

    LC has made a change for us and we're getting reading to send a test stream now. Which as I'm typing this scheduled event just kicked in and doesn't appear to be working.



  • Is there an encoder log for the Stream # entries? Trying to hunt this down as it's the last major issue we have (for now :)) before going live with Airtime.
  • I suspect there is something wrong with your configuration. Try the following:

    /usr/lib/airtime/pypo/bin/liquidsoap_bin/liquidsoap 'output.icecast(%vorbis, host = "localhost", port = 8000, user = "hackme" password = "hackme", mount = "liq.ogg", sine())'

    Using the parameters that your icecast host provided you of course.
    Airtime Pro Hosting: http://airtime.pro
  • And where does this go?

    Is this supposed to be a directory? /usr/lib/airtime/pypo/bin/liquidsoap_bin 

    If so, maybe that's the issue. There is no liquidsoap_bin
    Post edited by Rick Munday at 2012-02-21 17:31:23
  • Run that from the terminal. It should create a mount on the icecast server and then you can hear a sine wave (it's a monotonous hum)
    Airtime Pro Hosting: http://airtime.pro
  • OK, will try tomorrow.
  • Here everything works fine again. The error message I got was related to no access to a paid streaming relay server.

     
  • And - here is the result of your command:

    -bash: /usr/lib/airtime/pypo/bin/liquidsoap_bin/liquidsoap: No such file or directory

    This is why I asked if that was a directory or filename, because it's not there on either of our test systems.  /usr/lib/airtime/pypo/bin/liquidsoap_bin/liquidsoap is non-existent.

  • Post edited by Rick Munday at 2012-02-23 11:08:08
  • ERROR: Failed to load plugin /usr/lib/ao/plugins-4/libnas.so => dlopen() failed
    Line 1, char 97 before "=": Parse error!




  • LOL! Derp... My fault completely.

    OK - so now we're on track and that worked. I got the sine wave on the stream.

    So now where do we go? I took all of the information for the CLI command you gave me from the Stream 2 settings in Airtime's configuration window.

  • Strange. 

    The configuration that you put into the web UI is then saved into /etc/airtime/liquidsoap.cfg. Liquidsoap then reads this file when it starts.

    Can you look into there to see if it is correct. In your case look at the S2 (stream #2) variables.
    Airtime Pro Hosting: http://airtime.pro
  • HAH! OK - here're the issue:

    s2_enable = false
    s2_type = "ogg"
    s2_bitrate = 48
    s2_output = "icecast"
    s2_host = ""
    s2_port = 0
    s2_pass = ""
    s2_genre = ""
    s2_url = ""
    s2_description = ""
    s2_mount = ""
    s2_user = ""

    All the fields are filled in (and displayed) in the Airtime web interface!

    image
  • rickles@NCR-SaGR-SRVR:/etc/airtime$ ls -al liquidsoap.cfg 
    -rw-r----- 1 pypo pypo 986 2012-02-15 15:27 liquidsoap.cfg


    So it's not been written to since the reload! Even though I've re-entered those field 5 or 6 times.
    Post edited by Rick Munday at 2012-02-23 14:39:42
  • Can you try slightly modifying the Name/Description field, save the changes, and look at the liquidsoap.cfg file again.

    If the file is still not updated, then please post the last minute of /var/log/airtime/pypo/pypo.log
    Airtime Pro Hosting: http://airtime.pro
  • Added an ! after the station name and saved.

    rickles@NCR-SaGR-SRVR:/etc/airtime$ ls -al liquidsoap.cfg 
    -rw-r----- 1 pypo pypo 986 2012-02-15 15:27 liquidsoap.cfg


    No change.

  • ...
    Post edited by Rick Munday at 2012-02-23 14:50:24
  • liquidsoap.cfg still empty

    s2_enable = false
    s2_type = "ogg"
    s2_bitrate = 48
    s2_output = "icecast"
    s2_host = ""
    s2_port = 0
    s2_pass = ""
    s2_genre = ""
    s2_url = ""
    s2_description = ""
    s2_mount = ""
    s2_user = ""

  • Done.
  • I just noticed my avatar makes me look like I'm pissed off or something!  :-))
  • That's better
  • And we're working! Thanks Martin!



    FYI for future searchers - if you have a non-standard character (an "=" in our case) in the encoder (stream) password, it doesn't parse the file correctly.