Feramance / qBitrr

A simple Python script to talk to qBittorrent and Arr's
MIT License
61 stars 2 forks source link

BadStatusLine/ProtocolError/ConnectionError #61

Closed juanra closed 1 month ago

juanra commented 4 months ago

Hey, thanks for this amazing script.

I'm trying to understand what's wrong with the configuration I made, because I'm getting the following error...

I understand that at the beginning it is related to a connection. And then there is an issue with the customFormat variable.

2024-02-19T17:47:16.730052722-05:00 STARTING QBITRR
2024-02-19T17:47:16.997359507-05:00 [2024-02-19 17:47:16] [pid:       1][tid:139890355915648] INFO    : qBitrr            : Starting qBitrr: Version: 4.3.2-1e78fb3.
2024-02-19T17:47:17.207786992-05:00 [2024-02-19 17:47:17] [pid:       1][tid:139890355915648] INFO    : qBitrr.Manager    : Current qBitTorrent version is supported: 4.6.3
2024-02-19T17:47:17.764574842-05:00 [2024-02-19 17:47:17] [pid:       1][tid:139890355915648] HNOTICE : qBitrr.Sonarr-TV  : Starting Sonarr-TV monitor
2024-02-19T17:47:17.989137716-05:00 [2024-02-19 17:47:17] [pid:       1][tid:139890355915648] HNOTICE : qBitrr.Radarr-1080: Starting Radarr-1080 monitor
2024-02-19T17:47:17.989509292-05:00 [2024-02-19 17:47:17] [pid:       1][tid:139890355915648] HNOTICE : qBitrr.Recheck    : Starting Recheck monitor
2024-02-19T17:47:17.989763993-05:00 [2024-02-19 17:47:17] [pid:       1][tid:139890355915648] HNOTICE : qBitrr.Failed     : Starting Failed monitor
2024-02-19T17:47:17.998824106-05:00 [2024-02-19 17:47:17] [pid:       9][tid:139890355915648] HNOTICE : qBitrr.Sonarr-TV  : Starting torrent monitoring for Sonarr-TV
2024-02-19T17:47:18.005738357-05:00 [2024-02-19 17:47:18] [pid:      11][tid:139890355915648] HNOTICE : qBitrr.Radarr-1080: Starting torrent monitoring for Radarr-1080
2024-02-19T17:47:18.008647045-05:00 [2024-02-19 17:47:18] [pid:      12][tid:139890355915648] HNOTICE : qBitrr.Recheck    : Starting torrent monitoring for Recheck
2024-02-19T17:47:18.010058237-05:00 [2024-02-19 17:47:18] [pid:      13][tid:139890355915648] HNOTICE : qBitrr.Failed     : Starting torrent monitoring for Failed
2024-02-19T17:47:18.279062526-05:00 [2024-02-19 17:47:18] [pid:      10][tid:139890355915648] INFO    : qBitrr.Radarr-1080: Started updating database
2024-02-19T17:47:18.509603086-05:00 [2024-02-19 17:47:18] [pid:      10][tid:139890355915648] NOTICE  : qBitrr.Radarr-1080: Starting Request search
2024-02-19T17:47:19.031048290-05:00 [2024-02-19 17:47:19] [pid:      10][tid:139890355915648] NOTICE  : qBitrr.Radarr-1080: Started updating database with Overseerr request entries.
2024-02-19T17:47:19.525209557-05:00 [2024-02-19 17:47:19] [pid:      10][tid:139890355915648] NOTICE  : qBitrr.Radarr-1080: Finished updating database with Overseerr request entries
2024-02-19T17:47:19.562224629-05:00 [2024-02-19 17:47:19] [pid:      10][tid:139890355915648] INFO    : qBitrr.Radarr-1080: [OVERSEERR REQUEST]: 0 active search commands, 0 remaining
2024-02-19T17:47:19.584606824-05:00 [2024-02-19 17:47:19] [pid:      10][tid:139890355915648] HNOTICE : qBitrr.Radarr-1080: [OVERSEERR REQUEST]: Searching for: Bob Marley: One Love (2024) [tmdbId=802219|id=55][Missing]
2024-02-19T17:47:19.604593063-05:00 [2024-02-19 17:47:19] [pid:      10][tid:139890355915648] INFO    : qBitrr.Radarr-1080: [OVERSEERR REQUEST]: 1 active search commands, 0 remaining
2024-02-19T17:47:19.624619483-05:00 [2024-02-19 17:47:19] [pid:      10][tid:139890355915648] HNOTICE : qBitrr.Radarr-1080: [OVERSEERR REQUEST]: Searching for: Godzilla Minus One (2023) [tmdbId=940721|id=161][Missing]
2024-02-19T17:47:19.660246647-05:00 [2024-02-19 17:47:19] [pid:      10][tid:139890355915648] INFO    : qBitrr.Radarr-1080: [OVERSEERR REQUEST]: 2 active search commands, 0 remaining
2024-02-19T17:47:19.677907445-05:00 [2024-02-19 17:47:19] [pid:      10][tid:139890355915648] HNOTICE : qBitrr.Radarr-1080: [OVERSEERR REQUEST]: Searching for: Madame Web (2024) [tmdbId=634492|id=50][Missing]
2024-02-19T17:47:19.701544743-05:00 [2024-02-19 17:47:19] [pid:      10][tid:139890355915648] INFO    : qBitrr.Radarr-1080: [OVERSEERR REQUEST]: 3 active search commands, 0 remaining
2024-02-19T17:47:19.712899780-05:00 [2024-02-19 17:47:19] [pid:      10][tid:139890355915648] HNOTICE : qBitrr.Radarr-1080: [OVERSEERR REQUEST]: Searching for: Parasite (2019) [tmdbId=496243|id=168][Missing]
2024-02-19T17:47:19.733019466-05:00 [2024-02-19 17:47:19] [pid:      10][tid:139890355915648] INFO    : qBitrr.Radarr-1080: [OVERSEERR REQUEST]: 4 active search commands, 0 remaining
2024-02-19T17:47:19.742509753-05:00 [2024-02-19 17:47:19] [pid:      10][tid:139890355915648] HNOTICE : qBitrr.Radarr-1080: [OVERSEERR REQUEST]: Searching for: Poor Things (2023) [tmdbId=792307|id=61][Missing]
2024-02-19T17:47:28.466823039-05:00 Process Process-1:
2024-02-19T17:47:28.479566137-05:00 Traceback (most recent call last):
2024-02-19T17:47:28.479653400-05:00   File "/usr/local/lib/python3.10/site-packages/urllib3/connectionpool.py", line 793, in urlopen
2024-02-19T17:47:28.479666559-05:00     response = self._make_request(
2024-02-19T17:47:28.479676928-05:00   File "/usr/local/lib/python3.10/site-packages/urllib3/connectionpool.py", line 537, in _make_request
2024-02-19T17:47:28.479686284-05:00     response = conn.getresponse()
2024-02-19T17:47:28.479696076-05:00   File "/usr/local/lib/python3.10/site-packages/urllib3/connection.py", line 466, in getresponse
2024-02-19T17:47:28.479713981-05:00     httplib_response = super().getresponse()
2024-02-19T17:47:28.479724517-05:00   File "/usr/local/lib/python3.10/http/client.py", line 1375, in getresponse
2024-02-19T17:47:28.479735041-05:00     response.begin()
2024-02-19T17:47:28.479744420-05:00   File "/usr/local/lib/python3.10/http/client.py", line 318, in begin
2024-02-19T17:47:28.479761403-05:00     version, status, reason = self._read_status()
2024-02-19T17:47:28.479772862-05:00   File "/usr/local/lib/python3.10/http/client.py", line 300, in _read_status
2024-02-19T17:47:28.479784356-05:00     raise BadStatusLine(line)
2024-02-19T17:47:28.479796038-05:00 http.client.BadStatusLine: µ?óu¬M‚,Zv½±ÎÏ´eD‡Á30ao-hm;&+`‹³k¹bnÆe¥1Y‰Ð2öèÓÑgÇj‘Â&G¹–¥éf zsŒè’á„pëÁ–¹Ñ¿c-9ý³¿ýúí°xëPW+@Jßè•_zßdmž?HßӐMßô4Ài5gžÔ
2024-02-19T17:47:28.479815081-05:00 
2024-02-19T17:47:28.479824924-05:00 
2024-02-19T17:47:28.479835440-05:00 During handling of the above exception, another exception occurred:
2024-02-19T17:47:28.479845444-05:00 
2024-02-19T17:47:28.479856979-05:00 Traceback (most recent call last):
2024-02-19T17:47:28.479867334-05:00   File "/usr/local/lib/python3.10/site-packages/requests/adapters.py", line 486, in send
2024-02-19T17:47:28.479885766-05:00     resp = conn.urlopen(
2024-02-19T17:47:28.479896198-05:00   File "/usr/local/lib/python3.10/site-packages/urllib3/connectionpool.py", line 847, in urlopen
2024-02-19T17:47:28.479905990-05:00     retries = retries.increment(
2024-02-19T17:47:28.479916104-05:00   File "/usr/local/lib/python3.10/site-packages/urllib3/util/retry.py", line 470, in increment
2024-02-19T17:47:28.479926485-05:00     raise reraise(type(error), error, _stacktrace)
2024-02-19T17:47:28.479945300-05:00   File "/usr/local/lib/python3.10/site-packages/urllib3/util/util.py", line 38, in reraise
2024-02-19T17:47:28.479957195-05:00     raise value.with_traceback(tb)
2024-02-19T17:47:28.479967734-05:00   File "/usr/local/lib/python3.10/site-packages/urllib3/connectionpool.py", line 793, in urlopen
2024-02-19T17:47:28.479977565-05:00     response = self._make_request(
2024-02-19T17:47:28.479988184-05:00   File "/usr/local/lib/python3.10/site-packages/urllib3/connectionpool.py", line 537, in _make_request
2024-02-19T17:47:28.480006305-05:00     response = conn.getresponse()
2024-02-19T17:47:28.480017869-05:00   File "/usr/local/lib/python3.10/site-packages/urllib3/connection.py", line 466, in getresponse
2024-02-19T17:47:28.480028064-05:00     httplib_response = super().getresponse()
2024-02-19T17:47:28.480037372-05:00   File "/usr/local/lib/python3.10/http/client.py", line 1375, in getresponse
2024-02-19T17:47:28.480056446-05:00     response.begin()
2024-02-19T17:47:28.480067401-05:00   File "/usr/local/lib/python3.10/http/client.py", line 318, in begin
2024-02-19T17:47:28.480078411-05:00     version, status, reason = self._read_status()
2024-02-19T17:47:28.480091446-05:00   File "/usr/local/lib/python3.10/http/client.py", line 300, in _read_status
2024-02-19T17:47:28.480101995-05:00     raise BadStatusLine(line)
2024-02-19T17:47:28.480116456-05:00 urllib3.exceptions.ProtocolError: ('Connection aborted.', BadStatusLine('µ?óu\x1a\x81¬M\x82,\x0fZ\x8f\x15v½\x1e\x0e±ÎÏ´\x1aeD\x87Á30\x0eao-hm;\x0e&+`\x8b³k¹bnÆe\x02¥\x011\x9dY\x89Ð2\x01öè\x9dÓÑgÇ\x0ej\x14\x91Â&G¹\x96¥éf zs\x8cè\x92á\x84p\x02ëÁ\x96¹Ñ¿c-9\x15ý³¿ýú\x7fí°xëPW\x11+@J\x1dßè\x95_zßdm\x9e?H\x1aßÓ\x90Mßô\x0f4Ài5g\x18\x9eÔ\n'))
2024-02-19T17:47:28.480140249-05:00 
2024-02-19T17:47:28.480151614-05:00 During handling of the above exception, another exception occurred:
2024-02-19T17:47:28.480169542-05:00 
2024-02-19T17:47:28.480181200-05:00 Traceback (most recent call last):
2024-02-19T17:47:28.480192881-05:00   File "/usr/local/lib/python3.10/site-packages/multiprocess/process.py", line 314, in _bootstrap
2024-02-19T17:47:28.480203407-05:00     self.run()
2024-02-19T17:47:28.480214364-05:00   File "/usr/local/lib/python3.10/site-packages/multiprocess/process.py", line 108, in run
2024-02-19T17:47:28.480233814-05:00     self._target(*self._args, **self._kwargs)
2024-02-19T17:47:28.480249199-05:00   File "/usr/local/lib/python3.10/site-packages/qBitrr/arss.py", line 4508, in run_search_loop
2024-02-19T17:47:28.480261411-05:00     years, years_count = self.get_year_search()
2024-02-19T17:47:28.480271408-05:00   File "/usr/local/lib/python3.10/site-packages/qBitrr/arss.py", line 4460, in get_year_search
2024-02-19T17:47:28.480282536-05:00     episodes = self.client.get_episode(s["id"], True)
2024-02-19T17:47:28.480302341-05:00   File "/usr/local/lib/python3.10/site-packages/pyarr/sonarr.py", line 86, in get_episode
2024-02-19T17:47:28.480313666-05:00     return self._get(
2024-02-19T17:47:28.480325210-05:00   File "/usr/local/lib/python3.10/site-packages/pyarr/request_handler.py", line 81, in _get
2024-02-19T17:47:28.480336840-05:00     res = self.session.get(
2024-02-19T17:47:28.480350623-05:00   File "/usr/local/lib/python3.10/site-packages/requests/sessions.py", line 602, in get
2024-02-19T17:47:28.480373273-05:00     return self.request("GET", url, **kwargs)
2024-02-19T17:47:28.480387397-05:00   File "/usr/local/lib/python3.10/site-packages/requests/sessions.py", line 589, in request
2024-02-19T17:47:28.480398305-05:00     resp = self.send(prep, **send_kwargs)
2024-02-19T17:47:28.480409515-05:00   File "/usr/local/lib/python3.10/site-packages/requests/sessions.py", line 703, in send
2024-02-19T17:47:28.480429601-05:00     r = adapter.send(request, **kwargs)
2024-02-19T17:47:28.480467178-05:00   File "/usr/local/lib/python3.10/site-packages/requests/adapters.py", line 501, in send
2024-02-19T17:47:28.480503515-05:00     raise ConnectionError(err, request=request)
2024-02-19T17:47:28.480518325-05:00 requests.exceptions.ConnectionError: ('Connection aborted.', BadStatusLine('µ?óu\x1a\x81¬M\x82,\x0fZ\x8f\x15v½\x1e\x0e±ÎÏ´\x1aeD\x87Á30\x0eao-hm;\x0e&+`\x8b³k¹bnÆe\x02¥\x011\x9dY\x89Ð2\x01öè\x9dÓÑgÇ\x0ej\x14\x91Â&G¹\x96¥éf zs\x8cè\x92á\x84p\x02ëÁ\x96¹Ñ¿c-9\x15ý³¿ýú\x7fí°xëPW\x11+@J\x1dßè\x95_zßdm\x9e?H\x1aßÓ\x90Mßô\x0f4Ài5g\x18\x9eÔ\n'))
2024-02-19T17:47:29.776059916-05:00 [2024-02-19 17:47:29] [pid:      10][tid:139890355915648] INFO    : qBitrr.Radarr-1080: Started updating database
2024-02-19T17:47:40.043150378-05:00 [2024-02-19 17:47:40] [pid:      10][tid:139890355915648] INFO    : qBitrr.Radarr-1080: Started updating database
2024-02-19T17:47:50.208027876-05:00 [2024-02-19 17:47:50] [pid:      10][tid:139890355915648] INFO    : qBitrr.Radarr-1080: Started updating database
2024-02-19T17:48:00.370840262-05:00 [2024-02-19 17:48:00] [pid:      10][tid:139890355915648] INFO    : qBitrr.Radarr-1080: Started updating database
2024-02-19T17:48:10.534341855-05:00 [2024-02-19 17:48:10] [pid:      10][tid:139890355915648] INFO    : qBitrr.Radarr-1080: Started updating database
2024-02-19T17:48:20.751423050-05:00 [2024-02-19 17:48:20] [pid:      10][tid:139890355915648] INFO    : qBitrr.Radarr-1080: Started updating database
2024-02-19T17:48:30.956181948-05:00 [2024-02-19 17:48:30] [pid:      10][tid:139890355915648] INFO    : qBitrr.Radarr-1080: Started updating database
2024-02-19T17:48:41.150994930-05:00 [2024-02-19 17:48:41] [pid:      10][tid:139890355915648] INFO    : qBitrr.Radarr-1080: Started updating database
2024-02-19T17:48:51.363084476-05:00 [2024-02-19 17:48:51] [pid:      10][tid:139890355915648] INFO    : qBitrr.Radarr-1080: Started updating database
2024-02-19T17:49:01.527130064-05:00 [2024-02-19 17:49:01] [pid:      10][tid:139890355915648] INFO    : qBitrr.Radarr-1080: Started updating database
2024-02-19T17:49:11.663705051-05:00 [2024-02-19 17:49:11] [pid:      10][tid:139890355915648] INFO    : qBitrr.Radarr-1080: Started updating database
2024-02-19T17:49:21.840291743-05:00 [2024-02-19 17:49:21] [pid:      10][tid:139890355915648] INFO    : qBitrr.Radarr-1080: Started updating database
2024-02-19T17:49:32.174991220-05:00 [2024-02-19 17:49:32] [pid:      10][tid:139890355915648] INFO    : qBitrr.Radarr-1080: Started updating database
2024-02-19T17:49:42.410621711-05:00 [2024-02-19 17:49:42] [pid:      10][tid:139890355915648] INFO    : qBitrr.Radarr-1080: Started updating database
2024-02-19T17:49:52.639993084-05:00 [2024-02-19 17:49:52] [pid:      10][tid:139890355915648] INFO    : qBitrr.Radarr-1080: Started updating database
2024-02-19T17:50:02.896961700-05:00 [2024-02-19 17:50:02] [pid:      10][tid:139890355915648] INFO    : qBitrr.Radarr-1080: Started updating database
2024-02-19T17:50:13.363505069-05:00 [2024-02-19 17:50:13] [pid:      10][tid:139890355915648] INFO    : qBitrr.Radarr-1080: Started updating database
2024-02-19T17:50:24.030842067-05:00 [2024-02-19 17:50:24] [pid:      10][tid:139890355915648] INFO    : qBitrr.Radarr-1080: Started updating database
2024-02-19T17:50:34.815317497-05:00 [2024-02-19 17:50:34] [pid:      10][tid:139890355915648] INFO    : qBitrr.Radarr-1080: Started updating database
2024-02-19T17:50:45.136028486-05:00 [2024-02-19 17:50:45] [pid:      10][tid:139890355915648] INFO    : qBitrr.Radarr-1080: Started updating database
2024-02-19T17:50:45.460292768-05:00 [2024-02-19 17:50:45] [pid:      10][tid:139890355915648] WARNING : qBitrr.Radarr-1080: Key Error [165]
2024-02-19T17:50:45.462266115-05:00 [2024-02-19 17:50:45] [pid:      10][tid:139890355915648] ERROR   : qBitrr.Radarr-1080: local variable 'customFormat' referenced before assignment
2024-02-19T17:50:45.462307745-05:00 Traceback (most recent call last):
2024-02-19T17:50:45.462317118-05:00   File "/usr/local/lib/python3.10/site-packages/qBitrr/arss.py", line 2427, in db_update_single_series
2024-02-19T17:50:45.462324680-05:00     customFormatMet = customFormat > minCustomFormat
2024-02-19T17:50:45.462348057-05:00 UnboundLocalError: local variable 'customFormat' referenced before assignment
2024-02-19T17:50:55.482907243-05:00 [2024-02-19 17:50:55] [pid:      10][tid:139890355915648] INFO    : qBitrr.Radarr-1080: Started updating database
2024-02-19T17:51:05.814340894-05:00 [2024-02-19 17:51:05] [pid:      10][tid:139890355915648] INFO    : qBitrr.Radarr-1080: Started updating database
2024-02-19T17:51:16.147513230-05:00 [2024-02-19 17:51:16] [pid:      10][tid:139890355915648] INFO    : qBitrr.Radarr-1080: Started updating database
2024-02-19T17:51:26.463028417-05:00 [2024-02-19 17:51:26] [pid:      10][tid:139890355915648] INFO    : qBitrr.Radarr-1080: Started updating database
2024-02-19T17:51:36.783318308-05:00 [2024-02-19 17:51:36] [pid:      10][tid:139890355915648] INFO    : qBitrr.Radarr-1080: Started updating database
2024-02-19T17:51:47.143564967-05:00 [2024-02-19 17:51:47] [pid:      10][tid:139890355915648] INFO    : qBitrr.Radarr-1080: Started updating database
2024-02-19T17:51:57.466791991-05:00 [2024-02-19 17:51:57] [pid:      10][tid:139890355915648] INFO    : qBitrr.Radarr-1080: Started updating database
2024-02-19T17:52:07.786644866-05:00 [2024-02-19 17:52:07] [pid:      10][tid:139890355915648] INFO    : qBitrr.Radarr-1080: Started updating database

Could you guide me to correct what I need to correct?

Feramance commented 4 months ago

Could you kindly send over your config file so I can check please? And also set debug level to trace and run it till you get the error again and attach the full log for the Radarr instance with the error

juanra commented 4 months ago

Thanks for your quick reply @Feramance.

I'm attaching my config file without my credentials here: config.toml.txt I commented the sections that I don't use (i.e. Anime, Radar-4k)

For more context I have qBitrr deployed on a TrueNAS server using TrueCharts, and I followed their recommendations here: TrueCharts.

I will share the log with trace level soon.

Feramance commented 4 months ago

I'll be able to take a better look once I have the logs

juanra commented 4 months ago

Sorry for my delay in responding.

I am attaching the log with the trace enabled here: qbitrr_qbitrr-659d67d78c-994g5_qbitrr.log

Btw, I don't see any error in this log... :/

Feramance commented 4 months ago

Realistically, unless you see the error again, I can't really look for a solution given that error should never even be possible to reach

norimicry commented 1 month ago

Just want to say I'm experiencing the same thing with Custom formats after following the Trash Guides guide on adding custom formats. Seeing the same errors but unable to find them after enabling Trace log levels.

Feramance commented 1 month ago

Just want to say I'm experiencing the same thing with Custom formats after following the Trash Guides guide on adding custom formats. Seeing the same errors but unable to find them after enabling Trace log levels.

Hi, just to clarify. Whether you have custom formats configured or not is irrelevant in this scope as Radarr/sonarr handle those, qBitrr just reads the value for minimum and the value of the final score for the individual file.

To be able to debug this I'll need your logs showing this error occurring please. If you can first make sure you're on the latest version, set logs to trace and then send over the entire logs folder and config file. Thanks

norimicry commented 1 month ago

Stack trace consistently throws in ERROR level immediately upon starting:

STARTING QBITRR
Process Process-1:
Traceback (most recent call last):
  File "/usr/local/lib/python3.10/site-packages/urllib3/response.py", line 737, in _error_catcher
    yield
  File "/usr/local/lib/python3.10/site-packages/urllib3/response.py", line 1184, in read_chunked
    self._update_chunk_length()
  File "/usr/local/lib/python3.10/site-packages/urllib3/response.py", line 1116, in _update_chunk_length
    raise InvalidChunkLength(self, line) from None
urllib3.exceptions.InvalidChunkLength: InvalidChunkLength(got length b'HTTP/1.1 200 OK\r\n', 0 bytes read)

The above exception was the direct cause of the following exception:

Traceback (most recent call last):
  File "/usr/local/lib/python3.10/site-packages/requests/models.py", line 816, in generate
    yield from self.raw.stream(chunk_size, decode_content=True)
  File "/usr/local/lib/python3.10/site-packages/urllib3/response.py", line 1040, in stream
    yield from self.read_chunked(amt, decode_content=decode_content)
  File "/usr/local/lib/python3.10/site-packages/urllib3/response.py", line 1172, in read_chunked
    with self._error_catcher():
  File "/usr/local/lib/python3.10/contextlib.py", line 153, in __exit__
    self.gen.throw(typ, value, traceback)
  File "/usr/local/lib/python3.10/site-packages/urllib3/response.py", line 764, in _error_catcher
    raise ProtocolError(f"Connection broken: {e!r}", e) from e
urllib3.exceptions.ProtocolError: ("Connection broken: InvalidChunkLength(got length b'HTTP/1.1 200 OK\\r\\n', 0 bytes read)", InvalidChunkLength(got length b'HTTP/1.1 200 OK\r\n', 0 bytes read))

During handling of the above exception, another exception occurred:

Traceback (most recent call last):
  File "/usr/local/lib/python3.10/site-packages/multiprocess/process.py", line 314, in _bootstrap
    self.run()
  File "/usr/local/lib/python3.10/site-packages/multiprocess/process.py", line 108, in run
    self._target(*self._args, **self._kwargs)
  File "/usr/local/lib/python3.10/site-packages/qBitrr/arss.py", line 4447, in run_search_loop
    years, years_count = self.get_year_search()
  File "/usr/local/lib/python3.10/site-packages/qBitrr/arss.py", line 4399, in get_year_search
    episodes = self.client.get_episode(s["id"], True)
  File "/usr/local/lib/python3.10/site-packages/pyarr/sonarr.py", line 86, in get_episode
    return self._get(
  File "/usr/local/lib/python3.10/site-packages/pyarr/request_handler.py", line 81, in _get
    res = self.session.get(
  File "/usr/local/lib/python3.10/site-packages/requests/sessions.py", line 602, in get
    return self.request("GET", url, **kwargs)
  File "/usr/local/lib/python3.10/site-packages/requests/sessions.py", line 589, in request
    resp = self.send(prep, **send_kwargs)
  File "/usr/local/lib/python3.10/site-packages/requests/sessions.py", line 747, in send
    r.content
  File "/usr/local/lib/python3.10/site-packages/requests/models.py", line 899, in content
    self._content = b"".join(self.iter_content(CONTENT_CHUNK_SIZE)) or b""
  File "/usr/local/lib/python3.10/site-packages/requests/models.py", line 818, in generate
    raise ChunkedEncodingError(e)
requests.exceptions.ChunkedEncodingError: ("Connection broken: InvalidChunkLength(got length b'HTTP/1.1 200 OK\\r\\n', 0 bytes read)", InvalidChunkLength(got length b'HTTP/1.1 200 OK\r\n', 0 bytes read))

qbitrr-config.zip

I understand custom formats are irrelevant but error only started appearing after adding custom formats. Stack trace indicates an issue with Sonarr.

Feramance commented 1 month ago

I see, this is an indication of an issue in the communication between sonarr and qBitrr. The error is a chunk encoding error which is a result of a bad response from sonarr

norimicry commented 1 month ago

Correct. I am seeing several

[2024-05-15 18:29:28] [pid:       8][tid:139816677288832] WARNING : qBitrr.Sonarr-TV   : Could not connect to http://sonarr.ix-sonarr.svc.cluster.local:8989
[2024-05-15 18:29:28] [pid:       8][tid:139816677288832] ERROR   : qBitrr.Sonarr-TV   : Could not connect to http://sonarr.ix-sonarr.svc.cluster.local:8989
[2024-05-15 18:29:28] [pid:       8][tid:139816677288832] CRITICAL: qBitrr.Sonarr-TV   : Failed to connected to the Arr instance, sleeping for 0:05:00

errors though my configuration for Sonarr is correct, set up the same as Radarr, and has not changed in qBitrr. Is this a Sonarr problem then?

Feramance commented 1 month ago

Could be network, Url or apikey. I'd suggest first making 100% sure your URL and apikey are correct, then proceeding to ensure everything is running well in the network

norimicry commented 1 month ago

Reinstalled both, got a few more errors, restarted qbitrr a few times, and then it seemed to pick up the connection. Not sure why qbitrr was struggling to pick up a connection to Sonarr. Both are hosted on the same machine and connection through internal DNS names via the k8s network. Seems to be processing Sonarr releases for now.

Feramance commented 1 month ago

Good to hear, don't hesitate to reopen or open another ticket if any other issues crop up