TLS EncryptedSocket timeout error
See original GitHub issueI’m been trying to get TLS to work with SQL in Azure. I ran into this issue when I pass in:
cafile = '/etc/ssl/certs/ca-certicates.crt'
validate_host = False
Then the following error rises:
File "/home/vagrant/.virtualenvs/project/lib/python2.7/site-packages/pytds/tds.py", line 1209, in commit
prev_timeout = self._tds.sock.gettimeout()
AttributeError: 'EncryptedSocket' object has no attribute 'gettimeout'
I tracked it down and it looks like all references to gettimeout
and settimeout
are being done against the EncryptedSocket object rather than the transport property. I added pass through methods to avoid breaking further code but that seemed to correct the errors and could connect successfully to Azure.
Issue Analytics
- State:
- Created 6 years ago
- Comments:9 (3 by maintainers)
Top Results From Across the Web
Transport Layer Security (TLS) connections might fail or ...
When attempting to connect, Transport Layer Security (TLS) might fail or timeout. You might also receive one or more of the with the...
Read more >TLS connection timeout vs TCP connection timeout
I understand that if the TCP connection is closed then the TLS connection is closed too. But what would happen if the TCP...
Read more >Rehash: How to Fix the SSL/TLS Handshake Failed Error
The TLS Handshake Failed error can originate from the client or the server, here's a guide for fixing the problem for both users...
Read more >What causes a TLS handshake timeout? - Quora
The default timeout is ten seconds. Stalled connections can be caused by configuration or application protocol mismatches. How do I fix the TLS...
Read more >AT-TLS handshake timeout - IBM
This is an integer from 1 to 600 that specifies the number of seconds to wait for the secure handshake to be initiated...
Read more >
Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free
Top Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
New version is uploaded to pypi - 1.9.1 with a fix, kudos to @radyz
Hi @denisenkom ! If I use
validate_host=True
, the same certificate no longer works. It throwsException: Certificate does not match host name 'redacted_host_name.database.windows.net'
when trying to connect. Any thoughts on how to make it work withvalidate_host=True
?