Closed
Description
What happened (please include outputs or screenshots):
Traceback (most recent call last):
File "/usr/local/lib/python3.7/site-packages/urllib3/response.py", line 603, in _update_chunk_length
self.chunk_left = int(line, 16)
ValueError: invalid literal for int() with base 16: b''
During handling of the above exception, another exception occurred:
Traceback (most recent call last):
File "/usr/local/lib/python3.7/site-packages/urllib3/response.py", line 362, in _error_catcher
yield
File "/usr/local/lib/python3.7/site-packages/urllib3/response.py", line 668, in read_chunked
self._update_chunk_length()
File "/usr/local/lib/python3.7/site-packages/urllib3/response.py", line 607, in _update_chunk_length
raise httplib.IncompleteRead(line)
http.client.IncompleteRead: IncompleteRead(0 bytes read)
During handling of the above exception, another exception occurred:
Traceback (most recent call last):
File "controller.py", line 21, in <module>
for event in stream:
File "/usr/local/lib/python3.7/site-packages/kubernetes/watch/watch.py", line 134, in stream
for line in iter_resp_lines(resp):
File "/usr/local/lib/python3.7/site-packages/kubernetes/watch/watch.py", line 47, in iter_resp_lines
for seg in resp.read_chunked(decode_content=False):
File "/usr/local/lib/python3.7/site-packages/urllib3/response.py", line 696, in read_chunked
self._original_response.close()
File "/usr/local/lib/python3.7/contextlib.py", line 130, in __exit__
self.gen.throw(type, value, traceback)
File "/usr/local/lib/python3.7/site-packages/urllib3/response.py", line 380, in _error_catcher
raise ProtocolError('Connection broken: %r' % e, e)
urllib3.exceptions.ProtocolError: ('Connection broken: IncompleteRead(0 bytes read)', IncompleteRead(0 bytes read))
What you expected to happen:
The watcher to always recover and continue watching for events.
How to reproduce it (as minimally and precisely as possible):
Tricky. I've only seen it once and it was random. My application just watches a CRD for changes.
Environment:
- Kubernetes version (
kubectl version
):v1.12.10-eks
- Python version (
python --version
)3.7.0
- Python client version (
pip list | grep kubernetes
)9.0.0
Duplicate issues: