-
Notifications
You must be signed in to change notification settings - Fork 3.3k
SSLError: FileNotFoundError: [Errno 2] No such file or directory #1236
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
Comments
After digging through the code, I can see that the tempfile is created because In the meantime, I'm changing my kubeconfig to use |
cc @yliaog |
it looks that you have already root caused the problem. after changing to certificate-authority, do you still see 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. |
I'm still having this issue. Use /reopen |
@wb14123: You can't reopen an issue/PR unless you authored it or you are a collaborator. 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. |
i also saw this problem and because of this issue i was able to debug why i saw it. I had a code which was doing CRUDs on multiple kubernetes clusters, while that code was still running i went in the /tmp folder of and deleted everything, include all the tmp*******( eg: tmp2xng8a6e) files which were created. This led to failure in some CRUD APIs Although i do not know why these files are created. |
/reopen |
@yliaog: Reopened 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. |
Rotten issues close after 30d of inactivity. Send feedback to sig-contributor-experience at kubernetes/community. |
@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. |
This should be reopened, this issue makes this lib incompatible with spec-compliant kubeconfigs. More selfishly, it is incompatible with kubeconfigs that are served from Rancher's cluster API at |
/reopen |
/reopen @ba-work do you have time to send a PR to fix it? |
@yliaog I think this probably just a case of me misusing the lib or not understanding the scope properly. I had a function to setup a connection to a cluster that returned a def kubernetes_config():
'''
Sets up kubernetes connection
'''
in_cluster = os.getenv('IN_CLUSTER', 'true').lower() in ('true', '1', 't', 'yes', 'y')
if in_cluster:
kubernetes.config.load_incluster_config()
else:
kube_config = os.getenv('KUBECONFIG', '/etc/kubernetes/kuebconfig.yaml')
logging.info('The kubeconfig file has been set to: %s', kube_config)
kubernetes.config.load_kube_config(kube_config)
return kubernetes.client.CoreV1Api(), kubernetes.watch.Watch() Then outside of the function I had something like this: kubernetes_api, kubernetes_watch = kubernetes_config() And accessing it like this would cause the above issue. |
I have read the source code, and we can solve the problem by transfer certificate-authority-data to a certificate-authority file like this: |
I have opened a new issue for this with more details: #1782 Ultimately, modern linux servers run things like |
hello from the other side |
I'm getting an intermittent error on my production Django website (running under UWSGI) when the kubernetes client library is called:
The strange thing is, I can simply restart my server and the problem goes away, but after a few hours I see the same error again.
I added some extra logging to the load_verify_locations function in
urllib3/util/ssl_.py
to see what file it's trying to open. Theca_certs
argument is passing in a temp file,/tmp/tmp2xng8a6e
. The other two arguments areNone
.So, why a temp file, and why is it missing? Is there a reason why the temp file would get deleted? I filed an issue with urllib3, but they said the temporary file doesn't happen on the urllib3 side.
I'm using kubernetes python client version
11.0.0
. My OpenSSL version is1.0.2g
.Here's the full exception with traceback:
The text was updated successfully, but these errors were encountered: