Internal SSL error when connecting from external application

Hello. I receive this error:
ERROR[693191]: iostream.c:552 ast_iostream_close: SSL_shutdown() failed: error:00000001:lib(0)::reason(1), Internal SSL error
when I connect from Stasis application (nodels) https.request
request params:

  hostname: '',
  port: 8089,
  path: '/ari/channels/1705938352.37/continue',
  method: 'POST',
  key: <Buffer 2d ....>,
  cert: <Buffer 2d ...>,
  headers: {
    Authorization: 'Basic ENCODED_USERNAME_PASSWORD==',
    'Content-Type': 'application/json',
    'Content-Length': 2

statusCode: 204

  server: 'Asterisk/21.0.2',
  date: 'Mon, 22 Jan 2024 15:45:52 GMT',
  'cache-control': 'no-cache, no-store',
  'content-length': '0'

Note, key and cert in request params don’t solve the problem - the same error(((

That’s clearly an error in closing the connection. I suppose it could be a secondary to one to opening, but, in that case, you need to find the primary.

After this error:
WebSocket connection from ‘server_IP:47924’ forcefully closed due to fatal write error

I’m not sufficiently familiar with SSL failures to be sure, but I’d suggest the remote side has dropped the TCP connection, or a dynamic firewall entry has got lost.

The issue was solved by sending Bundle certificate ca within the request: requestParams.path, postData, {
baseURL: requestParams.baseURL ,
httpsAgent: new https.Agent({ ca: fs.readFileSync(‘/etc/ssl/cacert-2023.pem’) }),
auth:{username: options.username,
password: options.password}

This topic was automatically closed 30 days after the last reply. New replies are no longer allowed.