salt icon indicating copy to clipboard operation
salt copied to clipboard

[BUG] TCP transport SSL error

Open dwoz opened this issue 2 years ago • 1 comments

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.

https://github.com/tornadoweb/tornado/pull/2518/files#diff-15c0dbe9be844d2630a4a3fc39215fcbb1734d09ff8c379b0cdb951c82ad989b

dwoz avatar Aug 03 '22 20:08 dwoz

Duplicate of https://github.com/saltstack/salt/issues/62047

lukasraska avatar Aug 04 '22 10:08 lukasraska