-
Notifications
You must be signed in to change notification settings - Fork 3.3k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
IncompleteRead error while streaming to watch some apis #540
Comments
I had issues with Watch() while using k8 v1.7 and python client 6.0. Later I changed python client to 2.0 and it's working. What I observed is that the client documentation is not updated for the latest version which 6.0. |
Now.. I'm doing like this. from urllib3.exceptions import ProtocolError
...
w = watch.Watch()
try:
for event in w.stream(list_resources, **kwargs):
...
except ProtocolError:
print('skip this error... because kubelet disconnect client after default 10m...')
... Is it a known exception? then I will close the issue... |
Issues go stale after 90d of inactivity. If this issue is safe to close now please do so with Send feedback to sig-testing, kubernetes/test-infra and/or fejta. |
Stale issues rot after 30d of inactivity. If this issue is safe to close now please do so with Send feedback to sig-testing, kubernetes/test-infra and/or fejta. |
Rotten issues close after 30d of inactivity. Send feedback to sig-testing, kubernetes/test-infra and/or fejta. |
@fejta-bot: Closing this issue. In response to this:
Instructions for interacting with me using PR comments are available here. If you have questions or suggestions related to my behavior, please file an issue against the kubernetes/test-infra repository. |
Adds tenacity library and call to retry wait_for_completion when a ProtocolError is received. Example exception where we saw this issue: ``` urllib3.exceptions.ProtocolError: ('Connection broken: IncompleteRead(0 bytes read)', IncompleteRead(0 bytes read)) at _error_catcher (/usr/local/lib/python3.6/site-packages/urllib3/response.py:380) at __exit__ (/usr/local/lib/python3.6/contextlib.py:99) at read_chunked (/usr/local/lib/python3.6/site-packages/urllib3/response.py:696) at stream (/usr/local/lib/python3.6/site-packages/urllib3/response.py:492) at follow_logs (/usr/local/lib/python3.6/site-packages/calrissian/k8s.py:122) at wait_for_completion (/usr/local/lib/python3.6/site-packages/calrissian/k8s.py:143) at wait_for_kubernetes_pod (/usr/local/lib/python3.6/site-packages/calrissian/job.py:372) at run (/usr/local/lib/python3.6/site-packages/calrissian/job.py:593) at runner (/usr/local/lib/python3.6/site-packages/cwltool/executors.py:264) ``` This error occurred while the k8s master was being updated. Issue about this exception on python kubernetes module repo: kubernetes-client/python#540
I'm using 6.0.0 with Kubernetes 1.9.
I'm trying using watch API like this.
At first loop, it works fine.
However, I got this error from the second loop when there is no change of watching Resources.
I think it's because k8s disconnects watch api after 10 minutes.
kubernetes-client intentionally let me handle this?
The text was updated successfully, but these errors were encountered: