[BUG] Cannot connect successfully to qBitorrent #101

Closed
opened 2025-10-09 16:58:24 -05:00 by giteasync · 14 comments
Owner

Originally created by @AlejandroAkbal on GitHub.

Before submitting a bug report, I have:

  • Reviewed the documentation.
  • Ensured I am using ghcr.io/flmorg/cleanuperr docker repository.
  • Ensured I am using the latest version.
  • Enabled verbose logging.

What is the behavior?

Cleanuperr fails to connect to qBittorrent with error 403, Unauthorized

But credentials are set correctly and work on both radarr and sonarr

Which operating system do you use?

Linux

What type of deployment do you use?

Docker container

Relevant log output

[2025-05-14 18:25:48.768 INF] cleanuperr v1.6.8
[2025-05-14 18:25:48.811 INF] timezone: (UTC) Coordinated Universal Time
[2025-05-14 18:25:48.830 DBG] Hosting starting
[2025-05-14 18:25:49.888 INF] Application started. Press Ctrl+C to shut down.
[2025-05-14 18:25:49.888 INF] Hosting environment: Production
[2025-05-14 18:25:49.890 INF] Content root path: /app
[2025-05-14 18:25:49.890 DBG] Hosting started
[2025-05-14 18:25:50.045 WRN]  [ContentBlocker] no blocklist is configured
[2025-05-14 18:25:51.582 ERR]    [QueueCleaner] failed to clean Sonarr instance | http://sonarr:8989/
System.Net.Http.HttpRequestException: Connection refused (sonarr:8989)
 ---> System.Net.Sockets.SocketException (111): Connection refused
   at System.Net.Sockets.Socket.AwaitableSocketAsyncEventArgs.ThrowException(SocketError error, CancellationToken cancellationToken)
   at System.Net.Sockets.Socket.AwaitableSocketAsyncEventArgs.System.Threading.Tasks.Sources.IValueTaskSource.GetResult(Int16 token)
   at System.Net.Sockets.Socket.<ConnectAsync>g__WaitForConnectWithCancellation|285_0(AwaitableSocketAsyncEventArgs saea, ValueTask connectTask, CancellationToken cancellationToken)
   at System.Net.Http.HttpConnectionPool.ConnectToTcpHostAsync(String host, Int32 port, HttpRequestMessage initialRequest, Boolean async, CancellationToken cancellationToken)
   --- End of inner exception stack trace ---
   at System.Net.Http.HttpConnectionPool.ConnectToTcpHostAsync(String host, Int32 port, HttpRequestMessage initialRequest, Boolean async, CancellationToken cancellationToken)
   at System.Net.Http.HttpConnectionPool.ConnectAsync(HttpRequestMessage request, Boolean async, CancellationToken cancellationToken)
   at System.Net.Http.HttpConnectionPool.CreateHttp11ConnectionAsync(HttpRequestMessage request, Boolean async, CancellationToken cancellationToken)
   at System.Net.Http.HttpConnectionPool.InjectNewHttp11ConnectionAsync(QueueItem queueItem)
   at System.Threading.Tasks.TaskCompletionSourceWithCancellation`1.WaitWithCancellationAsync(CancellationToken cancellationToken)
   at System.Net.Http.HttpConnectionPool.SendWithVersionDetectionAndRetryAsync(HttpRequestMessage request, Boolean async, Boolean doRequestAuth, CancellationToken cancellationToken)
   at System.Net.Http.RedirectHandler.SendAsync(HttpRequestMessage request, Boolean async, CancellationToken cancellationToken)
   at Microsoft.Extensions.Http.Logging.LoggingHttpMessageHandler.<SendCoreAsync>g__Core|4_0(HttpRequestMessage request, Boolean useAsync, CancellationToken cancellationToken)
   at Microsoft.Extensions.Http.PolicyHttpMessageHandler.SendCoreAsync(HttpRequestMessage request, Context context, CancellationToken cancellationToken)
   at Polly.Retry.AsyncRetryEngine.ImplementationAsync[TResult](Func`3 action, Context context, CancellationToken cancellationToken, ExceptionPredicates shouldRetryExceptionPredicates, ResultPredicates`1 shouldRetryResultPredicates, Func`5 onRetryAsync, Int32 permittedRetryCount, IEnumerable`1 sleepDurationsEnumerable, Func`4 sleepDurationProvider, Boolean continueOnCapturedContext)
   at Polly.AsyncPolicy`1.ExecuteAsync(Func`3 action, Context context, CancellationToken cancellationToken, Boolean continueOnCapturedContext)
   at Microsoft.Extensions.Http.PolicyHttpMessageHandler.SendAsync(HttpRequestMessage request, CancellationToken cancellationToken)
   at Microsoft.Extensions.Http.Logging.LoggingScopeHttpMessageHandler.<SendCoreAsync>g__Core|4_0(HttpRequestMessage request, Boolean useAsync, CancellationToken cancellationToken)
   at System.Net.Http.HttpClient.<SendAsync>g__Core|83_0(HttpRequestMessage request, HttpCompletionOption completionOption, CancellationTokenSource cts, Boolean disposeCts, CancellationTokenSource pendingRequestsCts, CancellationToken originalCancellationToken)
   at Infrastructure.Verticals.Arr.ArrClient.GetQueueItemsAsync(ArrInstance arrInstance, Int32 page) in /app/Infrastructure/Verticals/Arr/ArrClient.cs:line 53
   at Infrastructure.Verticals.Arr.ArrQueueIterator.Iterate(IArrClient arrClient, ArrInstance arrInstance, Func`2 action) in /app/Infrastructure/Verticals/Arr/ArrQueueIterator.cs:line 27
   at Infrastructure.Verticals.QueueCleaner.QueueCleaner.ProcessInstanceAsync(ArrInstance instance, InstanceType instanceType, ArrConfig config) in /app/Infrastructure/Verticals/QueueCleaner/QueueCleaner.cs:line 69
   at Infrastructure.Verticals.Jobs.GenericHandler.ProcessArrConfigAsync(ArrConfig config, InstanceType instanceType, Boolean throwOnFailure) in /app/Infrastructure/Verticals/Jobs/GenericHandler.cs:line 85
[2025-05-14 18:25:51.660 ERR]    [QueueCleaner] failed to clean Radarr instance | http://radarr:7878/
System.Net.Http.HttpRequestException: Connection refused (radarr:7878)
 ---> System.Net.Sockets.SocketException (111): Connection refused
   at System.Net.Sockets.Socket.AwaitableSocketAsyncEventArgs.ThrowException(SocketError error, CancellationToken cancellationToken)
   at System.Net.Sockets.Socket.AwaitableSocketAsyncEventArgs.System.Threading.Tasks.Sources.IValueTaskSource.GetResult(Int16 token)
   at System.Net.Sockets.Socket.<ConnectAsync>g__WaitForConnectWithCancellation|285_0(AwaitableSocketAsyncEventArgs saea, ValueTask connectTask, CancellationToken cancellationToken)
   at System.Net.Http.HttpConnectionPool.ConnectToTcpHostAsync(String host, Int32 port, HttpRequestMessage initialRequest, Boolean async, CancellationToken cancellationToken)
   --- End of inner exception stack trace ---
   at System.Net.Http.HttpConnectionPool.ConnectToTcpHostAsync(String host, Int32 port, HttpRequestMessage initialRequest, Boolean async, CancellationToken cancellationToken)
   at System.Net.Http.HttpConnectionPool.ConnectAsync(HttpRequestMessage request, Boolean async, CancellationToken cancellationToken)
   at System.Net.Http.HttpConnectionPool.CreateHttp11ConnectionAsync(HttpRequestMessage request, Boolean async, CancellationToken cancellationToken)
   at System.Net.Http.HttpConnectionPool.InjectNewHttp11ConnectionAsync(QueueItem queueItem)
   at System.Threading.Tasks.TaskCompletionSourceWithCancellation`1.WaitWithCancellationAsync(CancellationToken cancellationToken)
   at System.Net.Http.HttpConnectionPool.SendWithVersionDetectionAndRetryAsync(HttpRequestMessage request, Boolean async, Boolean doRequestAuth, CancellationToken cancellationToken)
   at System.Net.Http.RedirectHandler.SendAsync(HttpRequestMessage request, Boolean async, CancellationToken cancellationToken)
   at Microsoft.Extensions.Http.Logging.LoggingHttpMessageHandler.<SendCoreAsync>g__Core|4_0(HttpRequestMessage request, Boolean useAsync, CancellationToken cancellationToken)
   at Microsoft.Extensions.Http.PolicyHttpMessageHandler.SendCoreAsync(HttpRequestMessage request, Context context, CancellationToken cancellationToken)
   at Polly.Retry.AsyncRetryEngine.ImplementationAsync[TResult](Func`3 action, Context context, CancellationToken cancellationToken, ExceptionPredicates shouldRetryExceptionPredicates, ResultPredicates`1 shouldRetryResultPredicates, Func`5 onRetryAsync, Int32 permittedRetryCount, IEnumerable`1 sleepDurationsEnumerable, Func`4 sleepDurationProvider, Boolean continueOnCapturedContext)
   at Polly.AsyncPolicy`1.ExecuteAsync(Func`3 action, Context context, CancellationToken cancellationToken, Boolean continueOnCapturedContext)
   at Microsoft.Extensions.Http.PolicyHttpMessageHandler.SendAsync(HttpRequestMessage request, CancellationToken cancellationToken)
   at Microsoft.Extensions.Http.Logging.LoggingScopeHttpMessageHandler.<SendCoreAsync>g__Core|4_0(HttpRequestMessage request, Boolean useAsync, CancellationToken cancellationToken)
   at System.Net.Http.HttpClient.<SendAsync>g__Core|83_0(HttpRequestMessage request, HttpCompletionOption completionOption, CancellationTokenSource cts, Boolean disposeCts, CancellationTokenSource pendingRequestsCts, CancellationToken originalCancellationToken)
   at Infrastructure.Verticals.Arr.ArrClient.GetQueueItemsAsync(ArrInstance arrInstance, Int32 page) in /app/Infrastructure/Verticals/Arr/ArrClient.cs:line 53
   at Infrastructure.Verticals.Arr.ArrQueueIterator.Iterate(IArrClient arrClient, ArrInstance arrInstance, Func`2 action) in /app/Infrastructure/Verticals/Arr/ArrQueueIterator.cs:line 27
   at Infrastructure.Verticals.QueueCleaner.QueueCleaner.ProcessInstanceAsync(ArrInstance instance, InstanceType instanceType, ArrConfig config) in /app/Infrastructure/Verticals/QueueCleaner/QueueCleaner.cs:line 69
   at Infrastructure.Verticals.Jobs.GenericHandler.ProcessArrConfigAsync(ArrConfig config, InstanceType instanceType, Boolean throwOnFailure) in /app/Infrastructure/Verticals/Jobs/GenericHandler.cs:line 85
[2025-05-14 18:30:00.003 WRN]  [ContentBlocker] no blocklist is configured
[2025-05-14 18:30:01.224 INF]    [QueueCleaner] [Sonarr] 27 items found in queue | http://sonarr:8989/
[2025-05-14 18:30:01.228 VRB]    [QueueCleaner] [Sonarr] processing | Doom Patrol S01E09 Jane Patrol 1080p DCU Webrip x265 AAC 2 0 - Goki [SEV] | 082758CE41CA1E7371FC7FE0A9A3A5B8785FA380
[2025-05-14 18:30:01.241 ERR]    [QueueCleaner] failed to clean Sonarr instance | http://sonarr:8989/
QBittorrent.Client.QBittorrentClientRequestException: Response status code does not indicate success: 403 (Forbidden).
   at QBittorrent.Client.Extensions.HttpClientExtensions.EnsureSuccessStatusCodeEx(HttpResponseMessage message)
   at QBittorrent.Client.Extensions.HttpClientExtensions.GetStringWithCancellationAsync(HttpClient client, Uri uri, Boolean returnEmptyIfNotFound, CancellationToken token)
   at QBittorrent.Client.QBittorrentClient.<>c__DisplayClass20_0.<<GetTorrentListAsync>g__ExecuteAsync|0>d.MoveNext()
--- End of stack trace from previous location ---
   at Infrastructure.Verticals.DownloadClient.QBittorrent.QBitService.ShouldRemoveFromArrQueueAsync(String hash, IReadOnlyList`1 ignoredDownloads) in /app/Infrastructure/Verticals/DownloadClient/QBittorrent/QBitService.cs:line 71
   at Infrastructure.Verticals.QueueCleaner.QueueCleaner.<>c__DisplayClass4_0.<<ProcessInstanceAsync>b__0>d.MoveNext() in /app/Infrastructure/Verticals/QueueCleaner/QueueCleaner.cs:line 119
--- End of stack trace from previous location ---
   at Infrastructure.Verticals.Arr.ArrQueueIterator.Iterate(IArrClient arrClient, ArrInstance arrInstance, Func`2 action) in /app/Infrastructure/Verticals/Arr/ArrQueueIterator.cs:line 43
   at Infrastructure.Verticals.QueueCleaner.QueueCleaner.ProcessInstanceAsync(ArrInstance instance, InstanceType instanceType, ArrConfig config) in /app/Infrastructure/Verticals/QueueCleaner/QueueCleaner.cs:line 69
   at Infrastructure.Verticals.Jobs.GenericHandler.ProcessArrConfigAsync(ArrConfig config, InstanceType instanceType, Boolean throwOnFailure) in /app/Infrastructure/Verticals/Jobs/GenericHandler.cs:line 85
[2025-05-14 18:30:01.251 INF]    [QueueCleaner] [Radarr] 3 items found in queue | http://radarr:7878/
[2025-05-14 18:30:01.252 VRB]    [QueueCleaner] [Radarr] processing | Girl.with.a.Pearl.Earring.2003.RERiP.1080p.BluRay.x264-VETO [PublicHD] | 3440412F005D4655B5B183B399387EABAE13C142
[2025-05-14 18:30:01.253 ERR]    [QueueCleaner] failed to clean Radarr instance | http://radarr:7878/
QBittorrent.Client.QBittorrentClientRequestException: Response status code does not indicate success: 403 (Forbidden).
   at QBittorrent.Client.Extensions.HttpClientExtensions.EnsureSuccessStatusCodeEx(HttpResponseMessage message)
   at QBittorrent.Client.Extensions.HttpClientExtensions.GetStringWithCancellationAsync(HttpClient client, Uri uri, Boolean returnEmptyIfNotFound, CancellationToken token)
   at QBittorrent.Client.QBittorrentClient.<>c__DisplayClass20_0.<<GetTorrentListAsync>g__ExecuteAsync|0>d.MoveNext()
--- End of stack trace from previous location ---
   at Infrastructure.Verticals.DownloadClient.QBittorrent.QBitService.ShouldRemoveFromArrQueueAsync(String hash, IReadOnlyList`1 ignoredDownloads) in /app/Infrastructure/Verticals/DownloadClient/QBittorrent/QBitService.cs:line 71
   at Infrastructure.Verticals.QueueCleaner.QueueCleaner.<>c__DisplayClass4_0.<<ProcessInstanceAsync>b__0>d.MoveNext() in /app/Infrastructure/Verticals/QueueCleaner/QueueCleaner.cs:line 119
--- End of stack trace from previous location ---
   at Infrastructure.Verticals.Arr.ArrQueueIterator.Iterate(IArrClient arrClient, ArrInstance arrInstance, Func`2 action) in /app/Infrastructure/Verticals/Arr/ArrQueueIterator.cs:line 43
   at Infrastructure.Verticals.QueueCleaner.QueueCleaner.ProcessInstanceAsync(ArrInstance instance, InstanceType instanceType, ArrConfig config) in /app/Infrastructure/Verticals/QueueCleaner/QueueCleaner.cs:line 69
   at Infrastructure.Verticals.Jobs.GenericHandler.ProcessArrConfigAsync(ArrConfig config, InstanceType instanceType, Boolean throwOnFailure) in /app/Infrastructure/Verticals/Jobs/GenericHandler.cs:line 85

Anything else?

This is my docker compose

Compose

services:
  qbittorrent:
    container_name: qbittorrent
    image: "linuxserver/qbittorrent:latest"
    environment:
      - SERVICE_FQDN_QBITTORRENT_8080
      - PUID=1000
      - PGID=1000
      - TZ=UTC
    volumes:
      - "qbittorrent-config:/config"
      - "torrent-downloads:/downloads"
    restart: unless-stopped

  bazarr:
    container_name: bazarr
    image: "linuxserver/bazarr:latest"
    environment:
      - SERVICE_FQDN_BAZARR_6767
      - PUID=1000
      - PGID=1000
      - TZ=UTC
    volumes:
      - "bazarr-config:/config"
      - "torrent-downloads:/downloads"
    depends_on:
      qbittorrent:
        condition: service_started
    restart: unless-stopped

  radarr:
    container_name: radarr
    image: "linuxserver/radarr:latest"
    environment:
      - SERVICE_FQDN_RADARR_7878
      - PUID=1000
      - PGID=1000
      - TZ=UTC
    volumes:
      - "radarr-config:/config"
      - "torrent-downloads:/downloads"
    depends_on:
      qbittorrent:
        condition: service_started
    restart: unless-stopped

  sonarr:
    container_name: sonarr
    image: "linuxserver/sonarr:latest"
    environment:
      - SERVICE_FQDN_SONARR_8989
      - PUID=1000
      - PGID=1000
      - TZ=UTC
    volumes:
      - "sonarr-config:/config"
      - "torrent-downloads:/downloads"
    depends_on:
      qbittorrent:
        condition: service_started
    restart: unless-stopped

  prowlarr:
    container_name: prowlarr
    image: "linuxserver/prowlarr:latest"
    environment:
      - SERVICE_FQDN_PROWLARR_9696
      - PUID=1000
      - PGID=1000
      - TZ=UTC
    volumes:
      - "prowlarr-config:/config"
    depends_on:
      sonarr:
        condition: service_started
      radarr:
        condition: service_started
      flaresolverr:
        condition: service_started
    restart: unless-stopped

  huntarr:
    container_name: huntarr
    image: huntarr/huntarr:latest
    environment:
      - SERVICE_FQDN_HUNTARR_9705
      - TZ=UTC
    volumes:
      - "huntarr-config:/config"
    depends_on:
      sonarr:
        condition: service_started
      radarr:
        condition: service_started
    restart: unless-stopped

  cleanuperr:
    container_name: cleanuperr
    image: ghcr.io/flmorg/cleanuperr:latest
    environment:
      - TZ=UTC

      - LOGGING__LOGLEVEL=Verbose

      - QUEUECLEANER__ENABLED=true
      - QUEUECLEANER__IMPORT_FAILED_MAX_STRIKES=5
      - QUEUECLEANER__STALLED_MAX_STRIKES=5
      - QUEUECLEANER__SLOW_MAX_STRIKES=5
      - QUEUECLEANER__SLOW_MIN_SPEED=0.5MB
      - QUEUECLEANER__SLOW_MAX_TIME=12

      - CONTENTBLOCKER__ENABLED=true

      - DOWNLOAD_CLIENT=qbittorrent
      - QBITTORRENT__URL=http://qbittorrent:8080
      - QBITTORRENT__USERNAME=${QBITTORRENT_USERNAME}
      - QBITTORRENT__PASSWORD=${QBITTORRENT_PASSWORD}

      - SONARR__ENABLED=true
      - SONARR__INSTANCES__0__URL=http://sonarr:8989
      - SONARR__INSTANCES__0__APIKEY=${SONARR_API_KEY}

      - RADARR__ENABLED=true
      - RADARR__INSTANCES__0__URL=http://radarr:7878
      - RADARR__INSTANCES__0__APIKEY=${RADARR_API_KEY}
    volumes:
      - "torrent-downloads:/downloads"
    depends_on:
      sonarr:
        condition: service_started
      radarr:
        condition: service_started
    restart: unless-stopped

  flaresolverr:
    container_name: flaresolverr
    image: "flaresolverr/flaresolverr:latest"
    environment:
      - TZ=UTC
    restart: unless-stopped

  recommendarr:
    container_name: recommendarr
    image: tannermiddleton/recommendarr:latest
    environment:
      - SERVICE_FQDN_RECOMMENDARR_3000
      - PUBLIC_URL=${SERVICE_FQDN_RECOMMENDARR_3000}
      - FORCE_SECURE_COOKIES=true
    volumes:
      - "recommendarr-data:/app/server/data"
    restart: unless-stopped

  streamyfin-optimized-versions-server:
    container_name: streamyfin-optimized-versions-server
    image: fredrikburmester/streamyfin-optimized-versions-server:master
    environment:
      - SERVICE_FQDN_STREAMYFIN-OPTIMIZED-VERSIONS-SERVER_3000
      - JELLYFIN_URL=http://jellyfin:8096
      - MAX_CONCURRENT_JOBS=1
    volumes:
      - "streamyfin-optimized-versions-server-cache:/usr/src/app/cache"
    depends_on:
      jellyfin:
        condition: service_started
    restart: unless-stopped

  jellyfin:
    container_name: jellyfin
    image: "linuxserver/jellyfin:latest"
    environment:
      - SERVICE_FQDN_JELLYFIN_8096
      - PUID=1000
      - PGID=1000
      - TZ=UTZ
      - DOCKER_MODS=ghcr.io/jumoog/intro-skipper
    volumes:
      - "jellyfin-config:/config"
      - "torrent-downloads:/data"
    restart: unless-stopped

  jellyseerr:
    container_name: jellyseerr
    image: "fallenbagel/jellyseerr:latest"
    environment:
      - SERVICE_FQDN_JELLYSEERR_5050
      - TZ=UTC
    volumes:
      - "jellyseerr-config:/app/config"
    restart: unless-stopped

Originally created by @AlejandroAkbal on GitHub. ### Before submitting a bug report, I have: - [x] Reviewed the documentation. - [x] Ensured I am using ghcr.io/flmorg/cleanuperr docker repository. - [x] Ensured I am using the latest version. - [x] Enabled verbose logging. ### What is the behavior? Cleanuperr fails to connect to qBittorrent with error 403, Unauthorized But credentials are set correctly and work on both radarr and sonarr ### Which operating system do you use? Linux ### What type of deployment do you use? Docker container ### Relevant log output ```shell [2025-05-14 18:25:48.768 INF] cleanuperr v1.6.8 [2025-05-14 18:25:48.811 INF] timezone: (UTC) Coordinated Universal Time [2025-05-14 18:25:48.830 DBG] Hosting starting [2025-05-14 18:25:49.888 INF] Application started. Press Ctrl+C to shut down. [2025-05-14 18:25:49.888 INF] Hosting environment: Production [2025-05-14 18:25:49.890 INF] Content root path: /app [2025-05-14 18:25:49.890 DBG] Hosting started [2025-05-14 18:25:50.045 WRN] [ContentBlocker] no blocklist is configured [2025-05-14 18:25:51.582 ERR] [QueueCleaner] failed to clean Sonarr instance | http://sonarr:8989/ System.Net.Http.HttpRequestException: Connection refused (sonarr:8989) ---> System.Net.Sockets.SocketException (111): Connection refused at System.Net.Sockets.Socket.AwaitableSocketAsyncEventArgs.ThrowException(SocketError error, CancellationToken cancellationToken) at System.Net.Sockets.Socket.AwaitableSocketAsyncEventArgs.System.Threading.Tasks.Sources.IValueTaskSource.GetResult(Int16 token) at System.Net.Sockets.Socket.<ConnectAsync>g__WaitForConnectWithCancellation|285_0(AwaitableSocketAsyncEventArgs saea, ValueTask connectTask, CancellationToken cancellationToken) at System.Net.Http.HttpConnectionPool.ConnectToTcpHostAsync(String host, Int32 port, HttpRequestMessage initialRequest, Boolean async, CancellationToken cancellationToken) --- End of inner exception stack trace --- at System.Net.Http.HttpConnectionPool.ConnectToTcpHostAsync(String host, Int32 port, HttpRequestMessage initialRequest, Boolean async, CancellationToken cancellationToken) at System.Net.Http.HttpConnectionPool.ConnectAsync(HttpRequestMessage request, Boolean async, CancellationToken cancellationToken) at System.Net.Http.HttpConnectionPool.CreateHttp11ConnectionAsync(HttpRequestMessage request, Boolean async, CancellationToken cancellationToken) at System.Net.Http.HttpConnectionPool.InjectNewHttp11ConnectionAsync(QueueItem queueItem) at System.Threading.Tasks.TaskCompletionSourceWithCancellation`1.WaitWithCancellationAsync(CancellationToken cancellationToken) at System.Net.Http.HttpConnectionPool.SendWithVersionDetectionAndRetryAsync(HttpRequestMessage request, Boolean async, Boolean doRequestAuth, CancellationToken cancellationToken) at System.Net.Http.RedirectHandler.SendAsync(HttpRequestMessage request, Boolean async, CancellationToken cancellationToken) at Microsoft.Extensions.Http.Logging.LoggingHttpMessageHandler.<SendCoreAsync>g__Core|4_0(HttpRequestMessage request, Boolean useAsync, CancellationToken cancellationToken) at Microsoft.Extensions.Http.PolicyHttpMessageHandler.SendCoreAsync(HttpRequestMessage request, Context context, CancellationToken cancellationToken) at Polly.Retry.AsyncRetryEngine.ImplementationAsync[TResult](Func`3 action, Context context, CancellationToken cancellationToken, ExceptionPredicates shouldRetryExceptionPredicates, ResultPredicates`1 shouldRetryResultPredicates, Func`5 onRetryAsync, Int32 permittedRetryCount, IEnumerable`1 sleepDurationsEnumerable, Func`4 sleepDurationProvider, Boolean continueOnCapturedContext) at Polly.AsyncPolicy`1.ExecuteAsync(Func`3 action, Context context, CancellationToken cancellationToken, Boolean continueOnCapturedContext) at Microsoft.Extensions.Http.PolicyHttpMessageHandler.SendAsync(HttpRequestMessage request, CancellationToken cancellationToken) at Microsoft.Extensions.Http.Logging.LoggingScopeHttpMessageHandler.<SendCoreAsync>g__Core|4_0(HttpRequestMessage request, Boolean useAsync, CancellationToken cancellationToken) at System.Net.Http.HttpClient.<SendAsync>g__Core|83_0(HttpRequestMessage request, HttpCompletionOption completionOption, CancellationTokenSource cts, Boolean disposeCts, CancellationTokenSource pendingRequestsCts, CancellationToken originalCancellationToken) at Infrastructure.Verticals.Arr.ArrClient.GetQueueItemsAsync(ArrInstance arrInstance, Int32 page) in /app/Infrastructure/Verticals/Arr/ArrClient.cs:line 53 at Infrastructure.Verticals.Arr.ArrQueueIterator.Iterate(IArrClient arrClient, ArrInstance arrInstance, Func`2 action) in /app/Infrastructure/Verticals/Arr/ArrQueueIterator.cs:line 27 at Infrastructure.Verticals.QueueCleaner.QueueCleaner.ProcessInstanceAsync(ArrInstance instance, InstanceType instanceType, ArrConfig config) in /app/Infrastructure/Verticals/QueueCleaner/QueueCleaner.cs:line 69 at Infrastructure.Verticals.Jobs.GenericHandler.ProcessArrConfigAsync(ArrConfig config, InstanceType instanceType, Boolean throwOnFailure) in /app/Infrastructure/Verticals/Jobs/GenericHandler.cs:line 85 [2025-05-14 18:25:51.660 ERR] [QueueCleaner] failed to clean Radarr instance | http://radarr:7878/ System.Net.Http.HttpRequestException: Connection refused (radarr:7878) ---> System.Net.Sockets.SocketException (111): Connection refused at System.Net.Sockets.Socket.AwaitableSocketAsyncEventArgs.ThrowException(SocketError error, CancellationToken cancellationToken) at System.Net.Sockets.Socket.AwaitableSocketAsyncEventArgs.System.Threading.Tasks.Sources.IValueTaskSource.GetResult(Int16 token) at System.Net.Sockets.Socket.<ConnectAsync>g__WaitForConnectWithCancellation|285_0(AwaitableSocketAsyncEventArgs saea, ValueTask connectTask, CancellationToken cancellationToken) at System.Net.Http.HttpConnectionPool.ConnectToTcpHostAsync(String host, Int32 port, HttpRequestMessage initialRequest, Boolean async, CancellationToken cancellationToken) --- End of inner exception stack trace --- at System.Net.Http.HttpConnectionPool.ConnectToTcpHostAsync(String host, Int32 port, HttpRequestMessage initialRequest, Boolean async, CancellationToken cancellationToken) at System.Net.Http.HttpConnectionPool.ConnectAsync(HttpRequestMessage request, Boolean async, CancellationToken cancellationToken) at System.Net.Http.HttpConnectionPool.CreateHttp11ConnectionAsync(HttpRequestMessage request, Boolean async, CancellationToken cancellationToken) at System.Net.Http.HttpConnectionPool.InjectNewHttp11ConnectionAsync(QueueItem queueItem) at System.Threading.Tasks.TaskCompletionSourceWithCancellation`1.WaitWithCancellationAsync(CancellationToken cancellationToken) at System.Net.Http.HttpConnectionPool.SendWithVersionDetectionAndRetryAsync(HttpRequestMessage request, Boolean async, Boolean doRequestAuth, CancellationToken cancellationToken) at System.Net.Http.RedirectHandler.SendAsync(HttpRequestMessage request, Boolean async, CancellationToken cancellationToken) at Microsoft.Extensions.Http.Logging.LoggingHttpMessageHandler.<SendCoreAsync>g__Core|4_0(HttpRequestMessage request, Boolean useAsync, CancellationToken cancellationToken) at Microsoft.Extensions.Http.PolicyHttpMessageHandler.SendCoreAsync(HttpRequestMessage request, Context context, CancellationToken cancellationToken) at Polly.Retry.AsyncRetryEngine.ImplementationAsync[TResult](Func`3 action, Context context, CancellationToken cancellationToken, ExceptionPredicates shouldRetryExceptionPredicates, ResultPredicates`1 shouldRetryResultPredicates, Func`5 onRetryAsync, Int32 permittedRetryCount, IEnumerable`1 sleepDurationsEnumerable, Func`4 sleepDurationProvider, Boolean continueOnCapturedContext) at Polly.AsyncPolicy`1.ExecuteAsync(Func`3 action, Context context, CancellationToken cancellationToken, Boolean continueOnCapturedContext) at Microsoft.Extensions.Http.PolicyHttpMessageHandler.SendAsync(HttpRequestMessage request, CancellationToken cancellationToken) at Microsoft.Extensions.Http.Logging.LoggingScopeHttpMessageHandler.<SendCoreAsync>g__Core|4_0(HttpRequestMessage request, Boolean useAsync, CancellationToken cancellationToken) at System.Net.Http.HttpClient.<SendAsync>g__Core|83_0(HttpRequestMessage request, HttpCompletionOption completionOption, CancellationTokenSource cts, Boolean disposeCts, CancellationTokenSource pendingRequestsCts, CancellationToken originalCancellationToken) at Infrastructure.Verticals.Arr.ArrClient.GetQueueItemsAsync(ArrInstance arrInstance, Int32 page) in /app/Infrastructure/Verticals/Arr/ArrClient.cs:line 53 at Infrastructure.Verticals.Arr.ArrQueueIterator.Iterate(IArrClient arrClient, ArrInstance arrInstance, Func`2 action) in /app/Infrastructure/Verticals/Arr/ArrQueueIterator.cs:line 27 at Infrastructure.Verticals.QueueCleaner.QueueCleaner.ProcessInstanceAsync(ArrInstance instance, InstanceType instanceType, ArrConfig config) in /app/Infrastructure/Verticals/QueueCleaner/QueueCleaner.cs:line 69 at Infrastructure.Verticals.Jobs.GenericHandler.ProcessArrConfigAsync(ArrConfig config, InstanceType instanceType, Boolean throwOnFailure) in /app/Infrastructure/Verticals/Jobs/GenericHandler.cs:line 85 [2025-05-14 18:30:00.003 WRN] [ContentBlocker] no blocklist is configured [2025-05-14 18:30:01.224 INF] [QueueCleaner] [Sonarr] 27 items found in queue | http://sonarr:8989/ [2025-05-14 18:30:01.228 VRB] [QueueCleaner] [Sonarr] processing | Doom Patrol S01E09 Jane Patrol 1080p DCU Webrip x265 AAC 2 0 - Goki [SEV] | 082758CE41CA1E7371FC7FE0A9A3A5B8785FA380 [2025-05-14 18:30:01.241 ERR] [QueueCleaner] failed to clean Sonarr instance | http://sonarr:8989/ QBittorrent.Client.QBittorrentClientRequestException: Response status code does not indicate success: 403 (Forbidden). at QBittorrent.Client.Extensions.HttpClientExtensions.EnsureSuccessStatusCodeEx(HttpResponseMessage message) at QBittorrent.Client.Extensions.HttpClientExtensions.GetStringWithCancellationAsync(HttpClient client, Uri uri, Boolean returnEmptyIfNotFound, CancellationToken token) at QBittorrent.Client.QBittorrentClient.<>c__DisplayClass20_0.<<GetTorrentListAsync>g__ExecuteAsync|0>d.MoveNext() --- End of stack trace from previous location --- at Infrastructure.Verticals.DownloadClient.QBittorrent.QBitService.ShouldRemoveFromArrQueueAsync(String hash, IReadOnlyList`1 ignoredDownloads) in /app/Infrastructure/Verticals/DownloadClient/QBittorrent/QBitService.cs:line 71 at Infrastructure.Verticals.QueueCleaner.QueueCleaner.<>c__DisplayClass4_0.<<ProcessInstanceAsync>b__0>d.MoveNext() in /app/Infrastructure/Verticals/QueueCleaner/QueueCleaner.cs:line 119 --- End of stack trace from previous location --- at Infrastructure.Verticals.Arr.ArrQueueIterator.Iterate(IArrClient arrClient, ArrInstance arrInstance, Func`2 action) in /app/Infrastructure/Verticals/Arr/ArrQueueIterator.cs:line 43 at Infrastructure.Verticals.QueueCleaner.QueueCleaner.ProcessInstanceAsync(ArrInstance instance, InstanceType instanceType, ArrConfig config) in /app/Infrastructure/Verticals/QueueCleaner/QueueCleaner.cs:line 69 at Infrastructure.Verticals.Jobs.GenericHandler.ProcessArrConfigAsync(ArrConfig config, InstanceType instanceType, Boolean throwOnFailure) in /app/Infrastructure/Verticals/Jobs/GenericHandler.cs:line 85 [2025-05-14 18:30:01.251 INF] [QueueCleaner] [Radarr] 3 items found in queue | http://radarr:7878/ [2025-05-14 18:30:01.252 VRB] [QueueCleaner] [Radarr] processing | Girl.with.a.Pearl.Earring.2003.RERiP.1080p.BluRay.x264-VETO [PublicHD] | 3440412F005D4655B5B183B399387EABAE13C142 [2025-05-14 18:30:01.253 ERR] [QueueCleaner] failed to clean Radarr instance | http://radarr:7878/ QBittorrent.Client.QBittorrentClientRequestException: Response status code does not indicate success: 403 (Forbidden). at QBittorrent.Client.Extensions.HttpClientExtensions.EnsureSuccessStatusCodeEx(HttpResponseMessage message) at QBittorrent.Client.Extensions.HttpClientExtensions.GetStringWithCancellationAsync(HttpClient client, Uri uri, Boolean returnEmptyIfNotFound, CancellationToken token) at QBittorrent.Client.QBittorrentClient.<>c__DisplayClass20_0.<<GetTorrentListAsync>g__ExecuteAsync|0>d.MoveNext() --- End of stack trace from previous location --- at Infrastructure.Verticals.DownloadClient.QBittorrent.QBitService.ShouldRemoveFromArrQueueAsync(String hash, IReadOnlyList`1 ignoredDownloads) in /app/Infrastructure/Verticals/DownloadClient/QBittorrent/QBitService.cs:line 71 at Infrastructure.Verticals.QueueCleaner.QueueCleaner.<>c__DisplayClass4_0.<<ProcessInstanceAsync>b__0>d.MoveNext() in /app/Infrastructure/Verticals/QueueCleaner/QueueCleaner.cs:line 119 --- End of stack trace from previous location --- at Infrastructure.Verticals.Arr.ArrQueueIterator.Iterate(IArrClient arrClient, ArrInstance arrInstance, Func`2 action) in /app/Infrastructure/Verticals/Arr/ArrQueueIterator.cs:line 43 at Infrastructure.Verticals.QueueCleaner.QueueCleaner.ProcessInstanceAsync(ArrInstance instance, InstanceType instanceType, ArrConfig config) in /app/Infrastructure/Verticals/QueueCleaner/QueueCleaner.cs:line 69 at Infrastructure.Verticals.Jobs.GenericHandler.ProcessArrConfigAsync(ArrConfig config, InstanceType instanceType, Boolean throwOnFailure) in /app/Infrastructure/Verticals/Jobs/GenericHandler.cs:line 85 ``` ### Anything else? This is my docker compose <details><summary>Compose</summary> <p> ```yaml services: qbittorrent: container_name: qbittorrent image: "linuxserver/qbittorrent:latest" environment: - SERVICE_FQDN_QBITTORRENT_8080 - PUID=1000 - PGID=1000 - TZ=UTC volumes: - "qbittorrent-config:/config" - "torrent-downloads:/downloads" restart: unless-stopped bazarr: container_name: bazarr image: "linuxserver/bazarr:latest" environment: - SERVICE_FQDN_BAZARR_6767 - PUID=1000 - PGID=1000 - TZ=UTC volumes: - "bazarr-config:/config" - "torrent-downloads:/downloads" depends_on: qbittorrent: condition: service_started restart: unless-stopped radarr: container_name: radarr image: "linuxserver/radarr:latest" environment: - SERVICE_FQDN_RADARR_7878 - PUID=1000 - PGID=1000 - TZ=UTC volumes: - "radarr-config:/config" - "torrent-downloads:/downloads" depends_on: qbittorrent: condition: service_started restart: unless-stopped sonarr: container_name: sonarr image: "linuxserver/sonarr:latest" environment: - SERVICE_FQDN_SONARR_8989 - PUID=1000 - PGID=1000 - TZ=UTC volumes: - "sonarr-config:/config" - "torrent-downloads:/downloads" depends_on: qbittorrent: condition: service_started restart: unless-stopped prowlarr: container_name: prowlarr image: "linuxserver/prowlarr:latest" environment: - SERVICE_FQDN_PROWLARR_9696 - PUID=1000 - PGID=1000 - TZ=UTC volumes: - "prowlarr-config:/config" depends_on: sonarr: condition: service_started radarr: condition: service_started flaresolverr: condition: service_started restart: unless-stopped huntarr: container_name: huntarr image: huntarr/huntarr:latest environment: - SERVICE_FQDN_HUNTARR_9705 - TZ=UTC volumes: - "huntarr-config:/config" depends_on: sonarr: condition: service_started radarr: condition: service_started restart: unless-stopped cleanuperr: container_name: cleanuperr image: ghcr.io/flmorg/cleanuperr:latest environment: - TZ=UTC - LOGGING__LOGLEVEL=Verbose - QUEUECLEANER__ENABLED=true - QUEUECLEANER__IMPORT_FAILED_MAX_STRIKES=5 - QUEUECLEANER__STALLED_MAX_STRIKES=5 - QUEUECLEANER__SLOW_MAX_STRIKES=5 - QUEUECLEANER__SLOW_MIN_SPEED=0.5MB - QUEUECLEANER__SLOW_MAX_TIME=12 - CONTENTBLOCKER__ENABLED=true - DOWNLOAD_CLIENT=qbittorrent - QBITTORRENT__URL=http://qbittorrent:8080 - QBITTORRENT__USERNAME=${QBITTORRENT_USERNAME} - QBITTORRENT__PASSWORD=${QBITTORRENT_PASSWORD} - SONARR__ENABLED=true - SONARR__INSTANCES__0__URL=http://sonarr:8989 - SONARR__INSTANCES__0__APIKEY=${SONARR_API_KEY} - RADARR__ENABLED=true - RADARR__INSTANCES__0__URL=http://radarr:7878 - RADARR__INSTANCES__0__APIKEY=${RADARR_API_KEY} volumes: - "torrent-downloads:/downloads" depends_on: sonarr: condition: service_started radarr: condition: service_started restart: unless-stopped flaresolverr: container_name: flaresolverr image: "flaresolverr/flaresolverr:latest" environment: - TZ=UTC restart: unless-stopped recommendarr: container_name: recommendarr image: tannermiddleton/recommendarr:latest environment: - SERVICE_FQDN_RECOMMENDARR_3000 - PUBLIC_URL=${SERVICE_FQDN_RECOMMENDARR_3000} - FORCE_SECURE_COOKIES=true volumes: - "recommendarr-data:/app/server/data" restart: unless-stopped streamyfin-optimized-versions-server: container_name: streamyfin-optimized-versions-server image: fredrikburmester/streamyfin-optimized-versions-server:master environment: - SERVICE_FQDN_STREAMYFIN-OPTIMIZED-VERSIONS-SERVER_3000 - JELLYFIN_URL=http://jellyfin:8096 - MAX_CONCURRENT_JOBS=1 volumes: - "streamyfin-optimized-versions-server-cache:/usr/src/app/cache" depends_on: jellyfin: condition: service_started restart: unless-stopped jellyfin: container_name: jellyfin image: "linuxserver/jellyfin:latest" environment: - SERVICE_FQDN_JELLYFIN_8096 - PUID=1000 - PGID=1000 - TZ=UTZ - DOCKER_MODS=ghcr.io/jumoog/intro-skipper volumes: - "jellyfin-config:/config" - "torrent-downloads:/data" restart: unless-stopped jellyseerr: container_name: jellyseerr image: "fallenbagel/jellyseerr:latest" environment: - SERVICE_FQDN_JELLYSEERR_5050 - TZ=UTC volumes: - "jellyseerr-config:/app/config" restart: unless-stopped ``` </p> </details>
giteasync added the
bug
label 2025-10-09 16:58:24 -05:00
Author
Owner

@AlejandroAkbal commented on GitHub:

I'm getting that same error only if I set an incorrect password for qBit. Please check double-check your env file and make sure your qBit password is correct.

Password is the exact same set on Sonarr and Radarr, no white spaces or anything, and marked as a literal on Coolify

The only thing I can think of is that the password has special characters like &$! And so on

Do you mind testing if it works correctly with special characters on your end?

@AlejandroAkbal commented on GitHub: > I'm getting that same error only if I set an incorrect password for qBit. Please check double-check your env file and make sure your qBit password is correct. Password is the exact same set on Sonarr and Radarr, no white spaces or anything, and marked as a literal on Coolify The only thing I can think of is that the password has special characters like &$! And so on Do you mind testing if it works correctly with special characters on your end?
Author
Owner

@Flaminel commented on GitHub:

I've tested with @# and it worked fine. Would you mind giving me a specific example, something that is similar to what you have?

@Flaminel commented on GitHub: I've tested with @# and it worked fine. Would you mind giving me a specific example, something that is similar to what you have?
Author
Owner

@AlejandroAkbal commented on GitHub:

I've tested with @# and it worked fine. Would you mind giving me a specific example, something that is similar to what you have?

Sure, test this one

9!rk2!Yu:Lsx8@k$*uA

@AlejandroAkbal commented on GitHub: > I've tested with @# and it worked fine. Would you mind giving me a specific example, something that is similar to what you have? Sure, test this one 9!rk2!Yu:Lsx8@k$*uA
Author
Owner

@Flaminel commented on GitHub:

I've just tried it and it works just fine on my end. One thing I found was that I had to restart the qBit container once I changed the password. Can you restart the qBit container, just in case?

@Flaminel commented on GitHub: I've just tried it and it works just fine on my end. One thing I found was that I had to restart the qBit container once I changed the password. Can you restart the qBit container, just in case?
Author
Owner

@Flaminel commented on GitHub:

I'm getting that same error only if I set an incorrect password for qBit. Please check double-check your env file and make sure your qBit password is correct.

@Flaminel commented on GitHub: I'm getting that same error only if I set an incorrect password for qBit. Please check double-check your env file and make sure your qBit password is correct.
Author
Owner

@Flaminel commented on GitHub:

I'm sorry I couldn't help more. 😓 I can always try, just let me know how.

@Flaminel commented on GitHub: I'm sorry I couldn't help more. 😓 I can always try, just let me know how.
Author
Owner

@Flaminel commented on GitHub:

Is it an option to change the password (followed by restarting the containers) to something simpler just to test it works just fine?

@Flaminel commented on GitHub: Is it an option to change the password (followed by restarting the containers) to something simpler just to test it works just fine?
Author
Owner

@AlejandroAkbal commented on GitHub:

Thank you for your help Flaminel, I appreciate you

@AlejandroAkbal commented on GitHub: Thank you for your help Flaminel, I appreciate you
Author
Owner

@AlejandroAkbal commented on GitHub:

Yeah, I always restart the entire compose stack

I have tried hardcoding the password in the docker compose file, restarting, and still no luck (403 forbidden)

I even went ahead and disabled qBitorrent auth for requests on docker's compose network (172.x.x.x), and still nothing :/

Dont know what else to try

@AlejandroAkbal commented on GitHub: Yeah, I always restart the entire compose stack I have tried hardcoding the password in the docker compose file, restarting, and still no luck (403 forbidden) I even went ahead and disabled qBitorrent auth for requests on docker's compose network (172.x.x.x), and still nothing :/ Dont know what else to try
Author
Owner

@AlejandroAkbal commented on GitHub:

I just tried Decluttarr, and also fails authenticating to qbitorrent, so I dont know, shitty fucking qbitorrent

I close this issue as it must be a problem with my docker compose

@AlejandroAkbal commented on GitHub: I just tried Decluttarr, and also fails authenticating to qbitorrent, so I dont know, shitty fucking qbitorrent I close this issue as it must be a problem with my docker compose
Author
Owner

@visualies commented on GitHub:

for future humans:
got this error with localhost, worked with 127.0.0.1

@visualies commented on GitHub: for future humans: got this error with localhost, worked with 127.0.0.1
Author
Owner

@AlejandroAkbal commented on GitHub:

Update for future readers:

I fixed it by changing the password AND the username, the username also had special characters (@), so that might've been the issue >:(

@AlejandroAkbal commented on GitHub: Update for future readers: I fixed it by changing the password AND the username, the username also had special characters (@), so that might've been the issue >:(
Author
Owner

@Flaminel commented on GitHub:

Hey, at least you found the problem!

@Flaminel commented on GitHub: Hey, at least you found the problem!
Author
Owner

@bvuk88 commented on GitHub:

I got the error with a password containing $$, removed the dollar signs and everything worked.

@bvuk88 commented on GitHub: I got the error with a password containing $$, removed the dollar signs and everything worked.
Sign in to join this conversation.
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: starred/Cleanuparr#101
No description provided.