Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

com.botdarr.api.CacheProfileStrategy - Did not find any profiles available for caching, class=class com.botdarr.api.sonarr.SonarrApi$2 #114

Closed
daedric7 opened this issue Dec 13, 2023 · 10 comments · Fixed by #115 or #116
Assignees
Labels

Comments

@daedric7
Copy link

Recently after a server migration, i've been getting errors both in the logs as well as Matrix room.

botdarr  | 2023-Dec-13 09:00:23 AM [pool-2-thread-1] WARN  com.botdarr.api.CacheProfileStrategy - Did not find any profiles available for caching, class=class com.botdarr.api.sonarr.SonarrApi$2
botdarr  | 2023-Dec-13 09:02:23 AM [pool-2-thread-1] WARN  com.botdarr.api.CacheProfileStrategy - Did not find any profiles available for caching, class=class com.botdarr.api.sonarr.SonarrApi$2
botdarr  | 2023-Dec-13 09:04:23 AM [pool-2-thread-1] WARN  com.botdarr.api.CacheProfileStrategy - Did not find any profiles available for caching, class=class com.botdarr.api.sonarr.SonarrApi$2
botdarr  | 2023-Dec-13 09:06:24 AM [pool-2-thread-1] WARN  com.botdarr.api.CacheProfileStrategy - Did not find any profiles available for caching, class=class com.botdarr.api.sonarr.SonarrApi$2
botdarr  | 2023-Dec-13 09:08:24 AM [pool-2-thread-1] WARN  com.botdarr.api.CacheProfileStrategy - Did not find any profiles available for caching, class=class com.botdarr.api.sonarr.SonarrApi$2
botdarr  | 2023-Dec-13 09:10:24 AM [pool-2-thread-1] WARN  com.botdarr.api.CacheProfileStrategy - Did not find any profiles available for caching, class=class com.botdarr.api.sonarr.SonarrApi$2
botdarr  | 2023-Dec-13 09:12:24 AM [pool-2-thread-1] WARN  com.botdarr.api.CacheProfileStrategy - Did not find any profiles available for caching, class=class com.botdarr.api.sonarr.SonarrApi$2
botdarr  | 2023-Dec-13 09:14:24 AM [pool-2-thread-1] WARN  com.botdarr.api.CacheProfileStrategy - Did not find any profiles available for caching, class=class com.botdarr.api.sonarr.SonarrApi$2
botdarr  | 2023-Dec-13 09:16:25 AM [pool-2-thread-1] WARN  com.botdarr.api.CacheProfileStrategy - Did not find any profiles available for caching, class=class com.botdarr.api.sonarr.SonarrApi$2
botdarr  | 2023-Dec-13 09:18:25 AM [pool-2-thread-1] WARN  com.botdarr.api.CacheProfileStrategy - Did not find any profiles available for caching, class=class com.botdarr.api.sonarr.SonarrApi$2
botdarr  | 2023-Dec-13 09:20:25 AM [pool-2-thread-1] WARN  com.botdarr.api.CacheProfileStrategy - Did not find any profiles available for caching, class=class com.botdarr.api.sonarr.SonarrApi$2
botdarr  | 2023-Dec-13 09:22:28 AM [pool-2-thread-1] WARN  com.botdarr.api.CacheProfileStrategy - Did not find any profiles available for caching, class=class com.botdarr.api.sonarr.SonarrApi$2
botdarr  | 2023-Dec-13 09:24:28 AM [pool-2-thread-1] WARN  com.botdarr.api.CacheProfileStrategy - Did not find any profiles available for caching, class=class com.botdarr.api.sonarr.SonarrApi$2
botdarr  | 2023-Dec-13 09:26:28 AM [pool-2-thread-1] WARN  com.botdarr.api.CacheProfileStrategy - Did not find any profiles available for caching, class=class com.botdarr.api.sonarr.SonarrApi$2
botdarr  | 2023-Dec-13 09:28:28 AM [pool-2-thread-1] WARN  com.botdarr.api.CacheProfileStrategy - Did not find any profiles available for caching, class=class com.botdarr.api.sonarr.SonarrApi$2
botdarr  | 2023-Dec-13 09:30:29 AM [pool-2-thread-1] WARN  com.botdarr.api.CacheProfileStrategy - Did not find any profiles available for caching, class=class com.botdarr.api.sonarr.SonarrApi$2

image

It seems the bot cannot find Sonarr (V4) info:

image

Sonarr's profiles are the standard:

image

How can i help further debug this ?

@shayaantx
Copy link
Owner

