[Solved] Liquidsoap error
  • Hi,

    I have installed a fresh copy of airtime 2.4.0 on Ubuntu 12.04.3 LTS.

    Things worked ok for a couple days and then I started getting log errors and no on air light.  I did not restart services to preserve the state.

    $ sudo service airtime-liquidsoap start-with-monit
    Starting Liquidsoap Playout Engine: Unable to connect to the Airtime server.
    <urlopen error [Errno 111] Connection refused>
    traceback: Traceback (most recent call last):
      File "generate_liquidsoap_cfg.py", line 37, in <module>
        ss = ac.get_stream_setting()
      File "/usr/lib/airtime/api_clients/api_client.py", line 414, in get_stream_setting
        return self.services.get_stream_setting()
      File "/usr/lib/airtime/api_clients/api_client.py", line 137, in __call__
        f = urllib2.urlopen(req)
      File "/usr/lib/python2.7/urllib2.py", line 126, in urlopen
        return _opener.open(url, data, timeout)
      File "/usr/lib/python2.7/urllib2.py", line 400, in open
        response = self._open(req, data)
      File "/usr/lib/python2.7/urllib2.py", line 418, in _open
        '_open', req)
      File "/usr/lib/python2.7/urllib2.py", line 378, in _call_chain
        result = func(*args)
      File "/usr/lib/python2.7/urllib2.py", line 1207, in http_open
        return self.do_open(httplib.HTTPConnection, req)
      File "/usr/lib/python2.7/urllib2.py", line 1177, in do_open
        raise URLError(err)
    URLError: <urlopen error [Errno 111] Connection refused>

    Done.

    Any ideas why this happens?  Not sure why permission is refused and how to remedy it.

    Post edited by hoerich at 2013-09-06 16:29:11
  • 7 Comments sorted by
  • Vote Up0Vote Down hoerichhoerich
    Posts: 627Member, Airtime Moderator
    what happens if you just type

    sudo service airtime-liquidsoap start-with-monit

    Official Airtime Forum Manager
    --------------------------
    Most of the time an issue is located between keyboard and chair.
  • Vote Up0Vote Down hoerichhoerich
    Posts: 627Member, Airtime Moderator
    or
    sudo service airtime-liquisoap stop
    then
    sudo service airtime-liquisoap start

    cheers
    Official Airtime Forum Manager
    --------------------------
    Most of the time an issue is located between keyboard and chair.
  • Post edited by Voisses Tech at 2013-08-27 18:47:34
    Anyone reading this a find it funny about my grammar , I make no apology ,Go get a translator.
    "The Problem with education today is that it takes a university degree to switch on a light bulb"
    "You learn from your mistakes but wise people learn from others mistakes avoid Making mistakes there is not sufficient rooms to make them"
    "Innuendo","If's","Assumptions" and "Fear" are for politician.Who,What,where,When and How are for those seeking knowledge and care about Humanity.
    "I might be in Mud but that does not Make me a Wild Hog(pig)"
    “Any intelligent fool can make things bigger, more complex, and more violent. It takes a touch of genius — and a lot of courage to move in the opposite direction.”
    "The only thing that remains constant is change itself"
    May the force be with you,until our path or destiny bring us in tandem.
  • @Hoerich

    $ sudo service airtime-liquidsoap stop
    * Stopping Liquidsoap without notifying Monit process watchdog. If Monit is
    * running it will automatically bring the Liquidsoap back up. You probably want
    * 'stop-with-monit' instead of 'stop'.
    Stopping Liquidsoap Playout Engine: ('Error loading config file: %s', error(111, 'Connection refused'))
    Done.

    $ sudo service airtime-liquidsoap start
    * Starting Liquidsoap Playout Engine without Monit process watchdog. To make sure Monit is watching
    * Liquidsoap, use 'start-with-monit' instead of 'start'.
    Starting Liquidsoap Playout Engine: Unable to connect to the Airtime server.
    <urlopen error [Errno 111] Connection refused>
    traceback: Traceback (most recent call last):
      File "generate_liquidsoap_cfg.py", line 37, in <module>
        ss = ac.get_stream_setting()
      File "/usr/lib/airtime/api_clients/api_client.py", line 414, in get_stream_setting
        return self.services.get_stream_setting()
      File "/usr/lib/airtime/api_clients/api_client.py", line 137, in __call__
        f = urllib2.urlopen(req)
      File "/usr/lib/python2.7/urllib2.py", line 126, in urlopen
        return _opener.open(url, data, timeout)
      File "/usr/lib/python2.7/urllib2.py", line 400, in open
        response = self._open(req, data)
      File "/usr/lib/python2.7/urllib2.py", line 418, in _open
        '_open', req)
      File "/usr/lib/python2.7/urllib2.py", line 378, in _call_chain
        result = func(*args)
      File "/usr/lib/python2.7/urllib2.py", line 1207, in http_open
        return self.do_open(httplib.HTTPConnection, req)
      File "/usr/lib/python2.7/urllib2.py", line 1177, in do_open
        raise URLError(err)
    URLError: <urlopen error [Errno 111] Connection refused>

    Done.

    Since my first post, I rebuilt liquidsoap with aac+ and opus and also applied 2.4.1 .  So the post at http://forum.sourcefabric.org/discussion/15123/upgrade-to-2-3-0-on-precise-fails is no longer my solution.

    I followed https://wiki.sourcefabric.org/display/CC/Building+Liquidsoap+from+Source to compile liquidsoap.

    ./liquidsoap 'output.icecast(%mp3, mount="test.mp3", sine(), password="xxxx")' gets me a nice tone on my icecast server but airtime-liquidsoap will not start due to this error.

    Any ideas?


  • Also my media-monitor.log has this over and over:

    2013-08-30 14:56:00,151 INFO - [MainThread] [launcher.py : setup_global()] : LINE 110 - Attempting to set the locale...
    2013-08-30 14:56:00,157 INFO - [Thread-1] [watchersyncer.py : __init__()] : LINE 19 - Created timeout thread...
    2013-08-30 14:56:00,158 INFO - [Thread-1] [airtime.py : init_rabbit_mq()] : LINE 36 - Initializing RabbitMQ message consumer...
    2013-08-30 14:56:00,163 INFO - [Thread-1] [airtime.py : init_rabbit_mq()] : LINE 48 - Initialized RabbitMQ consumer.
    2013-08-30 14:56:00,163 DEBUG - [Thread-1] [api_client.py : __call__()] : LINE 134 - http://localhost:80/api/media-monitor-setup/format/json/api_key/VILIH3O4C098RRCX24FG
    2013-08-30 14:56:00,164 INFO - [Thread-1] [syncdb.py : reload_directories()] : LINE 49 - <urlopen error [Errno 111] Connection refused>

    The URL loads fine in my browser showing the two monitored folders.

    Post edited by Verheek at 2013-08-30 14:58:12
  • Ok.  It's fixed.  As per other posts, this error means that airtime can't connect to Apache to do it's API stuff.

    Once I figured that out I had to solve why. 

    I did sudo dpkg-reconfigure airtime and sudo apt-get --reinstall airtime.  Neither of these fixed it.

    I then tried the FQDN in /etc/apache2/sites-enabled/airtime-vhost and also played with /etc/hosts because I noticed it was resolving ::1 to localhost and apache didn't like the ipv6.  Removing localhost from the ipv6 section broke more.  In the end I have localhost in airtime-vhost and

    127.0.0.1       localhost               localhost.twr.pri  #this line had been the FQDN before.
    127.0.1.1       Mediashout.twr.pri      Mediashout

    10.10.10.131    Mediashout.twr.pri      Mediashout
    10.10.10.130    Mediastation.twr.pri    Mediastation

    # The following lines are desirable for IPv6 capable hosts
    ::1     localhost ip6-localhost ip6-loopback
    fe00::0 ip6-localnet
    ff00::0 ip6-mcastprefix
    ff02::1 ip6-allnodes
    ff02::2 ip6-allrouters

    After changing these, rebooting and running sudo apt-get --reinstall airtime it was working.  I just had to restart airtime-media-monitor and it was all good with AAC+ included!  :)


  • Vote Up0Vote Down hoerichhoerich
    Posts: 627Member, Airtime Moderator
    thx for reporting - marked as resolved
    Official Airtime Forum Manager
    --------------------------
    Most of the time an issue is located between keyboard and chair.