Airtime Uploads Blank Audio Files
  • Hello all. I've installed airtime on my decicated server. Since I host my own website on apache, there's no need to do a virtual host for airtime, I merely copy the main folder in my server directory and can log in. The problem that I'm having is when I try to add media, the files appear to upload fine to the default directory, but the library and default storage remain blank.

    Here is my media monitlor log

    Restarting media monitor curiously brings up an error saying can't kill process. Can anyone help?
  • 31 Comments sorted by
  • Vote Up0Vote Down Cliff WangCliff Wang
    Posts: 339Member, Sourcefabric Team
    It seems media monitor cannot connect to Rabbitmq Server. Please check the /etc/airtime/api_client.cfg and airtime.conf
    Post edited by Cliff Wang at 2013-05-14 21:09:14
    Cloud Radio -> http://airtime.pro
  • If I'm hosting my own website, what should the rabbitmy server be? Currently it is at localost...should I put in the name of the virtual host for my website and the ip address? What exactly is required.
  • Vote Up0Vote Down Cliff WangCliff Wang
    Posts: 339Member, Sourcefabric Team
    Usually "localhost" is ok if Airtime and Rabbitmq are located in same host. Are the host settings in api_client.cfg and airtime.conf correct? Please check the output of "sudo airtime-check-system".
    Cloud Radio -> http://airtime.pro
  • Okay, so I made sure that everything that said host pointed to localhost...nothing. Now I get a 404 error when I put in localhost/airtime/public/index.php to try to access the admin page. On my server, two virtual hosts can't co-exist. If I copy the airtime folder in my var/www/ folder, it creates chaoes for my self hosted website.

    I am beyond frustrated at this point.
  • Vote Up0Vote Down Cliff WangCliff Wang
    Posts: 339Member, Sourcefabric Team
    Oh, so you put airtime under sub-folder? Did you set basedir in airtime.conf and api_client.cfg?
    It should be airtime/public/ in your case.
    Cloud Radio -> http://airtime.pro
  • var//www is where I have my website's files. Whenever I put the airtime folder in var/www it messes up my website. If this is what I'm supposed to do, please let me know how they can exist in harmony. If I am to use localhost, are you saying in the config files to change the base directory to airtime/public?

    Sorry but I kind of need a step by step
  • I also ran the airtime system check, it showed media monitor as failed as well as a few other things.
  • Vote Up0Vote Down Cliff WangCliff Wang
    Posts: 339Member, Sourcefabric Team
    Here's some simple steps, and there's also a wiki page about that, link:
    1. Say /var/www is the document root, then copy /usr/share/airtime to /var/www/airtime. It looks like:
    ~$ ls /var/www/airtime/
    application  build  library  locale  public  tests
    2. Then edit /etc/airtime/airtime.conf and api_client.cfg, set basedir as:
    base_dir=airtime/public/
    3. Restart services:
    sudo service airtime-playout restart
    sudo service airtime-media-monitor restart
    Now URL http://yoursite/airtime/public/ is ready to use.

    var//www is where I have my website's files. Whenever I put the airtime folder in var/www it messes up my website. If this is what I'm supposed to do, please let me know how they can exist in harmony. If I am to use localhost, are you saying in the config files to change the base directory to airtime/public?

    Sorry but I kind of need a step by step




    Cloud Radio -> http://airtime.pro
  • Thanks, I have it installed with no conflicts. One problem persists, uploaded files are not showing in the library. They are clearly uploaded in the /srv/airtime/ folder but not appearting in the library interface in admin window. Media montor restart doesn't work.
  • Now media monitor restart says error can't kill process
  • Vote Up0Vote Down Cliff WangCliff Wang
    Posts: 339Member, Sourcefabric Team
    Please find it by "ps aux | grep media-monitor"
    should be like: "root       836  0.0  1.9  56080 10080 ?        Sl   11:47   0:06 python /usr/lib/airtime/media-monitor/media_monitor.py"

    kill the process by "sudo kill -9 [process_id]"

    and manually start it by "sudo service airtime-media-monitor start"
    Post edited by Cliff Wang at 2013-05-24 14:17:54
    Cloud Radio -> http://airtime.pro
  • what about audio files not appearing in the library but showing up in the /srv/airtime folder? Do I need an apache virtualhost for localhost eventhough I'm copying airtime into a subdirectory?

    Thanks
  • Vote Up0Vote Down Cliff WangCliff Wang
    Posts: 339Member, Sourcefabric Team
    If files have been already uploaded into /srv/airtime/stor, they will be added to Library as soon as media-monitor comes back on duty. No more setting is required.
    Cloud Radio -> http://airtime.pro
  • so I can delete the airtime virtual host in apache2 folder and add airtime to the subdirectory folder as explained, restart media monitor how you showed me and they should appear in the library?
  • Vote Up0Vote Down Cliff WangCliff Wang
    Posts: 339Member, Sourcefabric Team
    Right.
    Cloud Radio -> http://airtime.pro
  • When I try sudo kill -9 [media-monitor]

    I get the error message

    ERROR: garbage process ID "[media-monitor]".
    Usage:
      kill pid ...              Send SIGTERM to every process listed.
      kill signal pid ...       Send a signal to every process listed.
      kill -s signal pid ...    Send a signal to every process listed.
      kill -l                   List all signal names.
      kill -L                   List all signal names in a nice table.
      kill -l signal            Convert between signal numbers and names.

  • Vote Up0Vote Down Cliff WangCliff Wang
    Posts: 339Member, Sourcefabric Team
    What's the output of ps aux | grep "media-monitor"?
    Cloud Radio -> http://airtime.pro
  • 23251  0.0  0.0   4384   808 pts/13   S+   12:12   0:00 grep --color=auto media-monitor

  • Vote Up0Vote Down Cliff WangCliff Wang
    Posts: 339Member, Sourcefabric Team
    OK that means media-monitor is not running, just execute "sudo monit monitor airtime-media-monitor", and check the output of airtime-check-system after a while.
    Cloud Radio -> http://airtime.pro
  • dane5890@dane5890-HP-Compaq-dc5100-SFF-EQ175US:~$ sudo  airtime-check-system
    AIRTIME_STATUS_URL             = http://localhost:80/mistikradio.co/airtime/publicapi/status/format/json/api_key/%%api_key%%
    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                            = Intel(R) Pentium(R) 4 CPU 3.20GHz
    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
    --   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 404: Not Found
    --
    -- 2013-05-24 12:29:01,485 ERROR - [listenerstat.py : run() : line 133] - Exception: HTTP Error 404: Not Found
    --
    --
    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
    -- 2013/05/24 12:30:35 [stdout:3]
    -- 2013/05/24 12:30:35 [stdout:3] #########################################
    -- 2013/05/24 12:30:35 [stdout:3] #           *** pypo  ***               #
    -- 2013/05/24 12:30:35 [stdout:3] #     pypo notification gateway         #
    -- 2013/05/24 12:30:35 [stdout:3] #########################################
    --
    --
    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 404: Not Found
    --
    -- 2013-05-24 12:30:32,680 INFO - [Thread-1] [syncdb.py : reload_directories()] : LINE 49 - HTTP Error 404: Not Found
    --
    --
    -- There appears to be a problem with your Airtime installation.
    -- Please visit http://wiki.sourcefabric.org/x/HABQ

    It seems the url is still looking at localhost...do I need to change the hostname to my web website's virtualhost in the config and conf files?
    Thanks for all your help
  • here is my airtime.conf file

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

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

    [general]
    api_key = 0WGIFLC851TLW2BXM709
    web_server_user = www-data
    airtime_dir = /usr/share/airtime
    base_url = localhost
    base_port = 80
    base_dir = 'mistikradio.co/airtime/public'

    ;How many hours ahead of time should Airtime playout engine (PYPO)
    ;cache scheduled media files.
    cache_ahead_hours = 1

    [monit]
    monit_user = guest
    monit_password = airtime

    [soundcloud]
    connection_retries = 3
    time_between_retries = 60
  • Vote Up0Vote Down Cliff WangCliff Wang
    Posts: 339Member, Sourcefabric Team
    Yes, please do that.
    One more thing, if "mistikradio.co" is the hostname, then base_dir should be "airtime/public/"
    Post edited by Cliff Wang at 2013-05-24 15:43:19
    Cloud Radio -> http://airtime.pro
  • Vote Up0Vote Down Cliff WangCliff Wang
    Posts: 339Member, Sourcefabric Team
    And don't forget to mask the api_key because it's important for your Airtime when you post it out.
    Cloud Radio -> http://airtime.pro
  • AIRTIME_STATUS_URL             = http://mistikradio.co:80/airtime/publicapi/status/format/json/api_key/%%api_key%%
    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                            = Intel(R) Pentium(R) 4 CPU 3.20GHz
    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
    --     result = func(*args)
    --   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 404: Not Found
    --
    --
    --
    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
    -- 2013/05/24 12:48:17 [stdout:3]
    -- 2013/05/24 12:48:17 [stdout:3] #########################################
    -- 2013/05/24 12:48:17 [stdout:3] #           *** pypo  ***               #
    -- 2013/05/24 12:48:17 [stdout:3] #     pypo notification gateway         #
    -- 2013/05/24 12:48:17 [stdout:3] #########################################
    --
    --
    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 404: Not Found
    --
    -- 2013-05-24 12:46:25,979 INFO - [Thread-1] [syncdb.py : reload_directories()] : LINE 49 - HTTP Error 404: Not Found
    --
    --
    -- There appears to be a problem with your Airtime installation.
    -- Please visit http://wiki.sourcefabric.org/x/HABQ

  • and I still get a garbage error message when I do sudo kill -9 [media-monitor]
  • Vote Up0Vote Down Cliff WangCliff Wang
    Posts: 339Member, Sourcefabric Team
    The URL isn't correct. 
    Please don't miss "/" at the end
    Cloud Radio -> http://airtime.pro
  • Thank you so much, that did the trick. One final question, how do I implement the now playing widget on my website
  • Vote Up0Vote Down Cliff WangCliff Wang
    Posts: 339Member, Sourcefabric Team
    You are welcome. 
    About widget, there's a wiki page about that, link.
    Cloud Radio -> http://airtime.pro
  • Followed the wiki, but widgets are blank on my website. I can schedule a playlist in airtime and hear it there, but not on my website nor can I listen to the the stream outside of Airtime
  • Vote Up0Vote Down Albert FRAlbert FR
    Posts: 1,978Member, Airtime Moderator
    copy paste your widget script here
  • <link href="http://www.mistikradio.co/airtime-widgets/css/airtime-widgets.css" rel="stylesheet" type="text/css" />
    <script src="http://www.mistikradio.co/airtime-widgets/js/jquery-1.6.1.min.js" type="text/javascript"></script>
    <script src="http://www.mistikradio.co/airtime-widgets/js/jquery-ui-1.8.10.custom.min.js" type="text/javascript"></script>
    <script src="http://www.mistikradio.co/airtime-widgets/js/jquery.showinfo.js" type="text/javascript"></script>
    <script>
    $(document).ready(function() {
      $("#headerLiveTrackHolder").airtimeLiveTrackInfo({
       sourceDomain: "http://mistikradio.co/airtime/public/",
       text: {onAirNow:"On Air Now", offline:"Offline", current:"Current", next:"Next"},
       updatePeriod: 20 //seconds
     });
    });
    </script>
    <div id="headerLiveTrackHolder" style="border: 1px solid #999999; padding: 10px;"></div>

    Also for some reason, airtime can't connect with the icecast server. It did before