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

urllib3.exceptions.MaxRetryError: HTTPSConnectionPool #1151

Closed
jincheng-xiaosu opened this issue Apr 26, 2020 · 12 comments
Closed

urllib3.exceptions.MaxRetryError: HTTPSConnectionPool #1151

jincheng-xiaosu opened this issue Apr 26, 2020 · 12 comments
Assignees
Labels
kind/bug Categorizes issue or PR as related to a bug.

Comments

@jincheng-xiaosu
Copy link

My k8s cluster is installed quickly on the cloud server through kubeadm. I want to access my cluster through the public network address through the SDK of Python. The following error is reported:

urllib3.exceptions.MaxRetryError: HTTPSConnectionPool(host='203.195.203.45', port=6443): Max retries exceeded with url: /api/v1/pods (Caused by SSLError(SSLCertVerificationError("hostname '203.195.203.45' doesn't match either of 'k8s-master', 'kubernetes', 'kubernetes.default', 'kubernetes.default.svc', 'kubernetes.default.svc.cluster.local', '10.1.0.1', '172.16.32.7'")))

@jincheng-xiaosu jincheng-xiaosu added the kind/bug Categorizes issue or PR as related to a bug. label Apr 26, 2020
@jincheng-xiaosu jincheng-xiaosu changed the title Caused by SSLError(SSLCertVerificationError urllib3.exceptions.MaxRetryError: HTTPSConnectionPool Apr 26, 2020
@tsusadivyago
Copy link

The issue might be with your certs.

  1. kubeadm alpha certs renew all
  2. how to renew the certificate when apiserver cert expired? kubernetes/kubeadm#581

@jincheng-xiaosu
Copy link
Author

My cluster is just built and deployed with kubeadm tool. The certificate is self signed. I changed self.verify_ssl under configuration.py to false

c = client.Configuration()

c.verify_ssl = False

client.Configuration.set_default(c)

@palnabarun
Copy link
Member

/assign

@palnabarun
Copy link
Member

@jincheng-xiaosu -- the common names mentioned in the self-signed certificate don't match the server that you are pinging. I am guessing there are proxies/load balancers in between.

You can disable hostname matching by setting configuration.assert_hostname = False along with configuration.verify_ssl = False.

This should make it working with kubeadm clusters being proxied over.

@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 Oct 16, 2020
@rjnshch
Copy link

rjnshch commented Nov 10, 2020

urllib3.exceptions.MaxRetryError: HTTPSConnectionPool(host='us-south.monitoring.cloud.im.com', port=443): Max retries exceeded with url: /api/v3/dashboards?light=True (Caused by ResponseError('too many 500 error responses'))

what can I do to fix this. error.

@palnabarun
Copy link
Member

@rjnshch -- Is the error that you are describing related to Kubernetes or the Python Client?

@palnabarun
Copy link
Member

/remove-lifecycle stale

@k8s-ci-robot k8s-ci-robot removed the lifecycle/stale Denotes an issue or PR has remained open with no activity and has become stale. label Nov 13, 2020
@palnabarun
Copy link
Member

@jincheng-xiaosu -- is your issue resolved? can this issue be closed?

@palnabarun
Copy link
Member

/close

Please feel free to reopen if you face this issue again.

@k8s-ci-robot
Copy link
Contributor

@palnabarun: Closing this issue.

In response to this:

/close

Please feel free to reopen if you face this issue again.

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.

@vm250320
Copy link

vm250320 commented Apr 6, 2022

urllib3.exceptions.MaxRetryError: HTTPConnectionPool(host='localhost', port=4723): Max retries exceeded with url: /wd/hub/session (Caused by NewConnectionError('<urllib3.connection.HTTPConnection object at 0x0000013446F09D80>: Failed to establish a new connection: [WinError 10061] No connection could be made because the target machine actively refused it'))

Process finished with exit code 1

Getting this error Help Me out

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.
Projects
None yet
Development

No branches or pull requests

7 participants