Problems with Podcast Import

Hi all,

I’m new to libretime and wanting to use it for a podcast radio station. In the past, we have just used centovacast, but I’ve had to manually upload and manage all of the media. I found airtime a few months ago and then was so pleased to find libretime was being updated more frequently.

Anyway, I am trying to use the podcast functionality and I don’t know much about how to debug issues. But some of the podcast feeds, when i try to import episodes, it will spin, but the green check mark will never appear and the track doesn’t seem to be imported. There are no errors thrown, so I’m unsure how to troubleshoot this.

Other podcasts work fine. The feeds validate, so I don’t think it’s an issue with them.

Any help or even tips for how to go about debugging the podcast import feature would be really appreciated.

Thanks,
Adam

Hey Adam,
I responded on github first, but just to use the forum, here is the first part of my post with help regarding this issue.

Hey Adam, check out /var/log/airtime/airtime-celery.log and see if there are logs in there. The celery worker is what does the downloading of podcasts and it is likely that there are errors in there. It maybe they are timing out, there is another issue #220 that I created regarding a problem with podcasts failing if they take longer than 5 minutes to download.

That log does not exist. At least there is now airtime-celery.log in the location you gave me.

Ok, yeah for a while this file wasn’t being created but I modified the python-app to enable the logs a few months ago. When did you install LibreTime and did you install directly via git ? It maybe work reinstalling the airtime-celery python app from the latest source if you aren’t running that. As getting logs is the only reasonable way to diagnose this. If you can’t figure that out you can try modifying the manually increasing the timeout

Hey Rob,

I installed a new instance of LIbreTime on an Ubuntu VM that I created locally using Virtual Box. It’s running Ubuntu 16.04. I wanted to use this to debug this podcast issue, and also learn about the code base and set up my dev environment there. I cloned the repo and ran the ./install script. Everything seems to be working except the podcast import. In this installation, none of the imports are working, but it’s not throwing any errors. I just cloned the repo a few days ago, so I have the newest code, but I’m also still not seeing any celery logs. Any ideas?

Hmm, this is odd. Have you tried using vagrant to create and manage the virtual boxes ?

If you are already running linux as your host os you can just install vagrant and do
vagrant up ubuntu-xenial
and this will download and set everything up.

Not sure why you aren’t seeing any celery logs. I’d search in the issue queue on github for celery and see what I did to enable the celery logs and make sure everything is like that for your set-up.

I couldn’t find a celery log in that exact location either, but later think I found it elsewhere due to the fact that I’m running libretime in a docker container.

frecuencialibre@frecuencialibre:~/Música$ docker exec -it libretime-core bash
root@dff1a2367924:/# cat /var/log/airtime/airtime-celery.log
cat: /var/log/airtime/airtime-celery.log: No such file or directory
root@dff1a2367924:/# cd /var/log/airtime/
root@dff1a2367924:/var/log/airtime# ls
airtime_analyzer.log  pypo  pypo-liquidsoap  zendphp.log
root@dff1a2367924:/var/log/airtime# cd ../
root@dff1a2367924:/var/log# find -name "*celery*"
./supervisor/libretime-celery-stderr---supervisor-nN2mTs.log
./supervisor/libretime-celery-stdout---supervisor-mUAtxq.log
root@dff1a2367924:/var/log# cat supervisor/libretime-celery-stderr---supervisor-nN2mTs.log
[2018-10-19 19:09:26,681: ERROR/MainProcess] consumer: Cannot connect to amqp://libretime:**@libretime-rabbitmq:5672//libretime: [Errno 111] Connection refused.
Trying again in 2.00 seconds...

[2018-10-19 19:09:28,697: ERROR/MainProcess] consumer: Cannot connect to amqp://libretime:**@libretime-rabbitmq:5672//libretime: [Errno 111] Connection refused.
Trying again in 4.00 seconds...

[2018-10-19 19:09:32,713: ERROR/MainProcess] consumer: Cannot connect to amqp://libretime:**@libretime-rabbitmq:5672//libretime: [Errno 111] Connection refused.
Trying again in 6.00 seconds...

