Sonarr losing connection to rTorrent daily

Sonarr version (exact version): 2.0.0.4949
Mono version (if Sonarr is not running on Windows): 5.2.0.224
OS: Unbuntu 14.04
((Debug logs)): https://hastebin.com/uqogubukoh.rb
(Make sure debug logging is enabled in settings and post the full log to hastebin/pastebin/dropbox/google drive or something similar, do not post them directly here)
Description of issue:

About once a day my sonarr (and radarr) disconnect or can’t communicate with rTorrent. If I manually reboot the services everything works fine for a while. Later that day things disconnect again and I get the following 2 errors:

**Message	**

Unable to communicate with rtorrent. Unable to connect to rTorrent, please check your settings Wiki
All download clients are unavailable due to failures

I have made sure my torrent client settings are correct and they are. I don’t understand the language on the failure to know what to check. If the setting for the client was wrong, then it would never work. It works for almost 24 hours. The server has no scripts or crons or anything running on it. I don’t know what to do. Any ideas?

Edit: Here is the highlight from the sonarr log.

17-10-19 01:11:04.6|Debug|RTorrentProxy|Executing remote method: load.raw
17-10-19 01:11:31.5|Debug|DownloadClientFactory|Temporarily ignoring download client rtorrent till 10/19/2017 02:13:06 due to recent failures.
17-10-19 01:12:44.6|Debug|ProcessDownloadDecisions|Failed to send release to download client, storing until later. Leah.Remini.Scientology.and.the.Aftermath.S02E08.The.Greatest.Good.720p.WEB-DL.AAC2.0.H.264-BOOP

