Upload of mp3 files fail on debian stretch 9

From @b01xy on Wed Oct 18 2017 01:53:16 GMT+0000 (UTC)


On a fresh debian stretch 9, the install file from git works well but the upload of mp3 files fails, whereas uploading ogg, wav, and flac files works

the folder /srv/airtime/stor/organize/ exists and the mp3 file is in it

From /var/log/airtime/airtime_analyzer.log :

2017-10-18 02:00:07,626 [message_listener] [INFO ]   Listening for messages...
2017-10-18 02:01:15,219 [message_listener] [INFO ]   - Received '{"tmp_file_path":"\/srv\/airtime\/stor\/organize\/deutsch2410114.mp3","storage_backend":"file","import_directory":"\/srv\/airtime\/stor\/\/imported\/1","original_filename":"deutsch2410114.mp3","callback_url":"http:\/\/\/\/rest\/media\/24","api_key":"###","file_prefix":""}' on routing_key ''
2017-10-18 02:01:18,853 [playability_analyzer] [WARNI]  Command '['liquidsoap', '-v', '-c', 'output.dummy(audio_to_stereo(single(argv(1))))', '--', u'/srv/airtime/stor/organize/deutsch2410114.mp3']' returned non-zero exit status -11
2017-10-18 02:01:18,854 [analyzer_pipeline] [ERROR]  
Traceback (most recent call last):
  File "/usr/local/lib/python2.7/dist-packages/airtime_analyzer-0.1-py2.7.egg/airtime_analyzer/analyzer_pipeline.py", line 73, in run_analysis
    metadata = PlayabilityAnalyzer.analyze(audio_file_path, metadata)
  File "/usr/local/lib/python2.7/dist-packages/airtime_analyzer-0.1-py2.7.egg/airtime_analyzer/playability_analyzer.py", line 30, in analyze
    raise UnplayableFileError()
2017-10-18 02:01:18,869 [message_listener] [ERROR]  Analyzer pipeline exception: 
2017-10-18 02:01:18,948 [status_reporter] [INFO ]  HTTP request sent successfully.

Maybe a problem related to #256 ?

I tried to uninstall everything even python, install python-pika first and then LibreTime but nothing changed.


liquidsoap -v -c 'output.dummy(audio_to_stereo(single("/srv/airtime/stor/organize/deutsch2410114.mp3")))'
Segmentation fault

any idea ?

Copied from original issue: https://github.com/LibreTime/libretime/issues/340

From @Robbt on Wed Oct 18 2017 02:01:28 GMT+0000 (UTC)

This sounds like it might be a codec issue, considering the other formats are working and this is on debian. Even though mp3 is no longer patent encumbered as of a few months ago but I don’t think we’ve seen anything like this before. I’ll look at the code and see if I can find any reason why it might be failing based upon those lines of code. Have you tried different many mp3 files, it might be something as simple as the encoding format or what not.

From @b01xy on Wed Oct 18 2017 02:23:58 GMT+0000 (UTC)

thanks for your quick reply
yes, I’ve tried several mp3 files encoded by myself or music from the net
after a new réinstall of LibreTime, flac upload is not working anymore, ogg is still working, strange !?

From @Robbt on Wed Oct 18 2017 02:25:18 GMT+0000 (UTC)

Ok, yeah so this runs liquidsoap to see if it can play the file. For some reason this is failing. The next step is to try to run liquidsoap from the command line and see what the error is. Most likely you just need to typeliquidsoap -v -c output.dummy(audio_to_stereo(single(argv(1)))) /srv/airtime/stor/organize/deutsch2410114.mp3 and see what happens.

From @Robbt on Wed Oct 18 2017 02:26:53 GMT+0000 (UTC)

I might not have parsed the command line instruction correctly as you might need to add a – before the filename. Make sure that file exists as well.

From @Robbt on Wed Oct 18 2017 02:28:05 GMT+0000 (UTC)

liquidsoap -v -c "output.dummy(audio_to_stereo(single(argv(1))))" -- /srv/airtime/stor/organize/deutsch2410114.mp3 or liquidsoap -v -c "output.dummy(audio_to_stereo(single(argv(1))))" -- /srv/airtime/stor/organize/deutsch2410114.mp3 or liquidsoap -v -c output.dummy(audio_to_stereo(single(argv(1)))) --/srv/airtime/stor/organize/deutsch2410114.mp3

