morpheus65535 / bazarr

Bazarr is a companion application to Sonarr and Radarr. It manages and downloads subtitles based on your requirements. You define your preferences by TV show or movie and Bazarr takes care of everything for you.
https://www.bazarr.media
GNU General Public License v3.0
2.78k stars 218 forks source link

Stuck in a starting, existed loop #2098

Closed nodiaque closed 1 year ago

nodiaque commented 1 year ago

Describe the bug When I start bazarr, it keep restarting itself. Log show it's starting then exited

To Reproduce Steps to reproduce the behavior: Start the container and wait

Expected behavior Container to start and stay started

Screenshots image

Software (please complete the following information):

Additional context Debug Log File [Attached] bazarr.log

morpheus65535 commented 1 year ago

Could be an issue with mediainfo binary. Are you running LSIO docker image?

nodiaque commented 1 year ago

I'm running hotio docker.

It was running fine until I restarted the container. I forgot to reboot it when I added the root folder for reversed proxy. Before it was working, although I had many unable to analyze but it was working.

morpheus65535 commented 1 year ago

Ok so you've changed base url and once you've restarted it running into a loop... I'm pretty sure it's unrelated. Are you able to restore a backup or reconfigure from scratch to identify a specific root cause?

nodiaque commented 1 year ago

I've just installed it. I could redo everything, I simply followed trash guide on install and configure, added embed and 2 other providers and that's about it

morpheus65535 commented 1 year ago

and you changed ffprobe to mediainfo?

nodiaque commented 1 year ago

Yup, log showed it was trying with media info. I restarted about 3 hours after changing the config. I could try to put ffprobe again

morpheus65535 commented 1 year ago

Please. Just to be sure we narrow it to that.

nodiaque commented 1 year ago

Ok, manage to switch to ffprobe and it's not closing again. So it's an issue with medianinfo

nodiaque commented 1 year ago

I'm using docker cr.hotio.dev/hotio/bazarr since it was the one in trash guide. Seemed to be the samething as the other bazarr in unraid

nodiaque commented 1 year ago

So since I switched to ffprobe, it's working fine. Reason why I switch is because there's a lot of

BAZARR ffprobe cannot analyze this video file /media/TV/Gotham/Season 3/S03E06 - Mad City - Follow the White Rabbit.mkv. Could it be corrupted?

Error, but had same error with mediainfo. Weird is I can open those file no problem, watch them and run mediainfo on them. I also have 777 on each of the file.

Is there a place to say don't analyze specific extension? I saw it tried to scan avi file.

dreondre commented 1 year ago

I'm facing the same problem. I enabled debug logging. This is around the tail end where it stops and restarts Bazarr

