Closed sstegmueller closed 1 year ago
Hi @StefanStegmueller! Do you have any updates on this issue? New occurrences, logs, etc. I've looked into it, but haven't found any solution yet. Some say proxies can randomly screw up certificates/handshake in rare cases, but I think that’s not the case here. I suspect something is happening with the certificates (obviously…), but I don’t really know what. Besides the logs, the OpenSSL and TLS version might be useful as well.
A google search using python tlsv1 alert internal error (_ssl.c:1131)
yields a few stackoverflow articles that seem to be similar to the problem reported above. One possible reason for the error is a mismatch between acceptable TLS versions on the client vs server. Not sure if this is applicable or not.
Yeah, I found that too. But in that case the connection shouldn't even be established once, because this is not a thing that changes often. Or am I missing something?
Yeah, I found that too. But in that case the connection shouldn't even be established once, because this is not a thing that changes often. Or am I missing something?
I think it depends on how the server side is implemented. Is it a single endpoint or is it multiple server instances fronted by a gateway, and perhaps not all the server instances are configured correctly. It might not be likely, but it's possible. And I think if something obvious was causing this, then I think I'd expect to see this problem reported before now.
Hmm you could be right. If there is e.g a load balancer configured with SSL passthrough, that can cause this issue. I mean if there is a misconfigured server behind it (as you mentioned).
Thanks for your contributions. I am with @StefanStegmueller working on debugging this and I can confirm that this is still occurring. The target hostnames that trigger the error
directlink.cloud.ibm.com iam.cloud.ibm.com
do have indeed changing IP addresses in what looks like a DNS-based load distribution. Unfortunately we see no patterns here: the addresses that sometimes fail can also deliver success. There might additionally be some IP anycast or loadbalancer in action behind a certain address here though, as @pyrooka mentions.
Do we have any debugging mechanisms in python-sdk-core to try to pin this down? I'd specially be interested in seeing which specific TLS handshake details drive to the exception. Other ideas welcome.
@marsangr @StefanStegmueller First off, sorry for the late answer! Do you have any update on this?
Do we have any debugging mechanisms in python-sdk-core to try to pin this down?
There is nothing else in the core that could help you to track down this issue. It's coming from a lower level so I think all you can do is logging the requests. Maybe manually editing the code and adding some extra debugging (can't think of any right now) could also be helpful. Let me know if you have/need anything!
Closing this for lack of activity. Feel free to re-open if the issues still persists.
We use IBM Python SDK Core to update our database periodically. Unfortunately, the following SSL error occurs at irregular intervals, and so far we have not been able to figure out why this happens:
We have already updated the library from 3.5.2 to version 3.15.3, hoping that #139 will solve the problem, but no luck here.
We recently enabled verbose logging, which is recommended in the project's readme. We also added logging of the IP address of the receiving server, as we suspect that perhaps some specific IBM machines are causing the problems. Since adding the verbose logging, the incident has not occurred, but I will update this issue with new information.
Environment Docker Image=python:3.8-slim-buster Python Version=3.8.13 ibm-cloud-networking-services=0.17.2 ibm-cloud-sdk-core=3.15.3 api_date_version=2020-06-02
I would be grateful for any help.