Skip to content

urllib3.exceptions.ResponseNotChunked from watching namespaced configmap or secret #1047

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

Closed
JTarball opened this issue Jan 2, 2020 · 7 comments
Labels
kind/bug Categorizes issue or PR as related to a bug. lifecycle/rotten Denotes an issue or PR that has aged beyond stale and will be auto-closed.

Comments

@JTarball
Copy link

JTarball commented Jan 2, 2020

What happened (please include outputs or screenshots):
The following api calls against CoreV1Api
list_namespaced_secret
list_namespaced_config_map

fail straight away with w.stream() if the resource version is added

raise ResponseNotChunked( urllib3.exceptions.ResponseNotChunked: Response is not chunked. Header 'transfer-encoding: chunked' is missing.
What you expected to happen:
Not fail straight away the below code works for list_namespaced_event etc

How to reproduce it (as minimally and precisely as possible):
`
w = watch.Watch()

    for event in w.stream(self.v1api.list_namespaced_config_map, namespace, resource_version=resource_version):

`

Anything else we need to know?:
resource version is definitely set to a string

  • not adding the resource version kwarg makes the code work fine

Environment:

  • Kubernetes version (kubectl version): Major:"1", Minor:"14", GitVersion:"v1.14.7",
  • OS (e.g., MacOS 10.13.6): 10.15.1
  • Python version (python --version): Python 3.8.1
  • Python client version (pip list | grep kubernetes): 11.0.0b2
@JTarball JTarball added the kind/bug Categorizes issue or PR as related to a bug. label Jan 2, 2020
@roycaihw
Copy link
Member

roycaihw commented Jan 6, 2020

Could you share more code about how you extracted the resource version? Also could you enable the debug switch and share the API response?

@fejta-bot
Copy link

Issues go stale after 90d of inactivity.
Mark the issue as fresh with /remove-lifecycle stale.
Stale issues rot after an additional 30d of inactivity and eventually close.

If this issue is safe to close now please do so with /close.

Send feedback to sig-testing, kubernetes/test-infra and/or fejta.
/lifecycle stale

@k8s-ci-robot k8s-ci-robot added the lifecycle/stale Denotes an issue or PR has remained open with no activity and has become stale. label Apr 5, 2020
@fejta-bot
Copy link

Stale issues rot after 30d of inactivity.
Mark the issue as fresh with /remove-lifecycle rotten.
Rotten issues close after an additional 30d of inactivity.

If this issue is safe to close now please do so with /close.

Send feedback to sig-testing, kubernetes/test-infra and/or fejta.
/lifecycle rotten

@k8s-ci-robot k8s-ci-robot added lifecycle/rotten Denotes an issue or PR that has aged beyond stale and will be auto-closed. and removed lifecycle/stale Denotes an issue or PR has remained open with no activity and has become stale. labels May 5, 2020
@fejta-bot
Copy link

Rotten issues close after 30d of inactivity.
Reopen the issue with /reopen.
Mark the issue as fresh with /remove-lifecycle rotten.

Send feedback to sig-testing, kubernetes/test-infra and/or fejta.
/close

@k8s-ci-robot
Copy link
Contributor

@fejta-bot: Closing this issue.

In response to this:

Rotten issues close after 30d of inactivity.
Reopen the issue with /reopen.
Mark the issue as fresh with /remove-lifecycle rotten.

Send feedback to sig-testing, kubernetes/test-infra and/or fejta.
/close

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.

@kramerul
Copy link

We are running in the same issue.

    for e in w.stream(self.custom.list_namespaced_custom_object, "core.gardener.cloud", "v1beta1", self.namespace, "shoots", label_selector="name=" + name):
  File "/root/.local/lib/python3.6/site-packages/kubernetes/watch/watch.py", line 144, in stream
    for line in iter_resp_lines(resp):
  File "/root/.local/lib/python3.6/site-packages/kubernetes/watch/watch.py", line 46, in iter_resp_lines
    for seg in resp.read_chunked(decode_content=False):
  File "/root/.local/lib/python3.6/site-packages/urllib3/response.py", line 743, in read_chunked
    "Response is not chunked. "
urllib3.exceptions.ResponseNotChunked: Response is not chunked. Header 'transfer-encoding: chunked' is missing.

@narasux
Copy link
Contributor

narasux commented Sep 26, 2021

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
kind/bug Categorizes issue or PR as related to a bug. lifecycle/rotten Denotes an issue or PR that has aged beyond stale and will be auto-closed.
Projects
None yet
Development

No branches or pull requests

6 participants