{"record":{"id":"50dc7431235a7aca","repo":"Radarr/Radarr","slug":"failed-to-connect-to-qbittorrent-please-check-you","errorCode":null,"errorMessage":"Failed to connect to qBittorrent, please check your settings.","messagePattern":"Failed to connect to qBittorrent, please check your settings\\.","errorType":"exception","errorClass":"DownloadClientException","httpStatus":null,"severity":"error","filePath":"src/NzbDrone.Core/Download/Clients/QBittorrent/QBittorrentProxyV1.cs","lineNumber":323,"sourceCode":"\n                if (response.StatusCode == HttpStatusCode.Forbidden)\n                {\n                    _logger.Debug(\"Authentication required, logging in.\");\n\n                    AuthenticateClient(requestBuilder, settings, true);\n\n                    request = requestBuilder.Build();\n\n                    response = _httpClient.Execute(request);\n                }\n            }\n            catch (HttpException ex)\n            {\n                throw new DownloadClientException(\"Failed to connect to qBittorrent, check your settings.\", ex);\n            }\n            catch (WebException ex)\n            {\n                throw new DownloadClientException(\"Failed to connect to qBittorrent, please check your settings.\", ex);\n            }\n\n            return response.Content;\n        }\n\n        private void AuthenticateClient(HttpRequestBuilder requestBuilder, QBittorrentSettings settings, bool reauthenticate = false)\n        {\n            if (settings.Username.IsNullOrWhiteSpace() || settings.Password.IsNullOrWhiteSpace())\n            {\n                return;\n            }\n\n            var authKey = string.Format(\"{0}:{1}\", requestBuilder.BaseUrl, settings.Password);\n\n            var cookies = _authCookieCache.Find(authKey);\n\n            if (cookies == null || reauthenticate)\n            {","sourceCodeStart":305,"sourceCodeEnd":341,"githubUrl":"https://github.com/Radarr/Radarr/blob/ca451608dc60c6cec754aba8d96bfa30e9468ed5/src/NzbDrone.Core/Download/Clients/QBittorrent/QBittorrentProxyV1.cs#L305-L341","documentation":"Thrown by QBittorrentProxyV1.ProcessRequest when a WebException (network/transport error) occurs during a generic v1 API request. The message reads 'please check your settings', an inconsistency with the sibling HttpException branch on line 319 which omits 'please'. It is a DownloadClientException (not the Unavailable variant), even though it is network-origin.","triggerScenarios":"In ProcessRequest, _httpClient.Execute(request) throws a WebException (connection reset, timeout, DNS failure) during a non-auth v1 API call.","commonSituations":"qBittorrent restarted mid-request; transient network drop; DNS hiccup; connection pool exhaustion; qBittorrent crashed between auth and the request.","solutions":["Confirm qBittorrent is still running and reachable.","Check for transient network conditions and retry the operation.","Verify Host/Port settings are stable and correct.","Restart qBittorrent if it has become unresponsive."],"exampleFix":null,"handlingStrategy":"try-catch","validationCode":"// Pre-check reachability to reduce opaque WebExceptions during command execution:\nusing (var tcp = new System.Net.Sockets.TcpClient())\n{\n    try { tcp.Connect(settings.Host, settings.Port); }\n    catch { /* not reachable */ }\n}","typeGuard":null,"tryCatchPattern":"try\n{\n    var content = proxy.ProcessRequest(request, settings);\n}\ncatch (DownloadClientException ex)\n{\n    logger.Warn(ex, \"qBittorrent v1 request failed at the network layer.\");\n}","preventionTips":["Confirm qBittorrent is running for the duration of the request.","Treat repeated network errors as a sign qBittorrent restarted.","Re-test the connection after network changes."],"tags":["qbittorrent","network","download-client","csharp"],"backgroundTag":null,"analyzedSha":"ca451608dc60c6cec754aba8d96bfa30e9468ed5","analyzedAt":"2026-08-13T17:21:54.115Z","schemaVersion":2},"datasetVersion":"2026-08-13T19:17:28.613Z"}