From @b01xy on Wed Oct 18 2017 02:40:20 GMT+0000 (UTC)

the pb may come from here :

radio@radio:/srv/airtime/stor/organize$ liquidsoap -v -c "output.dummy(audio_to_stereo(single(argv(1))))" -- /srv/airtime/stor/organize/250114_1.mp3
Segmentation fault
radio@radio:/srv/airtime/stor/organize$ liquidsoap -v -c "output.dummy(audio_to_stereo(single(argv(1))))" -- /srv/airtime/stor/organize/250114_1.mp3
Segmentation fault
radio@radio:/srv/airtime/stor/organize$ liquidsoap -v -c output.dummy(audio_to_stereo(single(argv(1)))) --/srv/airtime/stor/organize/250114_1.mp3
-bash: syntax error near unexpected token `('
radio@radio:/srv/airtime/stor/organize$ liquidsoap -v -c output.dummy(audio_to_stereo(single(argv(1)))) /srv/airtime/stor/organize/250114_1.mp3
-bash: syntax error near unexpected token `('

I also tried :
liquidsoap -v -c 'output.dummy(audio_to_stereo(single("/srv/airtime/stor/organize/250114_1.mp3")))'
which also seg fault


From @Robbt on Wed Oct 18 2017 12:52:14 GMT+0000 (UTC)

So there is a problem with your liquidsoap binary then. I haven’t looked into it looks like by default https://packages.debian.org/stable/sound/liquidsoap has 1.1.1-7.2 whereas the Ubuntu trusty has 1.1.1-6ubuntu2.

I’m not sure where the issue with liquidsoap is coming from as I think other people have successfully installed from Stretch without running into this particular problem.

From @Zopokx on Wed Oct 18 2017 14:02:50 GMT+0000 (UTC)

I’m using debian stretch too (git clone) and I didn’t experienced this problem…

From @hairmare on Wed Oct 18 2017 17:12:57 GMT+0000 (UTC)

@b01xy I’m assuming you installed the debian packages for liquidsoap (or automatically got them installed). Can you try using an opam install of liquidsoap? Details on the opam install may be found here and you would also need to apply the patch linked in #192.

I’m not sure why it would segfault though as others have had success. Maybe running the command through strace indicates something. Is AppArmor or something similar activated on the machine?

From @b01xy on Thu Oct 19 2017 13:14:36 GMT+0000 (UTC)

thanks for your reply
I’ll try your advice on a fresh debian install asap
I don’t have access now to the machine I previously installed (it is now installed in the local network of a school), but I’ll try when I’ll go there
btw, also thks to all the persons involved in LibreTime, really nice work :slight_smile:

I just installed a fresh copy using Ubuntu 16.04 and have the same issue, the up-loader does upload the files, but will not display the media files and gives an error.

This seems to me to be a permissions issue, the uploaded must use the database to store the media files, and that seems to be working, but airtime/libretime does not seem to have access to the media directory in /srv/airtime/stor/organize/ anyone know what group/groups libretime is supposed to belong to?

Oh, I tried both .ogg and .mp3 files to no avail.
Also, the logo file will not upload, which leads me to believe it is a permissions issue.

They should all be owned by www-data (aka the apache webserver) for both the user and group. If they are not for some reason try changing it and it should work. You can also look for errors in the log at /var/log/airtime/airtime_analyzer.log to see if it’s giving any errors. Let us know if that is helpful. The permissions should be setup by default by the installer.

I ran the command members www-data and the only users listed are www-data & celery, also there is no user name airtime should there not be a user named “airtime”?

I am running an Amazon EC2 vps, the original user is just “ubuntu”.

the log for the analyzer I added the image!

This seems like a problem with your rabbitmq connection. What are the settings under /etc/airtime/airtime.ini (I think that is where they are currently located.

You might be on to something, during the web setup, it suggested that the rabbitmq password be changed, which I did. but it does not look according to the airtime.conf file it is still the default airtime. I tried changing it but it just broke the site. Changed it back and it loads again.

Oh… airtime-analyzer.service will not load because it says it does not exist!

I have reached my limit of posts on this thread…

OK decided to delete that instance of EC2 and start from scratch! This time, I left all of the defaults in tacked. airtime_analyzer.service still does not start because it does not exist!.

Plus I get the following error; see image!

Update: The install script did not install airtime_analyzer during the install.
I looked through the github files and found that there is a python installer (found it Here)

I then navigated to my git clone directory, navigated to /…libretime/python_apps/airtime_analyzer/ and ran the command: sudo python setup.py install then made sure service was started by running sudo service airtime_analyzer start setup errors are gone but not able to login, says password is wrong. I verified that all passwords and user names are all the defaults from install, still can’t get in now?

Almost there, and by the way, this 3 post rule for new users sucks!

login issue was operator error, we are good and it’s working.

Ok for some reason it is probably airtime_analyzer not airtime-playout. Try that. There is a bug with the saving of modified settings in the setup so that is what happened. Let me know if you can figure out how to get the right settings in your config.

We have the same problem here, on a an installation on Ubuntu 16.04. When we try to upload files, there are occasional (but frequent) failures of importing files.

The warnings that appear when this error occurs, can be seen here. No errors occur if we run the commands from the commandline. The ratio of failures is between one out of 5 and one out of 2.

Dec  7 13:19:23 paragogos-desktop systemd[1]: Started Session 425 of user paragogos.

Dec  7 13:19:58 paragogos-desktop airtime_analyzer[16942]: 2017-12-07 13:19:58,336 [message_listener] [INFO ]   - Received '{"tmp_file_path":"\/srv\/airtime\/stor\/organize\/05 Southbound Again.mp3","storage_backend":"file","import_directory":"\/srv\/airtime\/stor\/\/imported\/1","original_filename":"05 Southbound Again.mp3","callback_url":"http:\/\/\/\/rest\/media\/67","api_key":"###","file_prefix":""}' on routing_key ''

Dec  7 13:20:01 paragogos-desktop airtime_analyzer[16942]: 2017-12-07 13:20:01,037 [replaygain_analyzer] [WARNI]  ['replaygain', '-d', u'/srv/airtime/stor/organize/05 Southbound Again.mp3']  1

Dec  7 13:20:01 paragogos-desktop airtime_analyzer[16942]: 2017-12-07 13:20:01,199 [playability_analyzer] [WARNI]  Command '['liquidsoap', '-v', '-c', 'output.dummy(audio_to_stereo(single(argv(1))))', '--', u'/srv/airtime/stor/organize/05 Southbound Again.mp3']' returned non-zero exit status 1

Dec  7 13:20:01 paragogos-desktop airtime_analyzer[16942]: 2017-12-07 13:20:01,200 [analyzer_pipeline] [ERROR]

Dec  7 13:20:01 paragogos-desktop airtime_analyzer[16942]: Traceback (most recent call last):

Dec  7 13:20:01 paragogos-desktop airtime_analyzer[16942]:   File "/usr/local/lib/python2.7/dist-packages/airtime_analyzer-0.1-py2.7.egg/airtime_analyzer/analyzer_pipeline.py", line 73, in run_analysis

Dec  7 13:20:01 paragogos-desktop airtime_analyzer[16942]:     metadata = PlayabilityAnalyzer.analyze(audio_file_path, metadata)

Dec  7 13:20:01 paragogos-desktop airtime_analyzer[16942]:   File "/usr/local/lib/python2.7/dist-packages/airtime_analyzer-0.1-py2.7.egg/airtime_analyzer/playability_analyzer.py", line 30, in analyze

Dec  7 13:20:01 paragogos-desktop airtime_analyzer[16942]:     raise UnplayableFileError()

Dec  7 13:20:01 paragogos-desktop airtime_analyzer[16942]: UnplayableFileError

Ok, well there is obviously something amiss.

The first step in troubleshooting is to determine if it is something specific to the files or an intermittent failure of liquidsoap/airtime_analyzer.

Have you tried reuploading any of the failed files and does it reject them everytime ?

If so are there any of the files that are publically available so that another developer can replicate the problem ?

If they are sometimes accepted and sometimes rejected then this means the error is located elsewhere.