toddrob99 / searcharr

Sonarr & Radarr & Readarr Telegram Bot
MIT License
247 stars 61 forks source link

Searcharr Keeps Restarting #94

Closed walterusinggithub closed 7 months ago

walterusinggithub commented 7 months ago

running version 3.2.2 on a synology nas in a docker container. searcharr has been working great, for many many months. then last week it keeps restarting indefinitely. my sonarr version 4.0.1.929-ls224.... I have attached logs below. I also verified my api keys were correct, and revoked the token from the telegram bot and made a new one. Any advice on what to try next?

`

2024-02-13T23:33:38.627271681Z stdout requests.exceptions.HTTPError: 404 Client Error: Not Found for url: http://192.168.1.XXX:8989/api/profile?apikey=XXXXXXXXXXXXX
2024-02-13T23:33:38.627162566Z stdout raise HTTPError(http_error_msg, response=self)
2024-02-13T23:33:38.626584242Z stdout File "/usr/local/lib/python3.11/site-packages/requests/models.py", line 1021, in raise_for_status
2024-02-13T23:33:38.626362562Z stdout r.raise_for_status()
2024-02-13T23:33:38.626095719Z stdout File "/app/sonarr.py", line 250, in _api_get
2024-02-13T23:33:38.626018693Z stdout ^^^^^^^^^^^^^^^^^^^^^^^^^^^^
2024-02-13T23:33:38.625919403Z stdout return self._api_get("profile", {}) or None
2024-02-13T23:33:38.625825651Z stdout File "/app/sonarr.py", line 234, in get_all_quality_profiles
2024-02-13T23:33:38.625746062Z stdout ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
2024-02-13T23:33:38.625658110Z stdout self._quality_profiles = self.get_all_quality_profiles()
2024-02-13T23:33:38.625568371Z stdout File "/app/sonarr.py", line 26, in init
2024-02-13T23:33:38.625449343Z stdout sonarr.Sonarr(settings.sonarr_url, settings.sonarr_api_key, args.verbose)
2024-02-13T23:33:38.625351529Z stdout File "/app/searcharr.py", line 65, in init
2024-02-13T23:33:38.625272477Z stdout ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
2024-02-13T23:33:38.625176650Z stdout tgr = Searcharr(settings.tgram_token)
2024-02-13T23:33:38.624985597Z stdout File "/app/searcharr.py", line 1567, in 
2024-02-13T23:33:38.623689845Z stdout Traceback (most recent call last):

`

toddrob99 commented 7 months ago

404 Client Error: Not Found for url: http://192.168.1.xxx:8989/api/profile?apikey=XXXXXXXXXXXXX

The error message indicates Searcharr can't make an API call to Sonarr. Did you try the unredacted URL in your browser to make sure it works?

walterusinggithub commented 7 months ago

thank you for the very quick reply. Yes I did try that url in the browser but I am not sure what I am supposed to be seeing? It is just a blank page. It changes the browsers icon to a sonarr icon, and loads up, but nothing is there.

When I changed the port to radarrs port of 7878 and changed the api key to radarrs api key, the same thing happens. Blank page loads and browser icon in the tab changes to a radarr logo.

toddrob99 commented 7 months ago

Are you sure you're running Searcharr v3.2.2? Your stack trace appears to be from an older version before support was added for the new API endpoints in Sonarr v4.

toddrob99 commented 7 months ago

In Searcharr v3.2.2 it should be making a call to http://192.168.1.xxx:8989/api/v3/qualityprofile?apikey=XXXXXXXXXXXXX instead.

walterusinggithub commented 7 months ago

I updated the container using portainer, and it pulled with the "latest" tag. As far as I know I am running 3.2.2

Is there a way to find out?

In the mean time, I am going to create a whole new container and post back results. thank you again for the prompt responses.

toddrob99 commented 7 months ago

The first thing in your log file when Searcharr starts up should be a line that says "Searcharr vX.XX - Logging started!"

walterusinggithub commented 7 months ago

Okay, so making a secondary searcharr2 container worked just fine - I had to re-authenticate as a user in telegram and verified by trying to add something that was already in sonarr, and was presented with "already added!" button. so thats great and that works for me and I am happy.

For some reason I cannot figure out the version of the original searcharr container. Synology's docker gui gives me a log section but it doesnt have anything about "Logging Started" at the top or bottom of the log, and in searcharr/logs folder I have nothing.

toddrob99 commented 7 months ago

If you add the -v flag to the command in your docker run command or compose yaml, you'll get logging to the console. There's a wiki page about enabling debug logging that shows how to do it (to add the -v but the steps are the same).

You can copy the searcharr.db file to your new container's data volume to avoid having to authenticate again.