Having trouble with Manage Media Folders for Airtime (v1.9.0-RC2) not saving uploaded files

  • I am having trouble w/ using the new Manage Media Folders feature in the latest version of Airtime (v1.9.0-RC2).

    I tried setting the Manage Media Folders directory to a nonstandard directory (I just chose 'home') and uploading media to the server. However, the file doesn't show up in the playlist builder list.

    I was trying to see if something was wrong with my machine, so I tried the same test with the test server to see if it would work as expected.

    http://airtime-dev.sourcefabric.org/Library

    The test server fails to upload files when you switch the Manage Media Folders too.

    Is there an extra step I am missing? Permissions problem? Something else?

    Thanks for your help!

  • 20 Comments sorted by
  • You have 2 folders to set.
    The Store and the Watch directory.

    Watch directory won't copy and files but will add them to the library.
    Store directory is where files will be stored.

    Which folder were you setting?
  • I changed the storage folder from /srv/airtime/stor to /home/ on the test server and was not able to upload files and see them in the Playlist Builder.

    Do I also need to chance the Watch Directory to something?
  • Can you please run 'airtime-check-system' and post the output?
    Thank you.

  • Vote Up0Vote Down NaomiNaomi
    Posts: 228Member
    also please post the logs of /var/log/airtime/media-monitor if you are having any problems with the new files/folder management.
  • I will do this ASAP, but it probably wont' be til the weekend.

    However, like I said originally - this is failing on the test wiki you guys have setup here: http://airtime-dev.sourcefabric.org/Library

    - so if you have access to the logs there then you should be able to replicate.

    1. Login as admin to http://airtime-dev.sourcefabric.org/Library
    2. Click on the 'Configure' link.
    3. Click on the Manage Media Folders link
    4. Change the storage director to be /home
    5. Click on the 'set' button
    6. Click on the 'Add Media' tab. Add an mp3.
    7. Start the upload. See the checkmark when it succeeds.
    8. Click on the Playlist Builder. See that your mp3 has NOT been uploaded.
  • Vote Up0Vote Down NaomiNaomi
    Posts: 228Member
    It might be that you've set /home to be your directory... it would be much better to have a specific folder just for audio chosen to be the stor folder or there could be problems when managing your audio. The script has to give this chosen certain permission/owner in order for it to work, so I'm not sure if it's even possible to choose just the /home folder as it could mess up your user settings. The owner of the folder must be www-data so you don't want that happening on your /home folder....
  • Right! That makes absolute sense!
    I just did that on the test server as a proof of the problem.

    On my own server, I was personally trying to point to an external drive and experiencing the same issue.
  • On the airtime dev site, I just changed the storage directory from /srv/airtime/stor to /srv/airtime.

    Same problem.

    1. Login as admin to http://airtime-dev.sourcefabric.org/Library
    2. Click on the 'Configure' link.
    3. Click on the Manage Media Folders link
    4. Change the storage director to be /srv/airtime
    5. Click on the 'set' button
    6. Click on the 'Add Media' tab. Add an mp3.
    7. Start the upload. See the checkmark when it succeeds.
    8. Click on the Playlist Builder. See that your mp3 has NOT been uploaded.
  • Vote Up0Vote Down NaomiNaomi
    Posts: 228Member
    yeah we should have some sort of better filtering of possible storage folder choices implemented, I'll report this issue for now.

    Thanks!
  • For the record, I was able to change to use the Manage Media Folder to change
    the storage folder to /srv/airtime/stor/imported/Hausu/EP/ on the airtime dev site
    and it worked fine.

    (That folder got created when I uploaded an mp3 w/ the default airtime storage folder. I thought
    I would try the mechanism for switching storage directories there to see if I could get anything to work).

    So it looks like mechanism is working, but that there are some requirements about which folders you use.
    What permissions do you need? etc?
  • Thanks so much for your help. I would love to get this working with my external drive. I will see if the logs have anything useful to report back.
  • Vote Up0Vote Down NaomiNaomi
    Posts: 228Member
    The script should set any permission needed for you, unless it is unable to for some reason. (ex the /home folder) There could also be a timing issue between when the event to change the stor folder was received and when you uploaded the file. I've just tried this myself and didn't have a problem when switching /srv/airtime/stor to /srv/airtime, but there could be a timing dependency in there I see if you try and upload a file immediately after changing the stor folder as the script needs a little bit of time to receive the event, and then finish initial setup of the folder.
  • So I actually got access to my server at home and reinstalled airtime 1.8 and then did an update of
    1.9.0(RC2). After install, I did not do anything but login and upload a file (I did not even change the Manage Media Folder storage folder).
    File uploads but is not available in the playlist builder folder.

    Here are the logs for /var/log/airtime/media-monitor

    2011-08-03 13:22:27,947 ERROR - [api_client.py : setup_media_monitor() : line 386] - Exception: No JSON object could be decoded
    2011-08-03 13:22:34,105 ERROR - [api_client.py : setup_media_monitor() : line 386] - Exception: No JSON object could be decoded
    2011-08-03 13:22:40,811 ERROR - [api_client.py : setup_media_monitor() : line 386] - Exception: No JSON object could be decoded
    2011-08-03 13:22:46,971 ERROR - [api_client.py : setup_media_monitor() : line 386] - Exception: No JSON object could be decoded
    2011-08-03 13:22:53,138 ERROR - [api_client.py : setup_media_monitor() : line 386] - Exception: No JSON object could be decoded
    2011-08-03 13:22:59,298 ERROR - [api_client.py : setup_media_monitor() : line 386] - Exception: No JSON object could be decoded
    2011-08-03 13:23:05,721 ERROR - [api_client.py : setup_media_monitor() : line 386] - Exception: No JSON object could be decoded
    2011-08-03 13:23:11,921 ERROR - [api_client.py : setup_media_monitor() : line 386] - Exception: No JSON object could be decoded
    2011-08-03 13:23:18,114 ERROR - [api_client.py : setup_media_monitor() : line 386] - Exception: No JSON object could be decoded
    2011-08-03 13:23:24,350 ERROR - [api_client.py : setup_media_monitor() : line 386] - Exception: No JSON object could be decoded
    2011-08-03 13:23:30,926 ERROR - [api_client.py : setup_media_monitor() : line 386] - Exception: No JSON object could be decoded
    2011-08-03 13:23:37,077 ERROR - [api_client.py : setup_media_monitor() : line 386] - Exception: No JSON object could be decoded


    And here is the output from an: airtime-check-system


    CPU = Genuine Intel(R) CPU T2500 @ 2.00GHz
    Total RAM = 2028904 kB
    Free RAM = 114124 kB
    OS = Ubuntu 11.04 Intel 80386
    AIRTIME_CONFIG_FILES = OK
    POSTGRESQL_DATABASE = OK
    PYTHON_KOMBU_VERSION = 1.2.0
    PYTHON_POSTER_VERSION = 0.8.1
    PYTHON_MUTAGEN_VERSION = 1.20
    PYTHON_PYINOTIFY_VERSION = 0.9.2
    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 = 20186
    PLAYOUT_ENGINE_RUNNING_SECONDS = 213
    LIQUIDSOAP_PROCESS_ID = 20191
    LIQUIDSOAP_RUNNING_SECONDS = 213
    MEDIA_MONITOR_PROCESS_ID = 20267
    MEDIA_MONITOR_RUNNING_SECONDS = 212
    SHOW_RECORDER_PROCESS_ID = 20222
    SHOW_RECORDER_RUNNING_SECONDS = 213
    ICECAST_PROCESS_ID = 2142

    -- System setup looks OK!


  • I'm not sure why airtime-check-system is saying the version is 1.8.2 when it's 1.9.0.

    Going to the server in my browser http://herhq.org/login/index it says that it's 1.9.0
  • So I think there was a problem with not completely uninstalling airtime before, so that is why I was getting strange version problems.

    So I deleted everything under /var/lib/airtime /etc/airtime /srv/airtime

    And this time I just installed 1.9.0(RC2) without first installing 1.8.2 via apt-get and upgrading.

    On first run, I tried uploading the same mp3 and it did not upload.

    However, the logs show this:


    tail -f /var/log/airtime/media-monitor/media-monitor.log


    2011-08-03 13:43:04,037 INFO - [MediaMonitor.py : <module>() : line 77] - Added watch to /srv/airtime/stor/
    2011-08-03 13:43:04,038 INFO - [MediaMonitor.py : <module>() : line 78] - wdd result 1
    2011-08-03 13:43:35,888 DEBUG - [airtimeprocessevent.py : handle_created_file() : line 53] - PROCESS_IN_CREATE: False, name: 01 Weaving Spiders.mp3, pathname: /srv/airtime/stor/organize/01 Weaving Spiders.mp3
    2011-08-03 13:43:35,889 INFO - [mediamonitorcommon.py : organize_new_file() : line 229] - Organizing new file: /srv/airtime/stor/organize/01 Weaving Spiders.mp3
    2011-08-03 13:43:35,889 INFO - [airtimemetadata.py : get_md_from_file() : line 106] - getting info from filepath /srv/airtime/stor/organize/01 Weaving Spiders.mp3
    2011-08-03 13:43:35,945 ERROR - [airtimemetadata.py : get_md_from_file() : line 116] - failed getting metadata from /srv/airtime/stor/organize/01 Weaving Spiders.mp3
    2011-08-03 13:43:35,945 ERROR - [airtimemetadata.py : get_md_from_file() : line 117] - Exception can't sync to an MPEG frame
    2011-08-03 13:43:35,945 WARNING - [mediamonitorcommon.py : organize_new_file() : line 239] - File /srv/airtime/stor/organize/01 Weaving Spiders.mp3, has invalid metadata
    2011-08-03 13:43:35,946 INFO - [airtimeprocessevent.py : process_IN_MODIFY() : line 83] - process_IN_MODIFY: <Event dir=False mask=0x2 maskname=IN_MODIFY name=01 Weaving Spiders.mp3 path=/srv/airtime/stor/organize pathname=/srv/airtime/stor/organize/01 Weaving Spiders.mp3 wd=2 >
    2011-08-03 13:44:38,062 INFO - [airtimeprocessevent.py : process_IN_MODIFY() : line 83] - process_IN_MODIFY: <Event dir=False mask=0x2 maskname=IN_MODIFY name=01 Weaving Spiders.mp3 path=/srv/airtime/stor/organize pathname=/srv/airtime/stor/organize/01 Weaving Spiders.mp3 wd=2 >


    Any clues in here?

    AIRTIME CHECK


    CPU = Genuine Intel(R) CPU T2500 @ 2.00GHz
    Total RAM = 2028904 kB
    Free RAM = 118700 kB
    OS = Ubuntu 11.04 Intel 80386
    AIRTIME_CONFIG_FILES = OK
    POSTGRESQL_DATABASE = OK
    PYTHON_KOMBU_VERSION = 1.2.0
    PYTHON_POSTER_VERSION = 0.8.1
    PYTHON_MUTAGEN_VERSION = 1.20
    PYTHON_PYINOTIFY_VERSION = 0.9.2
    RABBITMQ_SERVER = OK
    AIRTIME_VERSION_URL = http://localhost:80/api/version/api_key/%%api_key%%
    APACHE_CONFIGURED = YES
    AIRTIME_VERSION = 1.9.0-RC2
    PLAYOUT_ENGINE_PROCESS_ID = 27350
    PLAYOUT_ENGINE_RUNNING_SECONDS = 278
    LIQUIDSOAP_PROCESS_ID = 27356
    LIQUIDSOAP_RUNNING_SECONDS = 278
    MEDIA_MONITOR_PROCESS_ID = 27426
    MEDIA_MONITOR_RUNNING_SECONDS = 277
    SHOW_RECORDER_PROCESS_ID = 27386
    SHOW_RECORDER_RUNNING_SECONDS = 278
    ICECAST_PROCESS_ID = 2142

    -- System setup looks OK!
  • Vote Up0Vote Down NaomiNaomi
    Posts: 228Member
    well this line here

    failed getting metadata from /srv/airtime/stor/organize/01 Weaving Spiders.mp3

    shows that for some reason the metadata library we are using can't extract the metadata from this file so the daemon is ignoring it and not putting it in the playlist builder incase it isn't actually an audio file. Perhaps you can send this file to me so I can try testing with it?

    naomi.aro@sourcefabric.org

    Have you tried uploading any other audio files?
  • I have a similar problem. No sooner had you helped me sort the Record and Rebroadcast function in 1.8.2, prompted by Adams email I'd thought I'd upgrade to 1.9 RC3. Unfortunately, following the instructions here:

    I've ended up with same issue as "Wireless Radio Union College" at the top of this post http://forum.sourcefabric.org/index.php/mv/msg/3852/12055/#m sg_12055

    I've tried the following:

    airtime-import --storage-dir-get
    None

    sudo airtime-import --storage-dir-set /media/DATA/Airtime_Library/

    Are you sure you want to change the storage direcory? (y/N)y
    Unable to connect to the Airtime server.
  • I finally got 1.9.3 working and am storing to an external drive.

    However, some mp3's still have this problem. I am seeing these errors:


    2011-09-12 17:59:12,924 WARNING - [MainThread] [mediamonitorcommon.py : organize_new_file()] : LINE 253 - File /media/offhours/organize/03 Tomorrow.mp3, has invalid metadata
    2011-09-12 17:59:12,924 INFO - [MainThread] [airtimeprocessevent.py : process_IN_MODIFY()] : LINE 83 - process_IN_MODIFY: <Event dir=False mask=0x2 maskname=IN_MODIFY name=03 Tomorrow.mp3 path=/media/offhours/organize pathname=/media/offhours/organize/03 Tomorrow.mp3 wd=5 >
    2011-09-12 17:59:13,933 DEBUG - [MainThread] [airtimeprocessevent.py : handle_created_file()] : LINE 53 - PROCESS_IN_CREATE: False, name: 04 Quakes.mp3, pathname: /media/offhours/organize/04 Quakes.mp3
    2011-09-12 17:59:13,934 INFO - [MainThread] [mediamonitorcommon.py : organize_new_file()] : LINE 243 - Organizing new file: /media/offhours/organize/04 Quakes.mp3
    2011-09-12 17:59:13,934 INFO - [MainThread] [airtimemetadata.py : get_md_from_file()] : LINE 120 - getting info from filepath /media/offhours/organize/04 Quakes.mp3
    2011-09-12 17:59:13,935 ERROR - [MainThread] [airtimemetadata.py : get_md_from_file()] : LINE 130 - failed getting metadata from /media/offhours/organize/04 Quakes.mp3
    2011-09-12 17:59:13,936 ERROR - [MainThread] [airtimemetadata.py : get_md_from_file()] : LINE 131 - Exception can't sync to an MPEG frame
    2011-09-12 17:59:13,936 WARNING - [MainThread] [mediamonitorcommon.py : organize_new_file()] : LINE 253 - File /media/offhours/organize/04 Quakes.mp3, has invalid metadata
    2011-09-12 17:59:13,937 INFO - [MainThread] [airtimeprocessevent.py : process_IN_MODIFY()] : LINE 83 - process_IN_MODIFY: <Event dir=False mask=0x2 maskname=IN_MODIFY name=04 Quakes.mp3 path=/media/offhours/organize pathname=/media/offhours/organize/04 Quakes.mp3 wd=5 >
    2011-09-12 18:00:29,122 INFO - [MainThread] [airtimeprocessevent.py : process_IN_MODIFY()] : LINE 83 - process_IN_MODIFY: <Event dir=False mask=0x2 maskname=IN_MODIFY name=01 Undefined.mp3 path=/media/offhours/organize pathname=/media/offhours/organize/01 Undefined.mp3 wd=5 >
  • Vote Up0Vote Down Paul BaranowskiPaul Baranowski
    Posts: 389Member, Administrator, Sourcefabric Team
    Can you please send the file(s) that are giving you trouble to me?

    Paul Baranowski (paul.baranowski@sourcefabric.org)
    CTO, Sourcefabric, http://sourcefabric.org

    +1 (416) 832-6436 (Cell)
    Skype: paulbaranowski
    720 Bathurst St. / Suite 203 / Toronto / ON / M5S 2R4 / Canada



    On Mon, Sep 12, 2011 at 9:12 PM, Garrett Kelly <
    airtime-support@lists.sourcefabric.org> wrote:

    > **
    > I finally got 1.9.3 working and am storing to an external drive.
    >
    > However, some mp3's still have this problem. I am seeing these errors:
    >
    >
    > 2011-09-12 17:59:12,924 WARNING - [MainThread] [mediamonitorcommon.py :
    > organize_new_file()] : LINE 253 - File /media/offhours/organize/03
    > Tomorrow.mp3, has invalid metadata
    > 2011-09-12 17:59:12,924 INFO - [MainThread] [airtimeprocessevent.py :
    > process_IN_MODIFY()] : LINE 83 - process_IN_MODIFY: <Event dir=False
    > mask=0x2 maskname=IN_MODIFY name=03 Tomorrow.mp3
    > path=/media/offhours/organize pathname=/media/offhours/organize/03
    > Tomorrow.mp3 wd=5 >
    > 2011-09-12 17:59:13,933 DEBUG - [MainThread] [airtimeprocessevent.py :
    > handle_created_file()] : LINE 53 - PROCESS_IN_CREATE: False, name: 04
    > Quakes.mp3, pathname: /media/offhours/organize/04 Quakes.mp3
    > 2011-09-12 17:59:13,934 INFO - [MainThread] [mediamonitorcommon.py :
    > organize_new_file()] : LINE 243 - Organizing new file:
    > /media/offhours/organize/04 Quakes.mp3
    > 2011-09-12 17:59:13,934 INFO - [MainThread] [airtimemetadata.py :
    > get_md_from_file()] : LINE 120 - getting info from filepath
    > /media/offhours/organize/04 Quakes.mp3
    > 2011-09-12 17:59:13,935 ERROR - [MainThread] [airtimemetadata.py :
    > get_md_from_file()] : LINE 130 - failed getting metadata from
    > /media/offhours/organize/04 Quakes.mp3
    > 2011-09-12 17:59:13,936 ERROR - [MainThread] [airtimemetadata.py :
    > get_md_from_file()] : LINE 131 - Exception can't sync to an MPEG frame
    > 2011-09-12 17:59:13,936 WARNING - [MainThread] [mediamonitorcommon.py :
    > organize_new_file()] : LINE 253 - File /media/offhours/organize/04
    > Quakes.mp3, has invalid metadata
    > 2011-09-12 17:59:13,937 INFO - [MainThread] [airtimeprocessevent.py :
    > process_IN_MODIFY()] : LINE 83 - process_IN_MODIFY: <Event dir=False
    > mask=0x2 maskname=IN_MODIFY name=04 Quakes.mp3 path=/media/offhours/organize
    > pathname=/media/offhours/organize/04 Quakes.mp3 wd=5 >
    > 2011-09-12 18:00:29,122 INFO - [MainThread] [airtimeprocessevent.py :
    > process_IN_MODIFY()] : LINE 83 - process_IN_MODIFY: <Event dir=False
    > mask=0x2 maskname=IN_MODIFY name=01 Undefined.mp3
    > path=/media/offhours/organize pathname=/media/offhours/organize/01
    > Undefined.mp3 wd=5 >
    >

  • I am seeing a similiar error, though with the version 1.9.4 installed via apt-get:
    Fatal error: Call to a member function getId() on a non-object in /usr/share/airtime/application/controllers/ApiController.php on line 521
    , filepath: /home/xobilyol/musica/jazzlibre/inhabs_threes-160kbps.mp3, mode: create
    2011-09-26 17:34:09,445 ERROR - [Thread #1] [api_client.py : update_media_metadata()] : LINE 437 - Exception with filepath /home/xobilyol/musica/jazzlibre/inhabs_threes-160kbps.mp3: No JSON object could be decoded
    The mp3 sample in question can be downloaded from Drip Audio