18/03/2023 18:13:22|DEBUG   |urllib3.connectionpool          |Starting new HTTP connection (1): ***.***.***.***:8991|
18/03/2023 18:13:22|DEBUG   |urllib3.connectionpool          |http://***.***.***.***:8991 "GET /api/v3/tag?apikey=(removed) HTTP/1.1" 200 None|
18/03/2023 18:13:22|DEBUG   |urllib3.connectionpool          |Starting new HTTP connection (1): ***.***.***.***:8991|
18/03/2023 18:13:22|DEBUG   |urllib3.connectionpool          |Starting new HTTP connection (1): ***.***.***.***:8991|
18/03/2023 18:13:22|DEBUG   |urllib3.connectionpool          |http://***.***.***.***:8991 "GET /api/v3/series/?apikey=(removed) HTTP/1.1" 200 None|
18/03/2023 18:13:22|INFO    |socketio.server                 |emitting event "data" to all [/]|
18/03/2023 18:13:22|DEBUG   |urllib3.connectionpool          |Starting new HTTP connection (1): ***.***.***.***:8991|
18/03/2023 18:13:22|DEBUG   |urllib3.connectionpool          |http://***.***.***.***:8991 "GET /api/v3/episode?seriesId=1&apikey=(removed) HTTP/1.1" 200 None|
18/03/2023 18:13:22|DEBUG   |urllib3.connectionpool          |Starting new HTTP connection (1): ***.***.***.***:8991|
18/03/2023 18:13:22|DEBUG   |urllib3.connectionpool          |http://***.***.***.***:8991 "GET /api/v3/episodeFile?seriesId=1&apikey=(removed) HTTP/1.1" 200 None|
18/03/2023 18:13:22|DEBUG   |peewee                          |('SELECT "t1"."ffprobe_cache" FROM "table_episodes" AS "t1" WHERE ("t1"."path" = ?) LIMIT ? OFFSET ?', ['/tv/Chainsaw Man (2022) {imdb-tt13616990}/Season 01/Chainsaw Man (2022) - S01E01 - DOG and CHAINSAW [WEBDL-1080p][AAC 2.0][h265]-APEX.mp4', 1, 0])|
18/03/2023 18:13:22|DEBUG   |root                            |BAZARR returning this binary: /usr/bin/mediainfo|
18/03/2023 18:13:22|DEBUG   |urllib3.connectionpool          |http://***.***.***.***:8991 "GET /api/v3/series/?apikey=(removed) HTTP/1.1" 200 None|
18/03/2023 18:13:22|DEBUG   |peewee                          |('SELECT "t1"."sonarrSeriesId" FROM "table_shows" AS "t1"', [])|
18/03/2023 18:13:22|INFO    |socketio.server                 |emitting event "data" to all [/]|
18/03/2023 18:13:22|INFO    |socketio.server                 |emitting event "data" to all [/]|
18/03/2023 18:13:22|INFO    |socketio.server                 |emitting event "data" to all [/]|
18/03/2023 18:13:22|INFO    |socketio.server                 |emitting event "data" to all [/]|
18/03/2023 18:13:22|INFO    |socketio.server                 |emitting event "data" to all [/]|
18/03/2023 18:13:22|DEBUG   |peewee                          |('SELECT "t1"."title", "t1"."path", "t1"."tvdbId", "t1"."sonarrSeriesId", "t1"."overview", "t1"."poster", "t1"."fanart", "t1"."audio_language", "t1"."sortTitle", "t1"."year", "t1"."alternativeTitles", "t1"."tags",
"8/03/2023 18:13:28|DEBUG   |root                            |Python version: 3.10.10|

Just like @nodiaque, when I revert back to ffprobe, the problem goes away.

dreondre commented 1 year ago

I tried changing use_ffprobe_cache = False but it made no difference.

morpheus65535 commented 1 year ago

I tried changing use_ffprobe_cache = False but it made no difference.

That's expected but thanks anyway. I'll try to test mediainfo with hotio and LSIO images ASAP.

si458 commented 1 year ago

I think I'm having a similar issue, I use the linuxserver container (latest image) spotted my bazarr container wasn't running, restarted docker server, container starts fine but bazarr never actually starts? I made no config changes what so ever Any suggestions?

morpheus65535 commented 1 year ago

I think I'm having a similar issue, I use the linuxserver container (latest image) spotted my bazarr container wasn't running, restarted docker server, container starts fine but bazarr never actually starts? I made no config changes what so ever Any suggestions?

If you haven't changed from ffprobe to mediainfo, you have a different issue. Make sure you didn't change the listening IP address in settings. It must stay 0.0.0.0.

si458 commented 1 year ago

I think I'm having a similar issue, I use the linuxserver container (latest image) spotted my bazarr container wasn't running, restarted docker server, container starts fine but bazarr never actually starts? I made no config changes what so ever Any suggestions?

If you haven't changed from ffprobe to mediainfo, you have a different issue. Make sure you didn't change the listening IP address in settings. It must stay 0.0.0.0.

I think my issue is a bad Internet connection maybe as it sits there after connecting to github the debug logs show? (Logs bk to front sorry stupid portainer)

2023-03-18 22:22:31,596 - root                             (7f5c151d9b48) :  DEBUG (binaries:47) - BAZARR returning this binary: /usr/bin/ffprobe
2023-03-18 22:22:31,599 - urllib3.connectionpool           (7f5c151d9b48) :  DEBUG (connectionpool:1003) - Starting new HTTPS connection (1): raw.githubusercontent.com:443
2023-03-18 22:22:31,596 - root                             (7f5c151d9b48) :  DEBUG (binaries:47) - BAZARR returning this binary: /usr/bin/ffmpeg
2023-03-18 22:22:31,584 - app.database                     (7f5c151d9b48) :  DEBUG (database:50) - Connecting to SQLite database: /config/db/bazarr.db
2023-03-18 22:22:30,323 - root                             (7f5c151d9b48) :  DEBUG (logger:112) - Python version: 3.10.10
2023-03-18 22:22:30,323 - root                             (7f5c151d9b48) :  DEBUG (logger:111) - Operating system: Linux-5.15.0-1029-kvm-x86_64-with
2023-03-18 22:22:30,319 - root                             (7f5c151d9b48) :  DEBUG (logger:110) - Bazarr branch: master
2023-03-18 22:22:30,319 - root                             (7f5c151d9b48) :  DEBUG (logger:109) - Bazarr version: 1.2.0
[custom-init] No custom files found, skipping...
morpheus65535 commented 1 year ago

@si458 please stop squatting this issue and create your own. They are unrelated.

morpheus65535 commented 1 year ago

I've just tried to fix this. Let me know if upcoming beta works as expected.

dreondre commented 1 year ago

I tried the latest development release of the LinuxServer image (published 2 hours ago) but the problem persists. I can try again later in the event another image gets pushed. I can provide more info (e.g. logs) later on if need be.

morpheus65535 commented 1 year ago

@dreondre thanks! I've open an issue with knowit module developer because it seems to be the one causing a segmentation fault that kill the python process that get restarted by Bazarr daemon (parent process).

morpheus65535 commented 1 year ago

Last commit should make it works but it's a temporary fix.

dreondre commented 1 year ago

@morpheus65535 I've confirmed it is stable now when mediainfo is set.

morpheus65535 commented 1 year ago

I've confirmed it is stable now when mediainfo is set.

Thanks! I'll keep this open until I get news from knowit dev.

Kooramah commented 1 year ago

I also ran into this loop when changing from ffprobe to mediainfo. I thought its because I changed the number of CPU threads I wanted to use. I thought it was odd that it did that but came here and found this.

I changed from latest to development and I'm no longer experiencing the issue. Thanks

jsmdy commented 1 year ago

I think I'm having a similar issue, I use the linuxserver container (latest image) spotted my bazarr container wasn't running, restarted docker server, container starts fine but bazarr never actually starts? I made no config changes what so ever Any suggestions?

same here on a seedbox :/

morpheus65535 commented 1 year ago

I'll close this issue as it related to an external library that I don't manage. I've never got any feed back to my issue so I don't expect this to be fixed soon.

In the meantime, use ffprobe instead of mediainfo.