SSL / monitoring TECHNICAL HANDBOOK / 2026

SSL ERRORS

ERR_CONNECTION_REFUSED: causes and fixes

The destination refused the connection. Check the resolved address, service port, listener and any network rule rejecting the request.

What it means

A service may not be listening on the intended address and port, a load balancer may be misrouted, or a network policy may reject the connection. Confirm the actual destination rather than testing only localhost on the application machine.

What to check

  1. Record the resolved address, address family and destination port.
  2. Check the intended listener and load-balancer backend state.
  3. Compare the same hostname on IPv4 and IPv6 and preserve network or firewall evidence.

Test the connection

openssl s_client -connect www.example.com:443 -servername www.example.com \
  -verify_hostname www.example.com -verify_return_error </dev/null

Run this OpenSSL 3.x example in a POSIX shell. Keep the hostname, peer address and full verification result with the error report.

Choose Windows, macOS or Linux commands →

How to fix it

  1. Restore the intended listener or correct the destination and routing.
  2. Have the responsible administrator repair an unintended rejecting rule according to the approved service policy.
  3. Confirm a custom TLS service uses its documented port and protocol rather than assuming all TLS is HTTPS on 443.

Check the fix

After restoring the listener or route, complete the TLS handshake and certificate validation, then check the HTTP or application response.

Details worth checking

Test IPv4 and IPv6 separately. A working IPv4 listener can sit alongside a stale AAAA record or an unconfigured IPv6 listener.

Related guides

Related errors

References