@daedric7 can you zip the logs and provide the config for your container?

@daedric7
Copy link
Author

Sure:

logs.tar.gz


services:
    botdarr:
        image: shayaantx/botdarr:latest
        container_name: botdarr
        environment:
           RADARR_URL: https://radarr.domain.com
           RADARR_TOKEN: API
           RADARR_DEFAULT_PROFILE: Any
           RADARR_PATH: /share/media/jellyfin/movies
           SONARR_URL: https://sonarr.domain.com
           SONARR_TOKEN: API
           SONARR_DEFAULT_PROFILE: Any
           SONARR_PATH: /share/media/jellyfin/tvshows
           SONARR_V4: yes
           LIDARR_URL: https://lidarr.domain.com
           LIDARR_TOKEN: API
           LIDARR_DEFAULT_QUALITY_PROFILE: Any
           LIDARR_DEFAULT_METADATA_PROFILE: Standard
           LIDARR_PATH: /share/media/music
           MATRIX_USERNAME: user
           MATRIX_PASSWORD: password
           MATRIX_ROOM: "!room:matrix.org"
           MATRIX_HOME_SERVER_URL: "https://domain.com"
        volumes:
           - ./logs:/home/botdarr/logs
           - ./database:/home/botdarr/database
           - /share/media:/share/media

@shayaantx
Copy link
Owner

shayaantx commented Dec 14, 2023

@daedric7 so it seems like you're getting a mix of

2023-Dec-14 08:02:39 AM [pool-2-thread-1] WARN  com.botdarr.api.CacheProfileStrategy - Did not find any profiles available for caching, class=class com.botdarr.api.sonarr.SonarrApi$2
2023-Dec-14 08:02:03 AM [pool-3-thread-1] ERROR com.botdarr.connections.ConnectionHelper - Non 200 status code returned from request, code=404, reason=Not Found

When you have v4 enabled, the api would look something like this https:///api/v3/qualityprofile

I tried in sonarr 3.0.7.1477 and it works fine (but I will try with latest version).

Also I noticed below matrix error, I assume that's been corrected. I created a new version that logs exception stack traces to get more info, but it seems like your matrix server is going down at some point, but if you pull latest version, we can get the stack trace next time this happens.

2023-Dec-13 11:31:46 AM [main] ERROR com.botdarr.clients.matrix.MatrixChatClient - Error during event listener
java.lang.NullPointerException: null
2023-Dec-13 11:31:46 AM [main] ERROR com.botdarr.connections.ConnectionHelper - Non 200 status code returned from request, code=502, reason=Bad Gateway

