Debian Jessie with Airtime 2.5.2.1
  • Vote Up0Vote Down IljanIljan
    Posts: 8Member
    Since i can't find any relevant topics about Airtime 2.5.2.1 on Debian Jessie machines, i figured i start one. 

    In my case i downloaded the tarball and ran the installer according to the documentation provided. Including the sudo. It all went well except for the media-monitor. According to Airtime it's not running so i did a restart... Still not running...

    airtime@productie:~$ ps auxf | grep airtime
    airtime   5660  0.2  0.2  23264  5160 pts/0    S    12:10   0:00              \_ bash
    airtime   5676  0.0  0.1  19260  2596 pts/0    R+   12:10   0:00                  \_ ps auxf
    airtime   5677  0.0  0.1  12728  2184 pts/0    S+   12:10   0:00                  \_ grep airtime
    www-data   632  0.0  1.0  68716 21804 ?        S    11:36   0:00 /usr/bin/python /usr/bin/airtime-playout
    www-data   646  5.1  1.4 616980 29372 ?        Sl   11:36   1:46 airtime-liquidsoap /usr/local/lib/python2.7/dist-packages/airtime_playout-1.0-py2.7.egg/liquidsoap/ls_script.liq --verbose -f
    airtime   5667  0.2  1.3 485336 28236 ?        S    12:10   0:00  |   \_ /usr/sbin/apache2 -k start
    airtime   5669  0.5  1.3 419776 27816 ?        S    12:10   0:00  |   \_ /usr/sbin/apache2 -k start

    It spits a bunch of loglines to /var/log/airtime/media-monitor/media-monitor.log:

    2016-05-25 12:00:57,514 INFO - [MainThread] [launcher.py : setup_global()] : LINE 110 - Attempting to set the locale...
    2016-05-25 12:00:57,526 INFO - [Thread-1] [watchersyncer.py : __init__()] : LINE 19 - Created timeout thread...
    2016-05-25 12:00:57,527 INFO - [Thread-1] [airtime.py : init_rabbit_mq()] : LINE 35 - Initializing RabbitMQ message consumer...
    2016-05-25 12:00:57,544 INFO - [Thread-1] [airtime.py : init_rabbit_mq()] : LINE 47 - Initialized RabbitMQ consumer.
    2016-05-25 12:00:57,544 DEBUG - [Thread-1] [api_client.py : __call__()] : LINE 140 - http://airtime.scoutfm.nl:80/api/media-monitor-setup/format/json/api_key/4S80XJHJ7F574GAQZPJ1
    2016-05-25 12:00:57,585 DEBUG - [Thread-1] [api_client.py : __call__()] : LINE 140 - http://airtime.scoutfm.nl:80/api/list-all-watched-dirs/format/json/api_key/4S80XJHJ7F574GAQZPJ1
    2016-05-25 12:00:57,625 INFO - [Thread-1] [launcher.py : run()] : LINE 60 - initializing mm with directories: {u'watched_dirs': [], u'stor': u'/home/airtime/MediaStorage'}
    2016-05-25 12:00:57,625 INFO - [Thread-1] [launcher.py : run()] : LINE 63 - Initing with the following airtime response:{u'watched_dirs': [], u'stor': u'/home/airtime/MediaStorage'}
    2016-05-25 12:00:57,626 ERROR - [Thread-1] [log.py : fatal_exception()] : LINE 33 - 'Unexpected' exception has occured:
    2016-05-25 12:00:57,626 ERROR - [Thread-1] [log.py : fatal_exception()] : LINE 34 - Failed to create path '/home/airtime/MediaStorage/problem_files'
    2016-05-25 12:00:57,626 ERROR - [Thread-1] [log.py : fatal_exception()] : LINE 35 - Traceback (most recent call last):
      File "/usr/local/lib/python2.7/dist-packages/airtime_media_monitor-1.0-py2.7.egg/mm2/media/monitor/manager.py", line 187, in change_storage_root
        try: mmp.create_dir(path)
      File "/usr/local/lib/python2.7/dist-packages/airtime_media_monitor-1.0-py2.7.egg/mm2/media/monitor/pure.py", line 387, in create_dir
        except Exception as e : raise FailedToCreateDir(path, e)
    FailedToCreateDir: Failed to create path '/home/airtime/MediaStorage/problem_files'

    2016-05-25 12:00:57,626 ERROR - [Thread-1] [log.py : fatal_exception()] : LINE 33 - 'Unexpected' exception has occured:
    2016-05-25 12:00:57,627 ERROR - [Thread-1] [log.py : fatal_exception()] : LINE 34 - Failed to create path '/home/airtime/MediaStorage/imported'
    2016-05-25 12:00:57,627 ERROR - [Thread-1] [log.py : fatal_exception()] : LINE 35 - Traceback (most recent call last):
      File "/usr/local/lib/python2.7/dist-packages/airtime_media_monitor-1.0-py2.7.egg/mm2/media/monitor/manager.py", line 187, in change_storage_root
        try: mmp.create_dir(path)
      File "/usr/local/lib/python2.7/dist-packages/airtime_media_monitor-1.0-py2.7.egg/mm2/media/monitor/pure.py", line 387, in create_dir
        except Exception as e : raise FailedToCreateDir(path, e)
    FailedToCreateDir: Failed to create path '/home/airtime/MediaStorage/imported'

    2016-05-25 12:00:57,627 ERROR - [Thread-1] [log.py : fatal_exception()] : LINE 33 - 'Unexpected' exception has occured:
    2016-05-25 12:00:57,627 ERROR - [Thread-1] [log.py : fatal_exception()] : LINE 34 - Failed to create path '/home/airtime/MediaStorage/organize'
    2016-05-25 12:00:57,627 ERROR - [Thread-1] [log.py : fatal_exception()] : LINE 35 - Traceback (most recent call last):
      File "/usr/local/lib/python2.7/dist-packages/airtime_media_monitor-1.0-py2.7.egg/mm2/media/monitor/manager.py", line 187, in change_storage_root
        try: mmp.create_dir(path)
      File "/usr/local/lib/python2.7/dist-packages/airtime_media_monitor-1.0-py2.7.egg/mm2/media/monitor/pure.py", line 387, in create_dir
        except Exception as e : raise FailedToCreateDir(path, e)
    FailedToCreateDir: Failed to create path '/home/airtime/MediaStorage/organize'

    2016-05-25 12:00:57,627 ERROR - [Thread-1] [log.py : fatal_exception()] : LINE 33 - 'Unexpected' exception has occured:
    2016-05-25 12:00:57,627 ERROR - [Thread-1] [log.py : fatal_exception()] : LINE 34 - Failed to create path '/home/airtime/MediaStorage/recorded'
    2016-05-25 12:00:57,627 ERROR - [Thread-1] [log.py : fatal_exception()] : LINE 35 - Traceback (most recent call last):
      File "/usr/local/lib/python2.7/dist-packages/airtime_media_monitor-1.0-py2.7.egg/mm2/media/monitor/manager.py", line 187, in change_storage_root
        try: mmp.create_dir(path)
      File "/usr/local/lib/python2.7/dist-packages/airtime_media_monitor-1.0-py2.7.egg/mm2/media/monitor/pure.py", line 387, in create_dir
        except Exception as e : raise FailedToCreateDir(path, e)
    FailedToCreateDir: Failed to create path '/home/airtime/MediaStorage/recorded'

    I can't be the only one experiencing this. And yes i can create directory's myself as a work around but the issue will return when uploading media. 

    Lets help each other.
  • 4 Comments sorted by
  • Did you try chmoding the directories to 777 to see if that would work? 
  • cd /home/airtime 

    what is the output of ls -l ? 
  • Vote Up0Vote Down IljanIljan
    Posts: 8Member
    airtime@productie:~$ chmod -R 777 MediaStorage/
    airtime@productie:~$ ls -l /home/airtime/
    total 6560
    -rw-r--r--  1 airtime airtime 6704301 May 25 10:35 airtime-2.5.2.1.tar.gz
    drwxr-xr-x 10 airtime airtime    4096 May 25 10:55 airtime-airtime-2.5.2.1
    drwxr-xr-x  2 airtime airtime    4096 May 24 09:54 back-ups
    drwxrwxrwx  2 airtime airtime    4096 May 25 11:08 MediaStorage

    The errors don't reoccur in the logfile and the media monitor daemon seems to start... 
    [ ok ] Starting airtime-media-monitor (via systemctl): airtime-media-monitor.service.

    But then when you recheck... There is no monitor proces.

    airtime@productie:~$ ps auxf | egrep "media|airtime|monitor"
    airtime   2207  0.0  0.1  12728  2104 pts/0    S+   11:35   0:00                  \_ grep -E media|airtime|monitor
    airtime   2197  0.3  1.5 422336 32028 ?        S    11:34   0:00  |   \_ /usr/sbin/apache2 -k start
    airtime   2199  0.1  1.5 488204 32472 ?        S    11:34   0:00  |   \_ /usr/sbin/apache2 -k start
    www-data   932  0.0  1.0  68364 21680 ?        S    11:26   0:00 /usr/bin/python /usr/bin/airtime-playout
    www-data  1016  5.4  1.4 616980 29460 ?        Sl   11:26   0:27 airtime-liquidsoap /usr/local/lib/python2.7/dist-packages/airtime_playout-1.0-py2.7.egg/liquidsoap/ls_script.liq --verbose -f

    I'm using the ITK mod in the vhost so airtime (web)processes run as airtime. Still liquidsoap and playout run as user www-data. For security reasons i like to run airtime completely as the user 'airtime'. Maybe this points someone in the direction for a solution? 
  • set the owner/group of the files to www-data and see if that works. If it does, add airtime to that group.