Porting Airtime to CentOS
  • OK - I know this is completely unsupported, but I've got free root access to an insanely over-powered CentOS 6.2 server for the foreseeable future, and I'd like to move our station's Airtime setup out of my basement and into this data center.

    I've done some adjustments to the script that installs all the dependencies that Martin was kind enough to put together a while back. I've managed to get the php components to work properly, and I'm in the process of fixing the init.d scripts so that the airtime processes will survive a reboot of the server. I can access the website, and I can change preferences, but I'm running into issues with the background processes. If you look at the attached file you can see that the rabbitMQ process is reporting properly, but the other 3 background processes are not communicating properly with the web components.

    I haven't had the time to go through how exactly all the parts and pieces of Airtime fit together and pass information back and forth, so I'm at a loss as to what's going on here. I'm more than willing to continue to hammer away at this, I'm just hoping that someone could at least point me in the right direction. The server I'm using is locked down fairly secure, so it could just be a firewall/security issue, but I dont' even know where to start.

    Any suggestions are welcome.

    Thanks!
  • 23 Comments sorted by
  • Glad to hear you got everything working!

    Creating an RPM for CentOS from that script is on my list of TODO's but thr process is halted temporarily for a few weeks (it's a side project of mine :)

    If you could share your init.d scripts as well as any other configuration you had to make on top of the base shell script on github, it would be very much appreciated :)

    Airtime Pro Hosting: http://airtime.pro
  • And I know someone will ask for this, so here's the output of airtime-check-system:

    [root@obp4-brian utils]# airtime-check-system 
    AIRTIME_SERVER_RESPONDING      = OK
    KERNEL_VERSION                 = 2.6.32-279.14.1.el6.x86_64
    MACHINE_ARCHITECTURE           = x86_64
    TOTAL_MEMORY_MBYTES            = 16329420
    TOTAL_SWAP_MBYTES              = 2097144
    AIRTIME_VERSION                = 2.2.0
    sh: lsb_release: command not found
    OS                             = UNKNOWN x86_64
    CPU                            = Intel(R) Xeon(R) CPU           E5335  @ 2.00GHz
    WEB_SERVER                     = Apache
    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
    -- 2012-11-29 20:06:25,193 INFO - [pypofetch.py : main() : line 523] - Loop #237
    -- 2012-11-29 20:06:25,195 DEBUG - [pypopush.py : handle_new_schedule() : line 232] - []
    -- 2012-11-29 20:06:25,195 DEBUG - [pypopush.py : is_correct_current_item() : line 212] - Is current item correct?: True
    -- 2012-11-29 20:06:25,195 DEBUG - [pypopush.py : main() : line 104] - Next schedule chain: None
    -- 2012-11-29 20:06:25,195 DEBUG - [pypopush.py : main() : line 115] - Blocking indefinitely since no show scheduled
    -- 
    -- 
    LIQUIDSOAP_PROCESS_ID          = FAILED
    LIQUIDSOAP_RUNNING_SECONDS     = 0
    LIQUIDSOAP_MEM_PERC            = 0%
    LIQUIDSOAP_CPU_PERC            = 0%
    -- Displaying log file /var/log/airtime/pypo-liquidsoap/ls_script.log
    -- 2012/11/29 20:06:25 [server:3] New client: obp4-brian.nexcess.net.
    -- 2012/11/29 20:06:25 [server:3] Client obp4-brian.nexcess.net disconnected.
    -- 2012/11/29 20:06:25 [server:3] New client: obp4-brian.nexcess.net.
    -- 2012/11/29 20:06:25 [lang:3] dynamic_source.get_id
    -- 2012/11/29 20:06:25 [server:3] Client obp4-brian.nexcess.net disconnected.
    -- 
    -- 
    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
    -- 2012-11-29 20:02:56,739 INFO - [Thread-2] [replaygainupdater.py : main()] : LINE 61 - Processed: 0 songs
    -- 2012-11-29 20:07:56,839 INFO - [Thread-2] [replaygainupdater.py : run()] : LINE 69 - Runnning replaygain updater
    -- 2012-11-29 20:07:57,050 INFO - [Thread-2] [api_client.py : get_files_without_replay_gain_value()] : LINE 697 - update file system mount: []
    -- 2012-11-29 20:07:57,144 DEBUG - [Thread-2] [api_client.py : update_replay_gain_values()] : LINE 720 -
    -- 2012-11-29 20:07:57,144 INFO - [Thread-2] [replaygainupdater.py : main()] : LINE 61 - Processed: 0 songs
    -- 
    -- 
    RABBITMQ_PROCESS_ID            = 25191
    RABBITMQ_RUNNING_SECONDS       = 206816
    RABBITMQ_MEM_PERC              = 0.2%
    RABBITMQ_CPU_PERC              = 0.0%
    -- There appears to be a problem with your Airtime installation.

  • Hi John,

    Is your airtime instance actually not working? From those small out put log files, I can see they are communicating with the server. What is not working in the actual system?
  • Sorry - to be more descriptive:

    1) I'm not able to see the status of the playout, liquidsoap, or media-monitor systems, either from the web interface or from the command-line utility.
    2) I'm not able to add files to the library, which means there's something not working right with the media-monitor component. I can add files to the web interface, upload them (the data does actually transfer), but they never appear in the library - the library stays empty.
    3) I have not yet tested the output, as I have no media to play.

    I'm approaching this one piece at a time - right now I'm trying to get status reporting to work properly, because if that works I'll be able to better see what's working and not working. :)
  • Hi!

    First, please install "lsb_release", since it appears to be missing. Not sure what package this is part of in Redhat, but it defn should exist.

    I suspect those components show as failed because we use Monit to tell us the status of each process, and you probably don't have it installed. Luckily monit is part of the EPEL repository:


    Let us know how far this gets you :)
    Airtime Pro Hosting: http://airtime.pro
  • Well, I installed lsb_release, and when checking to see if monit was installed I saw that it was already there and doing its job appropriately. That even tipped me off to my issue with the media-monitor so I was able to fix that (simple permissions error on the storage folder.)

    And, After some testing I'm now able to upload content, schedule content, broadcast, accept incoming streams, etc. At this point it looks like the only thing that -isn't- working is the status page. That page still looks exactly like the screenshot I posted above.

    It seems to stem from the api's ability to pull the data from monit.

    Here's the output from monit status:

    /etc/monit/conf.d/monit-airtime-generic.cfg:5: Warning: credentials for user admin were already added, entry ignored 'LO66TTNL4W'
    The Monit daemon 5.4 uptime: 4h 7m 

    Process 'rabbitmq-server'
      status                            Running
      monitoring status                 Monitored
      pid                               25191
      parent pid                        25188
      uptime                            3d 12h 54m 
      children                          2
      memory kilobytes                  32168
      memory kilobytes total            33508
      memory percent                    0.1%
      memory percent total              0.2%
      cpu percent                       0.0%
      cpu percent total                 0.0%
      data collected                    Fri, 30 Nov 2012 23:37:17

    Process 'airtime-playout'
      status                            Running
      monitoring status                 Monitored
      pid                               4599
      parent pid                        1
      uptime                            3d 11h 15m 
      children                          0
      memory kilobytes                  18504
      memory kilobytes total            18504
      memory percent                    0.1%
      memory percent total              0.1%
      cpu percent                       0.0%
      cpu percent total                 0.0%
      data collected                    Fri, 30 Nov 2012 23:37:17

    Process 'airtime-media-monitor'
      status                            Running
      monitoring status                 Monitored
      pid                               551
      parent pid                        1
      uptime                            1h 30m 
      children                          0
      memory kilobytes                  19380
      memory kilobytes total            19380
      memory percent                    0.1%
      memory percent total              0.1%
      cpu percent                       0.0%
      cpu percent total                 0.0%
      data collected                    Fri, 30 Nov 2012 23:37:17

    Process 'airtime-liquidsoap'
      status                            Running
      monitoring status                 Monitored
      pid                               5477
      parent pid                        1
      uptime                            1m 
      children                          0
      memory kilobytes                  26916
      memory kilobytes total            26916
      memory percent                    0.1%
      memory percent total              0.1%
      cpu percent                       0.3%
      cpu percent total                 0.3%
      data collected                    Fri, 30 Nov 2012 23:37:17

    System 'system_obp4-brian.nexcess.net'
      status                            Running
      monitoring status                 Monitored
      load average                      [0.00] [0.04] [0.06]
      cpu                               2.3%us 0.3%sy 0.0%wa
      memory usage                      1652016 kB [10.1%]
      swap usage                        0 kB [0.0%]
      data collected                    Fri, 30 Nov 2012 23:37:17


    And here's the output from airtime-check-status:

    AIRTIME_SERVER_RESPONDING      = OK
    KERNEL_VERSION                 = 2.6.32-279.14.1.el6.x86_64
    MACHINE_ARCHITECTURE           = x86_64
    TOTAL_MEMORY_MBYTES            = 16329420
    TOTAL_SWAP_MBYTES              = 2097144
    AIRTIME_VERSION                = 2.2.0
    OS                             = "CentOS release 6.3 (Final)" x86_64
    CPU                            = Intel(R) Xeon(R) CPU           E5335  @ 2.00GHz
    WEB_SERVER                     = Apache
    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
    -- 2012-11-30 23:35:38,625 INFO - [pypofetch.py : main() : line 523] - Loop #384
    -- 2012-11-30 23:35:38,628 DEBUG - [pypopush.py : handle_new_schedule() : line 232] - []
    -- 2012-11-30 23:35:38,628 DEBUG - [pypopush.py : is_correct_current_item() : line 212] - Is current item correct?: True
    -- 2012-11-30 23:35:38,628 DEBUG - [pypopush.py : main() : line 104] - Next schedule chain: None
    -- 2012-11-30 23:35:38,628 DEBUG - [pypopush.py : main() : line 115] - Blocking indefinitely since no show scheduled
    -- 
    -- 
    LIQUIDSOAP_PROCESS_ID          = FAILED
    LIQUIDSOAP_RUNNING_SECONDS     = 0
    LIQUIDSOAP_MEM_PERC            = 0%
    LIQUIDSOAP_CPU_PERC            = 0%
    -- Displaying log file /var/log/airtime/pypo-liquidsoap/ls_script.log
    -- 2012/11/30 23:35:40 [lang:3] /usr/lib/airtime/pypo/bin/liquidsoap_scripts/notify.sh --source-name=master_dj --source-status=true &
    -- 2012/11/30 23:35:40 [threads:3] Created thread "harbor source feeding" (2 total).
    -- 2012/11/30 23:35:40 [master_harbor:3] Decoding...
    -- 2012/11/30 23:35:42 [mksafe:3] Switch to audio_to_stereo_5996 with transition.
    -- 2012/11/30 23:35:42 [map_metadata_6003:3] Inserting missing metadata.
    -- 
    -- 
    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
    -- 2012-11-30 23:32:13,433 INFO - [Thread-2] [replaygainupdater.py : main()] : LINE 61 - Processed: 0 songs
    -- 2012-11-30 23:37:13,533 INFO - [Thread-2] [replaygainupdater.py : run()] : LINE 69 - Runnning replaygain updater
    -- 2012-11-30 23:37:13,744 INFO - [Thread-2] [api_client.py : get_files_without_replay_gain_value()] : LINE 697 - update file system mount: []
    -- 2012-11-30 23:37:13,839 DEBUG - [Thread-2] [api_client.py : update_replay_gain_values()] : LINE 720 -
    -- 2012-11-30 23:37:13,840 INFO - [Thread-2] [replaygainupdater.py : main()] : LINE 61 - Processed: 0 songs
    -- 
    -- 
    RABBITMQ_PROCESS_ID            = 25191
    RABBITMQ_RUNNING_SECONDS       = 305691
    RABBITMQ_MEM_PERC              = 0.2%
    RABBITMQ_CPU_PERC              = 0.0%
    -- There appears to be a problem with your Airtime installation.

  • And..... I found the solution.

    The default install of Monit on centos had restricted the process to only permit access from localhost to localhost. I disabled those lines in the monit.conf file and everything works great now. Not sure why that would have an effect, but as long as it works I dont' really care about the why. ;)
  • Is there any update on this as I've tried everything I can think of to get Airtime up and running on CentOS with no luck at all. I can only get as far as downloading it and unzipping it into a folder in the root. I'm far from being an expert when it comes to servers and centOS so any help would be appreciated.
  • ATM you need to have some advanced knowledge to install on CentOS.  As John has shown, it's not impossible :)

    Otherwise use Debian/Ubuntu. The install is as easy as installing a single package. 
    Airtime Pro Hosting: http://airtime.pro
  • +Martin, Thanks, I'll wait it out and hopefully one day there will be a native CentOS installation. I don't fancy messing with my server.
  • Well, I can't really test this out on my production server, but I ran into enough headaches doing the update form 2.2.1 to 2.3.0 that I built a CentOS virtual machine in parallels so that I can test out the install and update scripts.

    Once I get the kinks worked out of it I'll post the changes I've made here.

    If there's enough interest in CentOS as a platform I'll see what I can do about actually contributing to the source so we can have a dedicated CentOS option in the build code.

    Also - I've noticed that the source code is geared strictly towards install on a dedicated machine, so I've got some tips/techniques to share for getting it to work on a server that also hosts other websites/services.

  • Vote Up0Vote Down Albert FRAlbert FR
    Posts: 1,978Member, Airtime Moderator
    you can do that (airtime + web+ mail + ...)
    I do :D
  • It was more the problems I ran into because I've got multiple websites - so I have to specifically call out the full URL in the main and API config files - and I forget every time I upgrade. Just trying to be better about documenting all the little adjustments I need to make so hopefully someone else can be spared the trouble. That someone probably being me the next time there's an update. :)
  • >
    > Also - I've noticed that the source code is geared strictly towards
    > install on a dedicated machine, so I've got some tips/techniques to share
    > for getting it to work on a server that also hosts other websites/services.


    That would be extremely helpful. As for interest on CentOS, we get asked
    this question a lot.

    M


    On Fri, Feb 15, 2013 at 9:38 AM, John Bowman <<br />airtime-support@lists.sourcefabric.org> wrote:

    > Well, I can't really test this out on my production server, but I ran into
    > enough headaches doing the update form 2.2.1 to 2.3.0 that I built a CentOS
    > virtual machine in parallels so that I can test out the install and update
    > scripts.
    >
    > Once I get the kinks worked out of it I'll post the changes I've made here.
    >
    > If there's enough interest in CentOS as a platform I'll see what I can do
    > about actually contributing to the source so we can have a dedicated CentOS
    > option in the build code.
    >
    > Also - I've noticed that the source code is geared strictly towards
    > install on a dedicated machine, so I've got some tips/techniques to share
    > for getting it to work on a server that also hosts other websites/services.
    >
    >
    Airtime Pro Hosting: http://airtime.pro
  • Vote Up0Vote Down Albert FRAlbert FR
    Posts: 1,978Member, Airtime Moderator
    @Martin have you a list of airtime dependencies with minimal version available somewhere ?
  • Albert FR said:

    @Martin have you a list of airtime dependencies with minimal version available somewhere ?



    That would help significantly. Right now I'm going of the centos.sh script that Martin was kind enough to put together for airtime 2.2.0 - which is how I missed the silan install.
  • Take a look here:


    These are the official Debian packages we rely on, and is the most up-to-date.
    Airtime Pro Hosting: http://airtime.pro
  • Vote Up0Vote Down Albert FRAlbert FR
    Posts: 1,978Member, Airtime Moderator
    you have everything you need

    and thanks Martin :D
  • thank you!!
  • Vote Up0Vote Down Albert FRAlbert FR
    Posts: 1,978Member, Airtime Moderator
    We waiting for your return John ;-)
  • It's going to be a bit - probably a week or two.
  • I have a VPS with CentOS 6.4 32-bit and was going to attempt this install.

    I am currently hosting some websites as well as WHM and want to make sure I got some good backups before I break everything lol.

    I was just checking in to see if any progress has been made on a simpler installation method before I proceeded.


  • Gentlemen,

    We are small non-profit organization and as per our plan we are going to run our special Internet & FM Radio Broadcast.

    As I was not able to find 'ready to go' package, I am going to compile Airtime to be used in CentOS 6.3 32bit (i686).

    Could some of you advise the source I can use for this?

    Thank you in advance.

    P.S. Liquidsoap  v1.1.1 we already sucessfully compiled and it is currently in testing stage.

    P.P.S. If some one interesting in the same we can combine this effort.



     

    www.actionsch.com - Bringing talents in life!
    + Action Radio School +