Asterisk 16 TLS - Bad file descriptor errors

This is a new CentOS 8/Asterisk 16 setup. This worked fine with CentOS7/Asterisk 13, but in the CentOS 8/Asterisk 16 setup Asterisk won’t start and seems to stall out on this:

[Jul 19 17:36:27] ERROR[1728] iostream.c: SSL_shutdown() failed: error:00000005:lib(0):func(0):DH lib, Underlying BIO error: Bad file descriptor
[Jul 19 17:36:27] ERROR[1728] iostream.c: close() failed: Bad file descriptor
[Jul 19 17:36:28] ERROR[1726] iostream.c: close() failed: Bad file descriptor

Some debug info:

[Jul 19 17:44:22] ERROR[2377]: tcptls.c:594 ast_tcptls_client_start: Unable to connect SIP socket to 10.9.9.8:51125: Connection refused
[Jul 19 17:44:26] ERROR[2341]: iostream.c:552 ast_iostream_close: SSL_shutdown() failed: error:00000005:lib(0):func(0):DH lib, Underlying BIO error: Bad file descriptor
[Jul 19 17:44:26] ERROR[2341]: iostream.c:583 ast_iostream_close: close() failed: Bad file descriptor
[Jul 19 17:44:26] ERROR[2338]: iostream.c:583 ast_iostream_close: close() failed: Bad file descriptor

Just linking the cross post …
You had a similar issue before. The next trick would be to create a bug bounty.

Yeah this is the reason I ditched chan_sip for pjsip lol. Now that I’m up on pjsip I don’t really need chan_sip anymore.