[v2.0.0.4949] NzbDrone.Core.Download.Clients.DownloadClientUnavailableException: Unable to connect to rTorrent, please check your settings ---> System.Net.WebException: The request timed out
  at System.Net.HttpWebRequest.GetRequestStream () [0x0004d] in <2736c63206b04ee9bdd526624de6640b>:0 
  at CookComputing.XmlRpc.XmlRpcClientProtocol.Invoke (System.Object clientObj, System.Reflection.MethodInfo mi, System.Object[] parameters) [0x00077] in <9d687fb9c46d481292a78781773c6116>:0 
  at CookComputing.XmlRpc.XmlRpcClientProtocol.Invoke (System.Reflection.MethodInfo mi, System.Object[] Parameters) [0x00000] in <9d687fb9c46d481292a78781773c6116>:0 
  at XmlRpcProxy33ad7c47-7bd4-44ce-b1cd-09e63f9ebae9.LoadRawStart (System.String target, System.Byte[] data, System.String[] commands) [0x00038] in <a692819560b24c48b079c7b0d54b9193>:0 
  at NzbDrone.Core.Download.Clients.RTorrent.RTorrentProxy+<>c__DisplayClass5_0.<AddTorrentFromFile>b__0 () [0x0002e] in <e8ad39d438bc4c448bfbd968b0f74ec6>:0 
  at NzbDrone.Core.Download.Clients.RTorrent.RTorrentProxy.ExecuteRequest[T] (System.Func`1[TResult] task) [0x00000] in <e8ad39d438bc4c448bfbd968b0f74ec6>:0 
   --- End of inner exception stack trace ---
  at NzbDrone.Core.Download.Clients.RTorrent.RTorrentProxy.ExecuteRequest[T] (System.Func`1[TResult] task) [0x00022] in <e8ad39d438bc4c448bfbd968b0f74ec6>:0 
  at NzbDrone.Core.Download.Clients.RTorrent.RTorrentProxy.AddTorrentFromFile (System.String fileName, System.Byte[] fileContent, System.String label, NzbDrone.Core.Download.Clients.RTorrent.RTorrentPriority priority, System.String directory, NzbDrone.Core.Download.Clients.RTorrent.RTorrentSettings settings) [0x00049] in <e8ad39d438bc4c448bfbd968b0f74ec6>:0 
  at NzbDrone.Core.Download.Clients.RTorrent.RTorrent.AddFromTorrentFile (NzbDrone.Core.Parser.Model.RemoteEpisode remoteEpisode, System.String hash, System.String filename, System.Byte[] fileContent) [0x00047] in <e8ad39d438bc4c448bfbd968b0f74ec6>:0 
  at NzbDrone.Core.Download.TorrentClientBase`1[TSettings].DownloadFromWebUrl (NzbDrone.Core.Parser.Model.RemoteEpisode remoteEpisode, System.String torrentUrl) [0x001b8] in <e8ad39d438bc4c448bfbd968b0f74ec6>:0 
  at NzbDrone.Core.Download.TorrentClientBase`1[TSettings].Download (NzbDrone.Core.Parser.Model.RemoteEpisode remoteEpisode) [0x00148] in <e8ad39d438bc4c448bfbd968b0f74ec6>:0 
  at NzbDrone.Core.Download.DownloadService.DownloadReport (NzbDrone.Core.Parser.Model.RemoteEpisode remoteEpisode) [0x00175] in <e8ad39d438bc4c448bfbd968b0f74ec6>:0 
  at NzbDrone.Core.Download.ProcessDownloadDecisions.ProcessDecisions (System.Collections.Generic.List`1[T] decisions) [0x000ae] in <e8ad39d438bc4c448bfbd968b0f74ec6>:0

Here is a highlight from rtorrent log.

1508387050 I handshake_manager->50.53.54.48: Received error: message:7 network error.
1508387051 I handshake_manager->173.208.164.18: Handshake success.
1508387051 I Download unchoked slots adjust; currently:40 adjust:1
1508387052 I handshake_manager->46.185.190.34: Received error: message:7 network unreachable.
1508387052 I handshake_manager->85.145.86.164: Received error: message:7 network unreachable.
1508387052 I handshake_manager->46.185.190.34: Received error: message:7 network unreachable.
1508387052 I handshake_manager->46.185.190.34: Received error: message:7 network unreachable.
1508387052 I handshake_manager->64.146.146.130: Received error: message:7 network unreachable.
1508387052 I handshake_manager->47.32.183.196: Received error: message:7 network unreachable.
1508387052 I handshake_manager->176.143.42.89: Received error: message:7 network unreachable.
1508387052 I handshake_manager->122.149.173.134: Received error: message:7 network unreachable.

And Highlight from the trace log

17-10-19 19:26:24.1|Trace|Scheduler|Pending Tasks: 1
17-10-19 19:26:24.1|Trace|CommandQueueManager|Publishing CheckForFinishedDownload
17-10-19 19:26:24.1|Trace|CommandQueueManager|Checking if command is queued or started: CheckForFinishedDownload
17-10-19 19:26:24.1|Trace|CommandQueueManager|Command is already in progress: CheckForFinishedDownload
17-10-19 19:26:34.1|Trace|EventAggregator|Publishing ProviderStatusChangedEvent<IDownloadClient>
17-10-19 19:26:34.1|Warn|DownloadMonitoringService|Unable to retrieve queue and history items from rtorrent

[v2.0.0.4949] NzbDrone.Core.Download.Clients.DownloadClientUnavailableException: Unable to connect to rTorrent, please check your settings ---> System.Net.WebException: The request timed out
  at System.Net.HttpWebRequest.GetRequestStream () [0x0004d] in <2736c63206b04ee9bdd526624de6640b>:0 
  at CookComputing.XmlRpc.XmlRpcClientProtocol.Invoke (System.Object clientObj, System.Reflection.MethodInfo mi, System.Object[] parameters) [0x00077] in <9d687fb9c46d481292a78781773c6116>:0 
  at CookComputing.XmlRpc.XmlRpcClientProtocol.Invoke (System.Reflection.MethodInfo mi, System.Object[] Parameters) [0x00000] in <9d687fb9c46d481292a78781773c6116>:0 
  at XmlRpcProxyf4751e30-e04d-4355-b1ee-ab8642d04ca3.TorrentMulticall (System.String[] parameters) [0x0001e] in <dfeaf2d96d6d4b3c8a4da0dea804f9bd>:0 
  at NzbDrone.Core.Download.Clients.RTorrent.RTorrentProxy+<>c__DisplayClass3_0.<GetTorrents>b__0 () [0x00000] in <e8ad39d438bc4c448bfbd968b0f74ec6>:0 
  at NzbDrone.Core.Download.Clients.RTorrent.RTorrentProxy.ExecuteRequest[T] (System.Func`1[TResult] task) [0x00000] in <e8ad39d438bc4c448bfbd968b0f74ec6>:0 
   --- End of inner exception stack trace ---
  at NzbDrone.Core.Download.Clients.RTorrent.RTorrentProxy.ExecuteRequest[T] (System.Func`1[TResult] task) [0x00022] in <e8ad39d438bc4c448bfbd968b0f74ec6>:0 
  at NzbDrone.Core.Download.Clients.RTorrent.RTorrentProxy.GetTorrents (NzbDrone.Core.Download.Clients.RTorrent.RTorrentSettings settings) [0x00023] in <e8ad39d438bc4c448bfbd968b0f74ec6>:0 
  at NzbDrone.Core.Download.Clients.RTorrent.RTorrent.GetItems () [0x0000c] in <e8ad39d438bc4c448bfbd968b0f74ec6>:0 
  at NzbDrone.Core.Download.TrackedDownloads.DownloadMonitoringService.ProcessClientDownloads (NzbDrone.Core.Download.IDownloadClient downloadClient) [0x0000c] in <e8ad39d438bc4c448bfbd968b0f74ec6>:0 

17-10-19 19:26:34.1|Trace|EventAggregator|Publishing HealthCheckCompleteEvent
17-10-19 19:26:34.1|Trace|ConfigService|Using default config value for 'removecompleteddownloads' defaultValue:'False'
17-10-19 19:26:34.1|Trace|EventAggregator|HealthCheckCompleteEvent -> HealthModule
17-10-19 19:26:34.1|Trace|EventAggregator|Publishing TrackedDownloadRefreshedEvent
17-10-19 19:26:34.1|Trace|EventAggregator|HealthCheckCompleteEvent <- HealthModule
17-10-19 19:26:34.1|Trace|EventAggregator|TrackedDownloadRefreshedEvent -> QueueService
17-10-19 19:26:34.1|Trace|EventAggregator|Publishing QueueUpdatedEvent
17-10-19 19:26:34.1|Trace|EventAggregator|QueueUpdatedEvent -> QueueModule
17-10-19 19:26:34.1|Trace|EventAggregator|QueueUpdatedEvent <- QueueModule
17-10-19 19:26:34.1|Trace|EventAggregator|TrackedDownloadRefreshedEvent <- QueueService
17-10-19 19:26:34.1|Trace|CommandQueueManager|Updating command status

Any ideas on what’s happening?

The requests are timing out, which is after 30 or 90 seconds IIRC. Anything in r(u) torrent’s logs from the same time frame?

I don’t. That’s the strange thing:

HasteBin paste

Does that show connections to the RPC endpoint? Looks like it’s all p2p related.

Does rutorrent have separate logs for web connections?

I turned on every logging option I could. What’s above is the only thing I have. I have a suspicion it lies with mono somehow. Are there timeouts associated with that?

I’ve never seen mono ignore a response and timeout on it’s own. The timeout comes from the server not responding in a reasonable amount of time.

So do you have any idea how to get the rpc endpoint or logs that we need to figure this out? I’m lost now.

I don’t. If you’re using nginx or another webserver in front of rutorrent, you could start there.

This topic was automatically closed 60 days after the last reply. New replies are no longer allowed.