Skip to content
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

get an error when list namespaced config map: Connection broken: IncompleteRead(168520010 bytes read)', IncompleteRead(168520010 bytes read))' #1225

Open
soulseen opened this issue Aug 4, 2020 · 3 comments
Labels

Comments

@soulseen
Copy link

@soulseen soulseen commented Aug 4, 2020

What happened (please include outputs or screenshots):
I want to list config map in a namespace, but I get an error like:
connectionpool.py:661|connectionpool.urlopen|Retrying (Retry(total=0, connect=None, read=None, redirect=None, status=None)) after connection broken by 'ProtocolError('Connection broken: IncompleteRead(168520010 bytes read)', IncompleteRead(168520010 bytes read))': /api/v1/namespaces/kube-haproxy/configmaps
here is my code:

def get_latest_haproxy_cm(kconfig, ns):
    try:
        config.load_kube_config(kconfig)
        cm_list = client.CoreV1Api().list_namespaced_config_map(ns)
        logging.info(cm_list)
    except client.rest.ApiException:
        return 1, False, False
    except:
        logging.error("failed to fetch haproxy configmap in ns [%s]", ns)
        sys.exit(-1)

    return cm_list

waiting for a long time, I get an error like:

Connection broken: IncompleteRead(168520010 bytes read)', IncompleteRead(168520010 bytes read))'

and the number of configmap in the namespace is 409.
What you expected to happen:
list configmap in namespace success.
How to reproduce it (as minimally and precisely as possible):

Anything else we need to know?:
the number of configmap in the namespace is 409.
Environment:

  • Kubernetes version (kubectl version): v1.16.3
  • OS (e.g., MacOS 10.13.6): MacOS 10.13.6
  • Python version (python --version): Python 3.8.1
  • Python client version (pip list | grep kubernetes)11.0.0
@soulseen soulseen added the kind/bug label Aug 4, 2020
@roycaihw
Copy link
Member

@roycaihw roycaihw commented Aug 17, 2020

could you try kubectl and see if the same problem occurs?

@soulseen
Copy link
Author

@soulseen soulseen commented Aug 18, 2020

I use kubectl and it works well.

@roycaihw
Copy link
Member

@roycaihw roycaihw commented Aug 19, 2020

could you use kubectl with verbose logging v=7? I suspect it was doing page listing-- you should see multiple GET requests with continue tokens.

maybe also enable debug logging in python client to get more info about the server's response.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Linked pull requests

Successfully merging a pull request may close this issue.

None yet
2 participants
You can’t perform that action at this time.