Can you do following:

  1. Pull latest (I just kicked off a new version that logs exceptions, since it wasn't before)
  2. Add the env variable LOG_LEVEL, with the setting "DEBUG"
  3. Post your sonarr version
  4. Reproduce issue and reattach logs

@daedric7
Copy link
Author

Logs:

botdarr  | Dec 15, 2023 10:07:40 AM org.flywaydb.core.internal.logging.slf4j.Slf4jLog info
botdarr  | INFO: Flyway Community Edition 6.2.4 by Redgate
botdarr  | Dec 15, 2023 10:07:40 AM org.flywaydb.core.internal.logging.slf4j.Slf4jLog info
botdarr  | INFO: Database: jdbc:sqlite:database/botdarr.db (SQLite 3.30)
botdarr  | Dec 15, 2023 10:07:40 AM org.flywaydb.core.internal.logging.slf4j.Slf4jLog info
botdarr  | INFO: Successfully validated 3 migrations (execution time 00:00.008s)
botdarr  | Dec 15, 2023 10:07:40 AM org.flywaydb.core.internal.logging.slf4j.Slf4jLog info
botdarr  | INFO: Current version of schema "main": 3
botdarr  | Dec 15, 2023 10:07:40 AM org.flywaydb.core.internal.logging.slf4j.Slf4jLog info
botdarr  | INFO: Schema "main" is up to date. No migration necessary.
botdarr  | 2023-Dec-15 10:07:41 AM [main] DEBUG com.botdarr.api.CacheContentStrategy - Finished caching content data for host radarr.aguiarvieira.pt
botdarr  | 2023-Dec-15 10:07:41 AM [main] WARN  com.botdarr.api.CacheProfileStrategy - Did not find any profiles available for caching, class=class com.botdarr.api.sonarr.SonarrApi$2
botdarr  | 2023-Dec-15 10:07:41 AM [main] DEBUG com.botdarr.api.CacheContentStrategy - Finished caching content data for host sonarr.aguiarvieira.pt
botdarr  | 2023-Dec-15 10:07:42 AM [main] DEBUG com.botdarr.api.CacheContentStrategy - Finished caching content data for host lidarr.aguiarvieira.pt
botdarr  | 2023-Dec-15 10:07:42 AM [pool-2-thread-1] DEBUG com.botdarr.api.CacheContentStrategy - Finished caching content data for host radarr.aguiarvieira.pt
botdarr  | 2023-Dec-15 10:07:42 AM [pool-2-thread-1] WARN  com.botdarr.api.CacheProfileStrategy - Did not find any profiles available for caching, class=class com.botdarr.api.sonarr.SonarrApi$2
botdarr  | 2023-Dec-15 10:07:42 AM [pool-2-thread-1] DEBUG com.botdarr.api.CacheContentStrategy - Finished caching content data for host sonarr.aguiarvieira.pt
botdarr  | 2023-Dec-15 10:07:42 AM [pool-2-thread-1] DEBUG com.botdarr.api.CacheContentStrategy - Finished caching content data for host lidarr.aguiarvieira.pt
botdarr  | 2023-Dec-15 10:08:54 AM [pool-5-thread-1] DEBUG com.botdarr.clients.ChatClientBootstrap - Processing command . for username @daedric:aguiarvieira.pt with prefix !
botdarr  | 2023-Dec-15 10:09:42 AM [pool-2-thread-1] DEBUG com.botdarr.api.CacheContentStrategy - Finished caching content data for host radarr.aguiarvieira.pt
botdarr  | 2023-Dec-15 10:09:42 AM [pool-2-thread-1] WARN  com.botdarr.api.CacheProfileStrategy - Did not find any profiles available for caching, class=class com.botdarr.api.sonarr.SonarrApi$2
botdarr  | 2023-Dec-15 10:09:42 AM [pool-2-thread-1] DEBUG com.botdarr.api.CacheContentStrategy - Finished caching content data for host sonarr.aguiarvieira.pt
botdarr  | 2023-Dec-15 10:09:42 AM [pool-2-thread-1] DEBUG com.botdarr.api.CacheContentStrategy - Finished caching content data for host lidarr.aguiarvieira.pt

Sonar:

Version 4.0.0.734
Package Version
 4.0.0.734-ls14 by [linuxserver.io](https://linuxserver.io/)
.NET
 Yes (6.0.13)
Docker
 Yes
Database
 Sqlite 3.41.2
AppData directory
 /config
Startup directory
 /app/sonarr/bin
Mode
 Console
Uptime

@shayaantx shayaantx self-assigned this Dec 16, 2023
@shayaantx
Copy link
Owner

shayaantx commented Dec 16, 2023

@daedric7 I pulled latest sonarr and ran it and seems to find profiles fine.

image

Can you zip entire logs directory again, since there are logs in network.log as well I want to see.

Can you also fetch your api key from sonarr and fill in the below curl command and run it and tell me what you get back? You should get back what I posted in my example

curl http://<replace-with-sonarr-ip>:<replace-with-sonarr-port>/api/v3/qualityprofile?apiKey=<put-sonarr-api-key-here>
curl http://<replace-with-sonarr-ip>:<replace-with-sonarr-port>/docs/v3/openapi.json
$ curl http://192.168.1.12:8989/api/v3/qualityprofile?apiKey=<omitted>
[
  {
    "name": "any",
    "upgradeAllowed": false,
    "cutoff": 1,
    "items": [
      {
        "quality": {
          "id": 0,
          "name": "Unknown",
          "source": "unknown",
          "resolution": 0
        },
        "items": [],
        "allowed": false
      },

Also if you're on discord or matrix or whatever and you want to troubleshoot live, post your username, and I can add you

Thanks

@shayaantx
Copy link
Owner

@daedric7 ?

Repository owner deleted a comment from daedric7 Dec 20, 2023
@shayaantx
Copy link
Owner

@daedric7 sent you a matrix DM from @shayaantx:matrix.org

@shayaantx
Copy link
Owner

@daedric7 check your matrix DMs, the issue is because you're passing "no" for sonarr_v4 flag when it should only be true/false, which I understand the docs state "no" being the default value. So I updated docs + added error check when non true/false is configured for this property, you should be able to pull safely

(also check DMs for why I deleted last comment)

#115

@shayaantx
Copy link
Owner

pushed out a release for this change, let me know if you still have issues

@shayaantx
Copy link
Owner

confirmed with @daedric7 via DM this is fixed now

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
2 participants