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
- Record the resolved address, address family and destination port.
- Check the intended listener and load-balancer backend state.
- 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/nullRun this OpenSSL 3.x example in a POSIX shell. Keep the hostname, peer address and full verification result with the error report.
How to fix it
- Restore the intended listener or correct the destination and routing.
- Have the responsible administrator repair an unintended rejecting rule according to the approved service policy.
- 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
- Diagnose TLS handshake, protocol and cipher failures
- Monitor custom TLS ports, STARTTLS and private services
- Find IPv4 and IPv6 certificate inconsistencies