[2018-10-19 19:09:38,751: INFO/MainProcess] Connected to amqp://libretime:**@libretime-rabbitmq:5672//libretime
[2018-10-19 19:09:38,771: INFO/MainProcess] mingle: searching for neighbors
[2018-10-19 19:09:39,822: INFO/MainProcess] mingle: all alone
[2018-10-19 19:09:39,908: WARNING/MainProcess] celery@dff1a2367924 ready.
[2018-10-19 22:24:46,294: INFO/MainProcess] Received task: podcast-download[php_5bca59ae3d7c62.53987779]
[2018-10-19 22:24:46,790: INFO/Worker-1] podcast-download[php_5bca59ae3d7c62.53987779]: Error during file download: [Errno 2] No such file or directory
[2018-10-19 22:24:46,879: INFO/MainProcess] Task podcast-download[php_5bca59ae3d7c62.53987779] succeeded in 0.583985699999s: '{"status": 0, "episodeid": 1, "error": ""}'
[2018-10-19 22:52:45,756: INFO/MainProcess] Received task: podcast-download[php_5bca603db77b56.19410941]
[2018-10-19 22:52:46,184: INFO/Worker-2] podcast-download[php_5bca603db77b56.19410941]: Error during file download: [Errno 2] No such file or directory
[2018-10-19 22:52:46,262: INFO/MainProcess] Task podcast-download[php_5bca603db77b56.19410941] succeeded in 0.5050216s: '{"status": 0, "episodeid": 2, "error": ""}'
[2018-10-19 23:09:39,604: INFO/MainProcess] Received task: podcast-download[php_5bca6433926d43.31091726]
[2018-10-19 23:09:39,919: INFO/Worker-1] podcast-download[php_5bca6433926d43.31091726]: Error during file download: [Errno 2] No such file or directory
[2018-10-19 23:09:40,239: INFO/MainProcess] Task podcast-download[php_5bca6433926d43.31091726] succeeded in 0.634702182999s: '{"status": 0, "episodeid": 3, "error": ""}'

The feed I’m trying to load is here: https://noticiasdeabajoml.wordpress.com/feed/
I notice that they’ve also uploaded images to their wordpress posts, which are then shown in the feed. Could this be what is breaking things? I have contact with them and could suggest changes. thanks Robb!

Yep the podcast import fails at any file enclosures other than audio files. There is a bug for this on the GitHub and I think Johnny has a PR that might help but I wasn’t able to get it to work on the feed I tried it on. I suspect fixing things in the python code would be the best thing to do.

not even the democracy now feed is working for me, producing the same error i pasted above… perhaps that could be the feed used for testing? https://www.democracynow.org/podcast.xml

It looks there is a rabbitmq ampq error. That might be part or the cause of the problem.

i tried with http://wcrsfm.org/audio/user/1870/feed and can’t get it working either, so this is confirmed as an error with my docker instance. I posted a comment in gh.

i saw that rabbitmq ampq error early on in the log too. does rabbitmq do anything other than pass along the initial instruction to download the file?

it looked like following initial failure it was able to finally successfully connect:

root@dff1a2367924:/var/log/supervisor# cat /var/log/supervisor/libretime-celery-stderr---supervisor-BKBKwO.log
[2018-10-23 16:33:33,194: ERROR/MainProcess] consumer: Cannot connect to amqp://libretime:**@libretime-rabbitmq:5672//libretime: [Errno 111] Connection refused.
Trying again in 2.00 seconds...

[2018-10-23 16:33:35,207: ERROR/MainProcess] consumer: Cannot connect to amqp://libretime:**@libretime-rabbitmq:5672//libretime: [Errno 111] Connection refused.
Trying again in 4.00 seconds...

[2018-10-23 16:33:39,227: ERROR/MainProcess] consumer: Cannot connect to amqp://libretime:**@libretime-rabbitmq:5672//libretime: [Errno 111] Connection refused.
Trying again in 6.00 seconds...

[2018-10-23 16:33:45,265: INFO/MainProcess] Connected to amqp://libretime:**@libretime-rabbitmq:5672//libretime

and that the download then started:

[2018-10-26 15:51:03,651: INFO/MainProcess] Received task: podcast-download[php_5bd337e7817b36.98894202]

only to later fail:

[2018-10-26 15:52:32,221: INFO/Worker-5] podcast-download[php_5bd337e7817b36.98894202]: Error during file download: [Errno 2] No such file or directory
[2018-10-26 15:52:32,266: INFO/MainProcess] Task podcast-download[php_5bd337e7817b36.98894202] succeeded in 88.613271934s: '{"status": 0, "episodeid": 45, "error": ""}'

so would this mean that the error is no longer in rabbitmq’s “court”?