Unable to retrieve queue and history items from NZBGET: Cannot access a disposed object. Object name: 'System.Net.Sockets.NetworkStream'

Sonarr version (exact version): 2.0.0.4409
Mono version (if Sonarr is not running on Windows): Stable 4.6.2.7/08fd525
OS: Raspbian 8 (jessie)
((Debug logs)):
(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: After a fresh install I now get the following warning. It occurs approximately 2-3 times every couple of hours, seems pretty random. Despite the warnings it does still seems functional.

Message
Unable to retrieve queue and history items from NZBGET: Cannot access a disposed object.
Object name: ‘System.Net.Sockets.NetworkStream’.

System.ObjectDisposedException: Cannot access a disposed object.
Object name: ‘System.Net.Sockets.NetworkStream’.
at System.Net.WebConnectionStream.EndWrite (System.IAsyncResult r) [0x000af] in :0
at System.Net.WebConnectionStream.Write (System.Byte[] buffer, System.Int32 offset, System.Int32 size) [0x00059] in :0
at NzbDrone.Common.Http.Dispatchers.ManagedHttpDispatcher.GetResponse (NzbDrone.Common.Http.HttpRequest request, System.Net.CookieContainer cookies) [0x000e8] in <72ef4295e48b4c9093ad258ad9c4a51f>:0
at NzbDrone.Common.Http.Dispatchers.FallbackHttpDispatcher.GetResponse (NzbDrone.Common.Http.HttpRequest request, System.Net.CookieContainer cookies) [0x000cc] in <72ef4295e48b4c9093ad258ad9c4a51f>:0
at NzbDrone.Common.Http.HttpClient.Execute (NzbDrone.Common.Http.HttpRequest request) [0x0007e] in <72ef4295e48b4c9093ad258ad9c4a51f>:0
at NzbDrone.Core.Download.Clients.Nzbget.NzbgetProxy.ProcessRequest[T] (NzbDrone.Core.Download.Clients.Nzbget.NzbgetSettings settings, System.String method, System.Object[] parameters) [0x00047] in :0
at NzbDrone.Core.Download.Clients.Nzbget.NzbgetProxy.GetGlobalStatus (NzbDrone.Core.Download.Clients.Nzbget.NzbgetSettings settings) [0x00000] in :0
at NzbDrone.Core.Download.Clients.Nzbget.Nzbget.GetQueue () [0x0000c] in :0
at NzbDrone.Core.Download.Clients.Nzbget.Nzbget.GetItems () [0x00000] in :0
at NzbDrone.Core.Download.TrackedDownloads.DownloadMonitoringService.ProcessClientDownloads (NzbDrone.Core.Download.IDownloadClient downloadClient) [0x0000c] in :0

Any help would be appreciated. Thanks!

Mono isn’t running with the --debug switch so the error isn’t much use to see where exactly it is coming from, but it looks like the connection may be getting closed unexpectedly and Sonarr is attempting to use it.

We’ll need to see ((debug logs)) with mono running with the --debug switch to diagnose further.

Ok, --debug is now switched on, as is debug level logging in Sonarr. Now i just to to wait (im)patiently for the error to reoccur.

1 Like

Ok, just in case anyone else has a similar problem here’s what worked for me: While I was waiting for the the error to repeat, I did a little research and it turns out the the Pi is very picky about the version of mono that is running. Once I downgraded to the previous version I had installed (mono-3.10.0-branch/ce003f4) the warnings stopped.

Thanks to the entire Sonarr team for all their hard work, and their quick response to my original post!

1 Like

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