I've been using Kalanyr's version of this script to run every night on my NAS, and the download step seems to run for an hour or two before bailing out. It picks up where it left off the next night, which is great, but after looking through the logs I'm seeing a lot of exceptions occurring throughout the run. I tried searching this thread and googling for references to these errors, but couldn't find anything, so I thought I'd post here and see if this is expected behavior or not.
I'll see a ton of this error in a row:
Traceback (most recent call last):
File "/usr/local/lib/python3.6/site-packages/urllib3/contrib/pyopenssl.py", line 280, in recv_into
return self.connection.recv_into(*args, **kwargs)
File "/usr/local/lib/python3.6/site-packages/OpenSSL/SSL.py", line 1335, in recv_into
self._raise_ssl_error(self._ssl, result)
File "/usr/local/lib/python3.6/site-packages/OpenSSL/SSL.py", line 1149, in _raise_ssl_error
raise WantReadError()
OpenSSL.SSL.WantReadError
Then errors like this:
During handling of the above exception, another exception occurred:
Traceback (most recent call last):
File "/usr/local/lib/python3.6/site-packages/urllib3/contrib/pyopenssl.py", line 280, in recv_into
return self.connection.recv_into(*args, **kwargs)
File "/usr/local/lib/python3.6/site-packages/OpenSSL/SSL.py", line 1335, in recv_into
self._raise_ssl_error(self._ssl, result)
File "/usr/local/lib/python3.6/site-packages/OpenSSL/SSL.py", line 1166, in _raise_ssl_error
raise SysCallError(errno, errorcode.get(errno))
OpenSSL.SSL.SysCallError: (54, 'ECONNRESET')
During handling of the above exception, another exception occurred:
Traceback (most recent call last):
File "/usr/local/lib/python3.6/site-packages/urllib3/response.py", line 302, in _error_catcher
yield
File "/usr/local/lib/python3.6/site-packages/urllib3/response.py", line 384, in read
data = self._fp.read(amt)
File "/usr/local/lib/python3.6/http/client.py", line 449, in read
n = self.readinto(b)
File "/usr/local/lib/python3.6/http/client.py", line 493, in readinto
n = self.fp.readinto(b)
File "/usr/local/lib/python3.6/socket.py", line 586, in readinto
return self._sock.recv_into(b)
File "/usr/local/lib/python3.6/site-packages/urllib3/contrib/pyopenssl.py", line 296, in recv_into
return self.recv_into(*args, **kwargs)
File "/usr/local/lib/python3.6/site-packages/urllib3/contrib/pyopenssl.py", line 296, in recv_into
return self.recv_into(*args, **kwargs)
File "/usr/local/lib/python3.6/site-packages/urllib3/contrib/pyopenssl.py", line 296, in recv_into
return self.recv_into(*args, **kwargs)
[Previous line repeated 87 more times]
File "/usr/local/lib/python3.6/site-packages/urllib3/contrib/pyopenssl.py", line 285, in recv_into
raise SocketError(str(e))
OSError: (54, 'ECONNRESET')
During handling of the above exception, another exception occurred:
Traceback (most recent call last):
File "/usr/local/lib/python3.6/site-packages/requests/models.py", line 747, in generate
for chunk in self.raw.stream(chunk_size, decode_content=True):
File "/usr/local/lib/python3.6/site-packages/urllib3/response.py", line 436, in stream
data = self.read(amt=amt, decode_content=decode_content)
File "/usr/local/lib/python3.6/site-packages/urllib3/response.py", line 401, in read
raise IncompleteRead(self._fp_bytes_read, self.length_remaining)
File "/usr/local/lib/python3.6/contextlib.py", line 99, in __exit__
self.gen.throw(type, value, traceback)
File "/usr/local/lib/python3.6/site-packages/urllib3/response.py", line 320, in _error_catcher
raise ProtocolError('Connection broken: %r' % e, e)
urllib3.exceptions.ProtocolError: ('Connection broken: OSError("(54, \'ECONNRESET\')",)', OSError("(54, 'ECONNRESET')",))
During handling of the above exception, another exception occurred:
Traceback (most recent call last):
File "gogrepo.py", line 1736, in worker
dlsz = ioloop(tid, path, response, out)
File "gogrepo.py", line 1559, in ioloop
for chunk in response.iter_content(chunk_size=4*1024):
File "/usr/local/lib/python3.6/site-packages/requests/models.py", line 750, in generate
raise ChunkedEncodingError(e)
requests.exceptions.ChunkedEncodingError: ('Connection broken: OSError("(54, \'ECONNRESET\')",)', OSError("(54, 'ECONNRESET')",))
At some point, the latter set of errors is followed by the download process exiting. It seems to ignore these errors for a while, continuing with the download process, but always eventually exits before everything is completed. Any ideas what might be going on here?
Thanks for any and all help =)