[BUG] TCP transport SSL error
Open
Nobody has claimed this yet.
bug
- Dominant language
- Python
- Stars
- 15.7k
- Forks
- 5.6k
- Avg merge
- 2d 44m
- Merged PRs (30d)
- 80
Description
Description
When using SSL with the TLS transport we may run into this exception:
2022-05-05 12:16:04,536 [tornado.general :555 ][ERROR ][777326] Uncaught exception, closing connection: ('REDACTED', 54603)
Traceback (most recent call last):
File "/usr/lib/python3.6/site-packages/salt/ext/tornado/iostream.py", line 520, in _handle_events
self._handle_read()
File "/usr/lib/python3.6/site-packages/salt/ext/tornado/iostream.py", line 1396, in _handle_read
self._do_ssl_handshake()
File "/usr/lib/python3.6/site-packages/salt/ext/tornado/iostream.py", line 1316, in _do_ssl_handshake
self.socket.do_handshake()
File "/usr/lib64/python3.6/ssl.py", line 1036, in do_handshake
self._sslobj.do_handshake()
File "/usr/lib64/python3.6/ssl.py", line 648, in do_handshake
self._sslobj.do_handshake()
OSError: [Errno 0] Error
Setup
master config
## salt-master config
interface: 0.0.0.0
hash_type: sha256
keep_jobs: 1
file_recv: True
file_recv_max_size: 100
transport: tcp
ssl:
keyfile: /etc/salt/pki/master/tls.key
certfile: /etc/salt/pki/master/tls.crt
ssl_version: PROTOCOL_TLS
presence_events: True
pillar_cache: True
cachedir: /opt/salt/cache/master
grains_cache: True
grains_cache_expiration: 3600
minion config
master:
- REDACTED
hash_type: sha256
transport: tcp
ssl: True
log_granular_levels: {'salt.transport.tcp': 'error'}
Looks like this was resolved in a more recent version of tornado.
Contributor guide
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Research direction
Start by reading salt/ext/tornado/iostream.py around _do_ssl_handshake and compare the linked Tornado pull request. Reproduce the OSError with the TCP/SSL setup; done means the issue is confirmed resolved or a focused fix is identified and covered by a regression test.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- python
- Domain
- networking
- Issue type
- Bug
- Difficulty
- 3/5
- Estimated time
- 1-2 days
- Activity status
- Stale
- Clarity
- Needs clarification
- Newbie friendliness
- 25/100