Sonarr : Connection refused (localhost:11935)

ProcessDownloadDecisions - Couldn’t add release ‘show.s01e01’ from Indexer to download queue.: Connection refused (localhost:11935) .

Error occurs with either sabnzb or torrent. Sonarr as a docker container.

--
System.Net.Http.HttpRequestException: Connection refused (localhost:11935)
—> 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.g__WaitForConnectWithCancellation|277_0(AwaitableSocketAsyncEventArgs saea, ValueTask connectTask, CancellationToken cancellationToken)
at NzbDrone.Common.Http.Dispatchers.ManagedHttpDispatcher.attemptConnection(AddressFamily addressFamily, SocketsHttpConnectionContext context, CancellationToken cancellationToken) in ./Sonarr.Common/Http/Dispatchers/ManagedHttpDispatcher.cs:line 338
at NzbDrone.Common.Http.Dispatchers.ManagedHttpDispatcher.onConnect(SocketsHttpConnectionContext context, CancellationToken cancellationToken) in ./Sonarr.Common/Http/Dispatchers/ManagedHttpDispatcher.cs:line 314
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.AddHttp11ConnectionAsync(HttpRequestMessage request)
at System.Threading.Tasks.TaskCompletionSourceWithCancellation1.WaitWithCancellationAsync(CancellationToken cancellationToken) at System.Net.Http.HttpConnectionPool.GetHttp11ConnectionAsync(HttpRequestMessage request, Boolean async, CancellationToken cancellationToken) at System.Net.Http.HttpConnectionPool.SendWithVersionDetectionAndRetryAsync(HttpRequestMessage request, Boolean async, Boolean doRequestAuth, CancellationToken cancellationToken) at System.Net.Http.AuthenticationHelper.SendWithAuthAsync(HttpRequestMessage request, Uri authUri, Boolean async, ICredentials credentials, Boolean preAuthenticate, Boolean isProxyAuth, Boolean doRequestAuth, HttpConnectionPool pool, CancellationToken cancellationToken) at System.Net.Http.DecompressionHandler.SendAsync(HttpRequestMessage request, Boolean async, 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 NzbDrone.Common.Http.Dispatchers.ManagedHttpDispatcher.GetResponseAsync(HttpRequest request, CookieContainer cookies) in ./Sonarr.Common/Http/Dispatchers/ManagedHttpDispatcher.cs:line 115 at NzbDrone.Common.Http.HttpClient.ExecuteRequestAsync(HttpRequest request, CookieContainer cookieContainer) in ./Sonarr.Common/Http/HttpClient.cs:line 157 at NzbDrone.Common.Http.HttpClient.ExecuteAsync(HttpRequest request) in ./Sonarr.Common/Http/HttpClient.cs:line 70 at NzbDrone.Core.Download.UsenetClientBase1.<>c.<b__6_0>d.MoveNext() in ./Sonarr.Core/Download/UsenetClientBase.cs:line 53
— End of stack trace from previous location —

1 Like

Share your compose and full container logs

I’m new to docker, so I will try to find the container logs. In the meantime, here is the compose. I made a user named containeruser, and ran everything as that user, not root.

name: compose
services:
 sonarr:
    container_name: sonarr
    environment:
      PGID: "1000"
      PUID: "1000"
      TZ: Europe/Berlin
    hostname: MyFirstAttempt
    image: lscr.io/linuxserver/sonarr:latest
    logging:
      driver: json-file
      options:
        max-file: "10"
        max-size: 200k
    networks:
      default: null
    ports:
      - mode: ingress
        target: 8989
        published: "8989"
        protocol: tcp
    restart: unless-stopped
    volumes:
      - type: bind
        source: /etc/localtime
        target: /etc/localtime
        read_only: true
        bind:
          create_host_path: true
      - type: bind
        source: /home/containeruser/.config/appdata/sonarr
        target: /config
       bind:
          create_host_path: true
      - type: bind
        source: /home/containeruser/storage
        target: /storage
        bind:
          create_host_path: true

Where ever you’ve put int localhost for your indexer or download client, that’s not going to work. It needs to be your host ip (or the container name of it if using docker networking).

Please feel free to correct me as I’ve followed a guide I found.

I’m using Prowler, Deluge, Syncthing and Sabnzbd on a seedbox. I’m trying to connect a separate media server that hosts Sonarr, Plex, and Syncthing. I connected to Prowler, and from there and added Sonarr credentials, as per Prowlers’ instructions. It loaded the Indexers to Sonarr.

Sonarr can see my storage, matches the shows, ask Prowler for new files, but at the last step of sending these files to Sabnzbd, I’m getting connection refused (localhost:11935).

I’ve cleared Sonarr’s log and ran it on Tracker 2024 s01e10. I’m still looking for the requested ‘full container logs’. I do have Portainer up, where would I find the logs that would be more helpful?

2024-04-29 23:39:54.1|Warn|ProcessDownloadDecisions|Couldn't add release 'Tracker.2024.S01E10.480p.x264-RUBiK' from Indexer NZBgeek (Prowlarr) to download queue.

[v4.0.4.1491] System.Net.Http.HttpRequestException: Connection refused (localhost:11935)
 ---> 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|277_0(AwaitableSocketAsyncEventArgs saea, ValueTask connectTask, CancellationToken cancellationToken)
   at NzbDrone.Common.Http.Dispatchers.ManagedHttpDispatcher.attemptConnection(AddressFamily addressFamily, SocketsHttpConnectionContext context, CancellationToken cancellationToken) in ./Sonarr.Common/Http/Dispatchers/ManagedHttpDispatcher.cs:line 338
   at NzbDrone.Common.Http.Dispatchers.ManagedHttpDispatcher.onConnect(SocketsHttpConnectionContext context, CancellationToken cancellationToken) in ./Sonarr.Common/Http/Dispatchers/ManagedHttpDispatcher.cs:line 314
   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.AddHttp11ConnectionAsync(HttpRequestMessage request)
   at System.Threading.Tasks.TaskCompletionSourceWithCancellation`1.WaitWithCancellationAsync(CancellationToken cancellationToken)
   at System.Net.Http.HttpConnectionPool.GetHttp11ConnectionAsync(HttpRequestMessage request, Boolean async, CancellationToken cancellationToken)
   at System.Net.Http.HttpConnectionPool.SendWithVersionDetectionAndRetryAsync(HttpRequestMessage request, Boolean async, Boolean doRequestAuth, CancellationToken cancellationToken)
   at System.Net.Http.AuthenticationHelper.SendWithAuthAsync(HttpRequestMessage request, Uri authUri, Boolean async, ICredentials credentials, Boolean preAuthenticate, Boolean isProxyAuth, Boolean doRequestAuth, HttpConnectionPool pool, CancellationToken cancellationToken)
   at System.Net.Http.DecompressionHandler.SendAsync(HttpRequestMessage request, Boolean async, 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 NzbDrone.Common.Http.Dispatchers.ManagedHttpDispatcher.GetResponseAsync(HttpRequest request, CookieContainer cookies) in ./Sonarr.Common/Http/Dispatchers/ManagedHttpDispatcher.cs:line 115
   at NzbDrone.Common.Http.HttpClient.ExecuteRequestAsync(HttpRequest request, CookieContainer cookieContainer) in ./Sonarr.Common/Http/HttpClient.cs:line 157
   at NzbDrone.Common.Http.HttpClient.ExecuteAsync(HttpRequest request) in ./Sonarr.Common/Http/HttpClient.cs:line 70
   at NzbDrone.Core.Download.UsenetClientBase`1.<>c.<<Download>b__6_0>d.MoveNext() in ./Sonarr.Core/Download/UsenetClientBase.cs:line 53
--- End of stack trace from previous location ---
   at Polly.ResiliencePipeline.<>c__9`2.<<ExecuteAsync>b__9_0>d.MoveNext()
--- End of stack trace from previous location ---
   at Polly.Outcome`1.GetResultOrRethrow()
   at Polly.ResiliencePipeline.ExecuteAsync[TResult,TState](Func`3 callback, TState state, CancellationToken cancellationToken)
   at NzbDrone.Core.Download.UsenetClientBase`1.Download(RemoteEpisode remoteEpisode, IIndexer indexer) in ./Sonarr.Core/Download/UsenetClientBase.cs:line 90
   at NzbDrone.Core.Download.DownloadService.DownloadReport(RemoteEpisode remoteEpisode, IDownloadClient downloadClient) in ./Sonarr.Core/Download/DownloadService.cs:line 143
   at NzbDrone.Core.Download.DownloadService.DownloadReport(RemoteEpisode remoteEpisode, Nullable`1 downloadClientId) in ./Sonarr.Core/Download/DownloadService.cs:line 64
   at NzbDrone.Core.Download.ProcessDownloadDecisions.ProcessDecisionInternal(DownloadDecision decision, Nullable`1 downloadClientId) in ./Sonarr.Core/Download/ProcessDownloadDecisions.cs:line 226

2024-04-29 23:39:54.2|Info|RssSyncService|RSS Sync Completed. Reports found: 721, Reports grabbed: 0, Reports pending: 6
1 Like

I checked with Sonarr > Settings > Download Client .
Host: Seedbox url
Port: 5989
SSL: Off
URL Base: sabnzbd
API: sabnzbd> General > Security > API ( not nzb key )
username : copied and pasted
password : copied and pasted

Test, functional.
Tried to get the same show. Same error. Made a new SABNZBD api. Connection test worked. Tired to get the same show. Did not work. This is not a local machine.

You have localhost:11935 somewhere in your setup that’s telling your sonarr container to use it.

I would like to note, we do not support or recommend deploying our containers with portainer as it causes issues for users and makes troubleshooting more difficult.

Thank you for responding.

I installed it separately, not with it. Thought it would make finding the error easier.

I have uninstalled. Rebooted docker. Then reboot the entire server.

Error remains. Where are these logs you would like me to post?

the container readme provides instructions on how to get the container logs. That said, j0nny already told you the issue, somewhere you configured your app to try to access localhost:11935 which will not work in a container.

It’s a confusing error message. I had the same, and it was due to the “base URL override” in Jackett. I see you use Prowlarr, but it probably has a similar reasoning – that is to say, it’s not necessarily anything you have wrong in Sonarr, but your indexer is giving responses that your Sonarr isn’t able to resolve.

1 Like

You just helped me solve my problem and it’s greatly appreciated. After running into a similar issue, I came to the conclusion that Prowlarr was not running correctly. I run all my docker instances through a VPN using Gluetun. I had forgotten to select Gluetun for networking when restarting it on my last update.