1.9.1 upgrade problems
  • Hi,

    this afternoon I tried to manually upgrade the production machine from 1.8.2 to 1.9.1 and have had many errors. First I tried following the instructions here:

    http://wiki.sourcefabric.org/display/CC/Upgrading+to+Airtime +1.9.1

    The install process generated some errors so I tried backing up the database by following these instructions:

    http://en.flossmanuals.net/airtime/backing-up-the-server/

    then installing 1.9.1 manually (clean install) and importing the database. 1.9.1 installs fine but when the database is imported, there are lots of errors like the country option in the support section showing only D or S (as previously mentioned here: http://forum.sourcefabric.org/index.php/t/3757/ )

    I have scheduled a show to be recorded and it records ok, but it is not imported into the database. Also, the Manage Media Folders screen in the web UI shows the following error:

    Current Storage Folder: Warning: Exception caught by form: Unable to execute SELECT statement [SELECT cc_music_dirs.ID, cc_music_dirs.DIRECTORY, cc_music_dirs.TYPE FROM cc_music_dirs WHERE cc_music_dirs.TYPE=:p1 LIMIT 1] [wrapped: SQLSTATE[42P01]: Undefined table: 7 ERROR: relation "cc_music_dirs" does not exist LINE 1: ... cc_music_dirs.DIRECTORY, cc_music_dirs.TYPE FROM cc_music_d... ^] Stack Trace: #0 /var/www/airtime/library/propel/runtime/lib/query/ModelCriteria.php(927): ModelCriteria->getSelectStatement(NULL) #1 /var/www/airtime/application/models/MusicDir.php(236): ModelCriteria->findOne() #2 /var/www/airtime/application/views/scripts/form/preferences_watched_dirs.phtml(19): MusicDir::getStorDir() #3 /var/www/airtime/library/Zend/View.php(108): include('/var/www/airtim...') #4 /var/www/airtime/library/Zend/View/Abstract.php(880): Zend_View->_run('/var/www/airtim...') #5 /var/www/airtime/library/Zend/View/Helper/Partial.php(105): Zend_View_Abstract->render('form/preference. in /var/www/airtime/library/Zend/Form.php on line 2692 


    So I'm about to reinstall 1.8.2 and import the schedule as I know this works (and we have show about to start), but would like to upgrade to 1.9.1 as this will help with other issues (such as using and external USB hard drive).

    Is there a way to upgrade from 1.8.2 to 1.9.1 or do I have to do a clean install and re-enter the entire schedule?

    thanks

    James

    PS here's screenshot:
    http://www.4thharmonic.com/images/Screen%20shot%202011-08-22 %20at%2017.48.00.png
  • 13 Comments sorted by
  • Also, here's the output from the attempted upgrade:

    sudo ./airtime-install
    
    ******************************** Install Begin *********************************
    
    *** Creating Virtualenv for Airtime ***
    Running virtualenv with interpreter /usr/bin/python2.6
    New python executable in /usr/lib/airtime/airtime_virtualenv/bin/python2.6
    Also creating executable in /usr/lib/airtime/airtime_virtualenv/bin/python
    Installing distribute.................................................................................................................................................................................done.
    
    *** Installing Python Libraries ***
    Unpacking ./airtime_virtual_env.pybundle
    Downloading/unpacking pyinotify
      Running setup.py egg_info for package pyinotify
    Downloading/unpacking kombu
      Running setup.py egg_info for package kombu
    Downloading/unpacking poster
      Running setup.py egg_info for package poster
    Downloading/unpacking anyjson
      Running setup.py egg_info for package anyjson
    Downloading/unpacking amqplib
      Running setup.py egg_info for package amqplib
    Downloading/unpacking mutagen
      Running setup.py egg_info for package mutagen
    Downloading/unpacking configobj
      Running setup.py egg_info for package configobj
    Installing collected packages: amqplib, anyjson, configobj, kombu, mutagen, poster, pyinotify
      Running setup.py install for amqplib
      Running setup.py install for anyjson
      Running setup.py install for configobj
      Running setup.py install for kombu
      Running setup.py install for mutagen
        changing mode of build/scripts-2.6/mutagen-pony from 644 to 755
        changing mode of build/scripts-2.6/moggsplit from 644 to 755
        changing mode of build/scripts-2.6/mutagen-inspect from 644 to 755
        changing mode of build/scripts-2.6/mid3iconv from 644 to 755
        changing mode of build/scripts-2.6/mid3v2 from 644 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
        changing mode of /usr/lib/airtime/airtime_virtualenv/bin/mutagen-inspect to 755
        changing mode of /usr/lib/airtime/airtime_virtualenv/bin/mid3iconv to 755
        changing mode of /usr/lib/airtime/airtime_virtualenv/bin/mid3v2 to 755
      Running setup.py install for poster
      Running setup.py install for pyinotify
    Successfully installed amqplib anyjson configobj kombu mutagen poster pyinotify
    Cleaning up...
    
    *** Patching Python Libraries ***
    
       ---Applying Patches for mutagen---
    patching file /usr/lib/airtime/airtime_virtualenv/lib/python2.6/site-packages/mutagen/mp3.py
    Hunk #2 succeeded at 169 (offset -4 lines).
    patching file /usr/lib/airtime/airtime_virtualenv/lib/python2.6/site-packages/mutagen/mp3.py
    Hunk #1 succeeded at 204 (offset -5 lines).
    
    *** Creating Pypo User ***
    Checking for user pypo
    User already exists.
    Airtime version 1.8.2 found.
    * Connected to database
    ******************************** Update Begin *********************************
    PHP Fatal error:  Cannot redeclare AirtimeInstall::CreateSymlinksToUtils() in /home/nts-studio/airtime-1.9.1/install_minimal/upgrades/airtime-1.9.0/airtime-upgrade.php on line 49
    
    *** Updating Api Client ***
    Copying directory /home/nts-studio/airtime-1.9.1/python_apps/api_clients to /usr/lib/airtime/api_clients
    
    *** Updating Pypo ***
    Starting Airtime Playout: Done.
    Installing 32-bit liquidsoap binary
    Copying directory /home/nts-studio/airtime-1.9.1/python_apps/pypo to /usr/lib/airtime/pypo/bin
    Setting permissions
    Installing pypo daemon
    Waiting for processes to start...
    
    *** Updating Recorder ***
    Starting Airtime Show Recorder: Done.
    Creating temporary media storage directory
    Creating log directories
    Removing old directory /usr/lib/airtime/show-recorder
    Copying directory /home/nts-studio/airtime-1.9.1/python_apps/show-recorder to /usr/lib/airtime/show-recorder
    Setting permissions
    Installing show-recorder daemon
    Waiting for processes to start...
    
    *** Updating Media Monitor ***
    Creating log directories
    exception:'log_dir'
    CPU                            = Intel(R) Pentium(R) 4 CPU 2.66GHz
    Total RAM                      = 506764 kB
    Free RAM                       = 16996 kB
    OS                             = Ubuntu 10.10 Intel 80386
    AIRTIME_CONFIG_FILES           = OK
    POSTGRESQL_DATABASE            = OK
    PYTHON_KOMBU_VERSION           = 1.2.0
    PYTHON_POSTER_VERSION          = 0.8.1
    RABBITMQ_SERVER                = OK
    AIRTIME_VERSION_URL            = http://localhost:80/api/version/api_key/%%api_key%%
    APACHE_CONFIGURED              = YES
    AIRTIME_VERSION                = 1.8.2
    PLAYOUT_ENGINE_PROCESS_ID      = 1837
    PLAYOUT_ENGINE_RUNNING_SECONDS = 304
    LIQUIDSOAP_PROCESS_ID          = 905
    LIQUIDSOAP_RUNNING_SECONDS     = 379
    ICECAST_PROCESS_ID             = 1448
    
      -- System setup looks OK!
    
    ******************************* Update Complete *******************************


    There's a fatal error reported - maybe this is the problem with the install_minimal upgrade?
  • Hi James,

    Yes there is an error in the upgrade script for 1.9.1. We have fixed it and are testing. Please stay tuned for 1.9.2.
    Airtime Pro Hosting: http://airtime.pro
  • Hi Martin,

    thanks for letting me know about this. I noticed 1.9.2 is available for download on the sourceforge site so I have just installed it, however I have some problems.

    The show-recorder doesn't seem to be working. I scheduled a show to be recorded and it doesn't record. (ps ax | grep ecasound returns no process).

    Also, liquidsoap seems to running at anything up to 50% of the cpu, is this normal? It's a Dell Inspiron 2400 PC with Intel(R) Pentium(R) 4 CPU 2.66GHz and 500mb RAM.

    thanks

    James
  • Vote Up0Vote Down Paul BaranowskiPaul Baranowski
    Posts: 389Member, Administrator, Sourcefabric Team
    On Fri, Aug 26, 2011 at 9:51 AM, James Dunn <
    airtime-support@lists.sourcefabric.org> wrote:

    > **
    > The show-recorder doesn't seem to be working. I scheduled a show to be
    > recorded and it doesn't record. (ps ax | grep ecasound returns no process).
    >

    Please send your logs (/var/logs/airtime/).


    Also, liquidsoap seems to running at anything up to 50% of the cpu, is this
    > normal? It's a Dell Inspiron 2400 PC with Intel(R) Pentium(R) 4 CPU 2.66GHz
    > and 500mb RAM.
    >

    On most processors it uses 4-15% of the CPU, so on that processor(that is a
    low end processor) I could imagine it uses 50%. Also, 500MB of RAM is
    cutting it pretty close - we have managed to run Airtime in 300-400MB on
    Ubuntu Server without a desktop, but if you are running a desktop that is
    too little memory.

    - Paul

  • Hi Paul,

    Please find attached the logs. There was a show scheduled for 19:00 - 21:00 yesterday which didn't record, and a show on now (10:00 to 12:00) which is also not recording, but I can't see any errors in the show-recorder log relating to this.

    We are running Ubuntu 10.10 with LXDE but I will look at removing the desktop as it is not needed, and also get some more RAM.

    thanks

    James

    EDIT: Ok, I just went through our schedule and clicked on 'edit show' to edit the next scheduled show, and then 'update'. I didn't change anything, but this show has now appeared in the show-recorder.log so I am expecting it to record. I think the schedule database is corrupted because there are shows in the past missing entirely, and those in the future are not being pushed. I guess I'll go through and update them all manually.
  • Ok I've still got problems with shows not being recorded.

    I've attached the latest show-recorder.log

    Also from show-recorder.log:

    ecasound -f:16,2,44100 -i alsa -o /var/tmp/airtime/show-recorder/2011-08-27-12:00:00.mp3,192000 -t:3600.0


    this show did not finish on time, it ended at 13:06 according to ls -l:

    ls -l /var/tmp/airtime/show-recorder/
    total 84384
    -rw-r--r-- 1 pypo pypo 86401346 2011-08-27 13:06 2011-08-27-12:00:00.mp3


    although it was imported into the database at the correct length.

    And the following show didn't record, please see the attached log.

    I'm thinking of downgrading from 1.9.2 to 1.8.2 - what is the recommended way to do this?

    James



  • Hi James,

    I'm looking into this recording problem. Just out of curiosity, is everything else working properly (scheduling playlists etc.)? Is Liquidsoap running at 50%? Was it running at this percentage before?
    Airtime Pro Hosting: http://airtime.pro
  • Hi Martin,

    Thanks for looking into this. I've not tried scheduling a playlist yet, but we have a prerecorded show due to go out tomorrow morning at 10:00 BST so I can confirm then.

    The shows scheduled for record are still not getting recorded so I ran
    sudo airtime-show-recorder restart
    just before the hour when the next show was due to start and it's now recording. I've set this command up as a crontab job so this might work for the meantime.

    Liquidsoap seems to occupy about 15-50% of the cpu but is currently consuming just under 50% (according to the top command). I don't think Liquidsoap was consuming quite so much cpu in 1.8.2 but I wasn't monitoring it that closely. It just seems a bit slower - I'm guessing it's a newer version as it offers shoutcast support...

    thanks

    James
  • Ok, so the restarting of airtime-show-recorder seems to record the shows:

    ls -l /var/tmp/airtime/show-recorder/
    total 521096
    -rw-r--r-- 1 pypo pypo 171621354 2011-08-28 00:11 2011-08-27-22:00:00.mp3
    -rw-r--r-- 1 pypo pypo 172781190 2011-08-28 02:18 2011-08-28-00:00:00.mp3
    -rw-r--r-- 1 pypo pypo  86402193 2011-08-28 11:00 2011-08-28-10:00:00.mp3
    -rw-r--r-- 1 pypo pypo 102776832 2011-08-28 12:11 2011-08-28-11:00:00.mp3
    


    but they are not imported into airtime, and therefore not uploaded to soundcloud. The prerecorded show went out as planned this morning.

    I have also noticed the following error message in sudo airtime-update-db-settings but don't know what it means:

    sudo airtime-update-db-settings 
    [sudo] password for nts-studio: 
    Airtime root folder found at /usr/share/airtime/
    Updating /usr/share/airtime//application/configs/application.ini
    Updating /usr/share/airtime//build.properties
    Updating /usr/share/airtime//runtime-conf.xml
    Regenerating propel-config.php
    Buildfile: /usr/share/airtime/library/propel/generator/build.xml
    [resolvepath] Resolved  to /usr/share/airtime/build/
    
    propel-project-builder > check-project-or-dir-set:
    
    
    propel-project-builder > check-project-set:
    
    
    propel-project-builder > set-project-dir:
    
    
    propel-project-builder > check-buildprops-exists:
    
    
    propel-project-builder > check-buildprops-for-propel-gen:
    
    
    propel-project-builder > check-buildprops:
    
    
    propel-project-builder > configure:
    
         [echo] Loading project-specific props from /usr/share/airtime/build//build.properties
     [property] Loading /usr/share/airtime/build/build.properties
    
    propel-project-builder > main:
    
        [phing] Calling Buildfile '/usr/share/airtime/library/propel/generator/build-propel.xml' with target 'main'
     [property] Loading /usr/share/airtime/library/propel/generator/./default.properties
    
    propel > mysqli-check:
    
    
    propel > main:
    
    [phingcall] Calling Buildfile '/usr/share/airtime/library/propel/generator/build-propel.xml' with target 'sql'
     [property] Loading /usr/share/airtime/library/propel/generator/./default.properties
    
    propel > check-run-only-on-schema-change:
    
    
    propel > sql-check:
    
    
    propel > pgsql-quoting-check:
    
         [warn] ATTENTION: It appears you are using PostgreSQL and you have identifier-quoting turned on.
         [warn] It is suggested that you disable identifier quoting when using PostgreSQL -- especially if you
         [warn] have case-sensitive columns in your database.
         [warn] 
         [warn] To disable identifier quoting, add the following property to your build.properties (or specify
         [warn] it using -D on commandline):
         [warn] 
         [warn] propel.disableIdentifierQuoting=true
         [warn] 
         [warn] You can ignore this warning if you understand the issues related to case-sensitivity and Propel's
         [warn] DDL-only implementation of identifier quoting.
    
    propel > mysqli-check:
    
    
    propel > sql:
    
         [echo] +------------------------------------------+
         [echo] |                                          |
         [echo] | Generating SQL for YOUR Propel project!  |
         [echo] |                                          |
         [echo] +------------------------------------------+
    [phingcall] Calling Buildfile '/usr/share/airtime/library/propel/generator/build-propel.xml' with target 'sql-template'
     [property] Loading /usr/share/airtime/library/propel/generator/./default.properties
    
    propel > sql-template:
    
    Execution of target "sql-template" failed for the following reason: /usr/share/airtime/library/propel/generator/build-propel.xml:194:10: No schema files were found (matching your schema fileset definition).
    [phingcall] /usr/share/airtime/library/propel/generator/build-propel.xml:194:10: No schema files were found (matching your schema fileset definition).
    Execution of target "sql" failed for the following reason: /usr/share/airtime/library/propel/generator/build-propel.xml:179:22: Execution of the target buildfile failed. Aborting.
    [phingcall] /usr/share/airtime/library/propel/generator/build-propel.xml:179:22: Execution of the target buildfile failed. Aborting.
    Execution of target "main" failed for the following reason: /usr/share/airtime/library/propel/generator/build-propel.xml:89:22: Execution of the target buildfile failed. Aborting.
        [phing] /usr/share/airtime/library/propel/generator/build-propel.xml:89:22: Execution of the target buildfile failed. Aborting.
    
    BUILD FINISHED
    
    Total time: 2.5471 seconds
    
  • James,

    Regarding the show that was last updated at 13:06 (according to ls -l). Are you sure this is a bug, the show was scheduled to start at 12:00, and has a size of 86MB. That looks to be correct to me.

    Looking into the problem with recorded shows not being uploaded to SoundCloud now.
    Airtime Pro Hosting: http://airtime.pro
  • As for SoundCloud uploads, I'm not having any problems so far. Is there anything out of the ordinary that you can think of regarding your setup?

    Also as Paul said, this might simply be an issue of not enough system RAM. Is it possible to test on a more powerful system?
    Airtime Pro Hosting: http://airtime.pro
  • Hi Martin,

    thanks for the reply. You're right, the show is actually the correct length according to:
    sox --info /var/tmp/airtime/show-recorder/2011-08-27-12:00:00.mp3

    Prior to 1.9.3, I always used ls -l to check the length of show as the last time the file was modified was always the time the show finished so in 1.9.3, something modified the file after it had finished recording. Also, I'm sure that when I ran:
    ps ax | grep ecasound
    just after the hour, the show was still recording and growing in size though...

    Anyway, I've now reinstalled 1.8.2 as this was reliably recording and uploading all our live shows and playing out prerecorded content fine. I am extremely reluctant to upgrade again anytime soon as 1.9.x was a major PITA. Many shows were lost, the database has to be re-imported (work still to be done) and not to mention the many hours spent trying to figure out what was going on!

    FYI, liquidsoap is running at no more than 15% of the cpu in 1.8.2 (another reason not to upgrade) but would also drop out randomly in 1.9.3 (no mount in icecast, etc), perhaps caused by insufficient memory or something else, I'm not sure.

    So yes maybe 500MB is not enough for 1.9.x. I do have another machine with more ram at home, so I might test this at some point, but not in the immediate future.

    many thanks for your help with what is otherwise some excellent software.

    James
  • All your problems sound like not enough RAM was available. Yes 1.9.x uses more RAM since we are using some virtualization so that it doesn't matter what version of Python + Python libraries you have installed etc.

    If you upgrade your RAM, let us know if the problems persist.
    Airtime Pro Hosting: http://airtime.pro