Airtime Down after upgrade to 12.04
  • I cannot get Airtime back up and running again after an upgrade of Ubuntu from 10.04 to 12.04.

    At one stage in the stations development, the installation may have been performed with a tar.gz rather than the .deb package, but I have run the uninstaller and to no avail.

    I have uninstalled all packages, including the database (after doing a pg_dump for backup) to attempt a clean install but I keep getting errors in the install.  Here is the current status. also below, I'll try to copy the errors on install.

    What do I do now?  Is this a postgresql config issue?



    AIRTIME_SERVER_RESPONDING      = OK
    KERNEL_VERSION                 = UNKNOWN
    MACHINE_ARCHITECTURE           = UNKNOWN
    TOTAL_MEMORY_MBYTES            = UNKNOWN
    TOTAL_SWAP_MBYTES              = UNKNOWN
    AIRTIME_VERSION                = UNKNOWN
    OS                             = Ubuntu 12.04.2 LTS i686
    CPU                            = AMD Sempron(tm) Processor 3000+
    WEB_SERVER                     = Apache/2.2.22 (Ubuntu)
    PLAYOUT_ENGINE_PROCESS_ID      = FAILED
    PLAYOUT_ENGINE_RUNNING_SECONDS = 0
    PLAYOUT_ENGINE_MEM_PERC        = 0%
    PLAYOUT_ENGINE_CPU_PERC        = 0%
    -- Displaying log file /var/log/airtime/pypo/pypo.log
    --     raise HTTPError(req.get_full_url(), code, msg, hdrs, fp)
    -- HTTPError: HTTP Error 503: Service Unavailable
    -- 
    -- 2013-03-26 21:18:03,787 INFO - [api_client.py : is_server_compatible() : line 162] - Unable to get Airtime version number.
    -- 
    -- 
    -- 
    LIQUIDSOAP_PROCESS_ID          = FAILED
    LIQUIDSOAP_RUNNING_SECONDS     = 0
    LIQUIDSOAP_MEM_PERC            = 0%
    LIQUIDSOAP_CPU_PERC            = 0%
    tail: cannot open `/var/log/airtime/pypo-liquidsoap/ls_script.log' for reading: No such file or directory
    -- Displaying log file /var/log/airtime/pypo-liquidsoap/ls_script.log
    -- 
    -- 
    MEDIA_MONITOR_PROCESS_ID       = FAILED
    MEDIA_MONITOR_RUNNING_SECONDS  = 0
    MEDIA_MONITOR_MEM_PERC         = 0%
    MEDIA_MONITOR_CPU_PERC         = 0%
    -- Displaying log file /var/log/airtime/media-monitor/media-monitor.log
    --   File "/usr/lib/python2.7/urllib2.py", line 527, in http_error_default
    --     raise HTTPError(req.get_full_url(), code, msg, hdrs, fp)
    -- HTTPError: HTTP Error 503: Service Unavailable
    -- 
    -- 2013-03-26 21:18:05,825 INFO - [Thread-1] [syncdb.py : reload_directories()] : LINE 49 - HTTP Error 503: Service Unavailable
    -- 
    -- 
    -- There appears to be a problem with your Airtime installation.

    Error from within install:

    * Database Installation
     * Creating Airtime database user
      * Database user 'airtime' created.
     * Creating Airtime database
    Unable to open PDO connection [wrapped: SQLSTATE[08006] [7] could not connect to server: Connection refused
    Is the server running on host "localhost" (::1) and accepting
    TCP/IP connections on port 5432?
    could not connect to server: Connection refused
    Is the server running on host "localhost" (127.0.0.1) and accepting
    TCP/IP connections on port 5432?]

  • 18 Comments sorted by
  • Vote Up0Vote Down Cliff WangCliff Wang
    Posts: 339Member, Sourcefabric Team
    How did you do a clean install? apt-get,dpkg -i or anything else?
    Cloud Radio -> http://airtime.pro
  • Vote Up0Vote Down Albert FRAlbert FR
    Posts: 1,978Member, Airtime Moderator
    or modified postgresql installation (user/password) ?
    or modified airtime-vhost in apache ?
  • To clean out the old packages, apt-get remove --purge [packagename]
    To remove the old tar installed files, airtime-uninstall from the install-minimal directory.

    Why is it not running. ps aux shows postgres running, but is it accepting connections? Another post said to look for port 5432, but nmap localhost says its not listening there or on the eth0 port.

    What other diagnostic steps can I take?

  • Vote Up0Vote Down Albert FRAlbert FR
    Posts: 1,978Member, Airtime Moderator
    yes, but for reinstall Airtime have you also reinstall postgresql and others packages ?

    look at : http://en.flossmanuals.net/airtime-en-2-3/automated-installation/
  • Yes, I did remove and purge postgresql, the other packages like icecast are dependencies of the ubuntu 12.04 deb for airtime 2.3.1-1
    It now fails during installation and dpkg --configure -a does not solve it.

    radio@radio-scheduler:~$ sudo dpkg --configure -a
    Setting up airtime (2.3.1-1) ...
    Setting up apache2...
    Site airtime-vhost disabled.
    To activate the new configuration, you need to run:
      service apache2 reload
    Enabling site airtime-vhost.
    To activate the new configuration, you need to run:
      service apache2 reload
    Module rewrite already enabled
    Site default already disabled
    Configuring php5...
     * Restarting web server apache2                                                                                                                                                                          apache2: Could not reliably determine the server's fully qualified domain name, using 192.168.1.3 for ServerName
     ... waiting apache2: Could not reliably determine the server's fully qualified domain name, using 192.168.1.3 for ServerName
                                                                                                                                                                                                       [ OK ]
    Setting up icecast2...
    Restarting icecast2: Starting icecast2
    Detaching from the console
    icecast2.
    Setting up monit configuration...
    /etc/init.d/monit: 39: [: restart: unexpected operator
    /etc/init.d/monit: 39: [: stop: unexpected operator
     * Stopping daemon monitor monit                                                                                                                                                                   [ OK ] 
    /etc/init.d/monit: 39: [: start: unexpected operator
     * Starting daemon monitor monit                                                                                                                                                                   [ OK ] 
    Liquidsoap symlink points to the right place!
    * Making sure /etc/default/locale is set properly
    LANG="en_NZ.UTF-8"
    * Checking for existing Airtime installation...
     * None found.
    * Temporarily stopping any previous running services

    ******************************** Install Begin *********************************
    Ensuring python-virtualenv version > 1.4.8...Success!

    *** Creating Virtualenv for Airtime ***
    Already using interpreter /usr/bin/python
    The --no-site-packages flag is deprecated; it is now the default behavior.
    New python executable in /usr/lib/airtime/airtime_virtualenv/bin/python
    Installing distribute.............................................................................................................................................................................................done.
    Installing pip...............done.

    *** Installing Python Libraries ***
    Unpacking /var/lib/airtime/tmp/python_apps/python-virtualenv/airtime_virtual_env.pybundle
    Downloading/unpacking configobj
      Running setup.py egg_info for package configobj
        
    Downloading/unpacking pytz
      Running setup.py egg_info for package pytz
        
        warning: no files found matching '*.pot' under directory 'pytz'
        warning: no previously-included files found matching 'test_zdump.py'
    Downloading/unpacking docopt
      Running setup.py egg_info for package docopt
        
    Downloading/unpacking PyDispatcher
      Running setup.py egg_info for package PyDispatcher
        
        warning: no previously-included files matching '*.bat' found anywhere in distribution
        warning: no previously-included files matching './CVS' found anywhere in distribution
        warning: no previously-included files matching '.cvsignore' found anywhere in distribution
    Downloading/unpacking amqplib
      Running setup.py egg_info for package amqplib
        
    Downloading/unpacking mutagen
      Running setup.py egg_info for package mutagen
        
    Downloading/unpacking kombu
      Running setup.py egg_info for package kombu
        
    Downloading/unpacking pyinotify
      Running setup.py egg_info for package pyinotify
        
    Downloading/unpacking anyjson
      Running setup.py egg_info for package anyjson
        
    Requirement already satisfied (use --upgrade to upgrade): argparse in /usr/lib/python2.7
    Downloading/unpacking poster
      Running setup.py egg_info for package poster
        
    Requirement already satisfied (use --upgrade to upgrade): wsgiref in /usr/lib/python2.7
    Installing collected packages: configobj, pytz, docopt, PyDispatcher, amqplib, mutagen, kombu, pyinotify, anyjson, poster
      Running setup.py install for configobj
        
      Running setup.py install for pytz
        
        warning: no files found matching '*.pot' under directory 'pytz'
        warning: no previously-included files found matching 'test_zdump.py'
      Running setup.py install for docopt
        
      Running setup.py install for PyDispatcher
        
        warning: no previously-included files matching '*.bat' found anywhere in distribution
        warning: no previously-included files matching './CVS' found anywhere in distribution
        warning: no previously-included files matching '.cvsignore' found anywhere in distribution
      Running setup.py install for amqplib
        
      Running setup.py install for mutagen
        changing mode of build/scripts-2.7/mid3v2 from 644 to 755
        changing mode of build/scripts-2.7/mid3iconv from 644 to 755
        changing mode of build/scripts-2.7/mutagen-inspect from 644 to 755
        changing mode of build/scripts-2.7/mutagen-pony from 644 to 755
        changing mode of build/scripts-2.7/moggsplit from 644 to 755
        
        changing mode of /usr/lib/airtime/airtime_virtualenv/bin/mid3v2 to 755
        changing mode of /usr/lib/airtime/airtime_virtualenv/bin/mid3iconv to 755
        changing mode of /usr/lib/airtime/airtime_virtualenv/bin/mutagen-inspect to 755
        changing mode of /usr/lib/airtime/airtime_virtualenv/bin/mutagen-pony to 755
        changing mode of /usr/lib/airtime/airtime_virtualenv/bin/moggsplit to 755
      Running setup.py install for kombu
        
      Running setup.py install for pyinotify
        
      Running setup.py install for anyjson
        
      Running setup.py install for poster
        
    Successfully installed configobj pytz docopt PyDispatcher amqplib mutagen kombu pyinotify anyjson poster
    Cleaning up...
    * Checking for user pypo
    User already exists.
    * Creating INI files
    * Initializing INI files
    * Airtime Version: 2.3.1
    * Storage directory setup
    * Skipping directory already exists: /srv/airtime/stor
    * Giving Apache permission to access /srv/airtime/stor
    * Skipping directory already exists: /srv/airtime/stor/organize
    * Giving Apache permission to access /srv/airtime/stor/organize
    * Checking database for correct encoding
     * Unfortunately your postgresql database has not been created using a UTF-8 encoding.
     * As of Airtime 2.1, installs will fail unless the encoding has been set to UTF-8. Please verify this is the case
     * and try the install again
    There was an error during install. Exit code 1
    dpkg: error processing airtime (--configure):
     subprocess installed post-installation script returned error exit status 1
    Errors were encountered while processing:
     airtime

  • Vote Up0Vote Down Albert FRAlbert FR
    Posts: 1,978Member, Airtime Moderator
    * Unfortunately your postgresql database has not been created using a UTF-8 encoding.

    you have locales problem

    correct them and retry
  • Vote Up0Vote Down Albert FRAlbert FR
    Posts: 1,978Member, Airtime Moderator
    look this page : http://perlgeek.de/en/article/set-up-a-clean-utf8-environment

    purge your postgresql install before, and reinstall it
  • As far as I could tell, postgres was a stock standard install with Ubuntu 12.04. Is there a postgres.conf item I need to look for? My system locale seems ok, I'm doing 99% of this via bash command line, I'm fine with conf edits - pointers?
    Or does the Ubuntu airtime deb file contain insufficient scripting to create the airtime database with the correct encoding?
  • ok, ill read the article first
  • Make sure you don't have two Postgresql servers running. An upgrade to
    12.04 can cause this.

    What's the output of "sudo netstat -tlnp" ?


    On Wed, Mar 27, 2013 at 3:37 PM, Barry Clearwater <<br />airtime-support@lists.sourcefabric.org> wrote:

    > ok, ill read the article first
    >
    >
    Airtime Pro Hosting: http://airtime.pro
  • Install is not actually completing now so no postgresql ports with netstat.
    Active Internet connections (only servers)
    Proto Recv-Q Send-Q Local Address           Foreign Address         State       PID/Program name
    tcp        0      0 0.0.0.0:22              0.0.0.0:*               LISTEN      1019/sshd       
    tcp        0      0 127.0.0.1:631           0.0.0.0:*               LISTEN      867/cupsd       
    tcp        0      0 127.0.0.1:6010          0.0.0.0:*               LISTEN      15874/3         
    tcp        0      0 0.0.0.0:445             0.0.0.0:*               LISTEN      782/smbd        
    tcp        0      0 0.0.0.0:8000            0.0.0.0:*               LISTEN      21662/icecast2  
    tcp        0      0 0.0.0.0:53604           0.0.0.0:*               LISTEN      1888/beam       
    tcp        0      0 0.0.0.0:139             0.0.0.0:*               LISTEN      782/smbd        
    tcp        0      0 0.0.0.0:80              0.0.0.0:*               LISTEN      21629/apache2   
    tcp        0      0 0.0.0.0:4369            0.0.0.0:*               LISTEN      1856/epmd       
    tcp6       0      0 :::22                   :::*                    LISTEN      1019/sshd       
    tcp6       0      0 ::1:631                 :::*                    LISTEN      867/cupsd       
    tcp6       0      0 ::1:6010                :::*                    LISTEN      15874/3         
    tcp6       0      0 :::5672                 :::*                    LISTEN      1888/beam       
    radio@radio-scheduler:~$ 

    Had already gotten rid of postgresql 8, I'm aware of that issue.
    I've fixed the locales as per the web page suggestion, however looking at the install script as it flies by, Postgresql appears to be querying hunspell to check locales, our en_NZ does not appear. Or is this just dictionaries?

    Setting up postgresql-common (129ubuntu1) ...
    Building PostgreSQL dictionaries from installed myspell/hunspell packages...
      en_au
      en_ca
      en_gb
      en_us
      en_za
    Setting up postgresql-9.1 (9.1.8-0ubuntu12.04) ...

  • OK, but your postgresql needs to be UTF-8 otherwise Airtime will not function properly. Airtime needs to be able to store not just ASCII characters.

    Run the following command to verify the encoding your database is using:

    psql -c 'SHOW SERVER_ENCODING' postgres
    Airtime Pro Hosting: http://airtime.pro
  • ~$ psql -c 'SHOW SERVER_ENCODING' postgres
    psql: could not connect to server: No such file or directory
    Is the server running locally and accepting
    connections on Unix domain socket "/var/run/postgresql/.s.PGSQL.5432"?
  • It doesn't look like the airtime setup has properly configured postgresql, as its not listening.
    In fact its not running at all, which means to me that its not configured
  • And yes its not UTF8 but seeing as it was setup using the airtime installer, WHY NOT!! ??
    I don't have control over this
    HELP!
  • Ok, can someone tell me how to download the 2.0.3 deb file so I can install an older version from scratch, restore the database and then upgrade?  My postgres pg_dump file will not restore and run into a clean version of the airtime install so our school is still off-air.

    My system is now completely screwed and i can't get it back to a working condition. I'm a little disappointed that all I got told was that my Postgresql has to be UTF-8, not pointed at a howto, or other forum comment on how to fix it.  I don't know yet why the upgrade failed, could it be that the scripts don't take enough into account?

    So please - an old version? A Deb file?
  • You can find the deb file in 


    Airtime Pro Hosting: http://airtime.pro
  • Thanks. Never fully resolved.
    Backed up all our music, built a new machine from scratch and started afresh. Bit disappointed on backup and restore not fully working as one expects.

    Overall, the new version of Airtime is good but we have an issue with liquid soap, so I'll have to post a new question;