TROUBLESHOOTING
Diagnose TLS handshake, protocol and cipher failures
Work through the connection in order: DNS lookup, TCP connection, TLS negotiation, certificate validation and HTTP response. Use the first failed stage to choose the next check.
Find where it fails
A protocol or cipher mismatch, an incompatible listener, blocked port or required client certificate can prevent the intended handshake. The remaining expiry of a file on disk is not the immediate answer.
Record the TLS alert, network error and server-side logs. Confirm that the correct service is listening on the intended secure port and that the test models any mutual-TLS requirements.
Work through the symptoms
No certificate arrives
Check the listener, TLS alert, protocol compatibility and client-authentication requirements.
A certificate arrives but verification fails
Move to the exact validity, identity or trust error instead of treating it as a generic handshake incident.
TLS succeeds but HTTP fails
Inspect the application, authorization or upstream response separately.
Run the checks
openssl s_client -connect www.example.com:443 -servername www.example.com \
-tls1_2 -verify_hostname www.example.com -verify_return_error </dev/null
openssl s_client -connect www.example.com:443 -servername www.example.com \
-tls1_3 -verify_hostname www.example.com -verify_return_error </dev/nullThese OpenSSL 3.x commands test TLS 1.2 and TLS 1.3 separately. Compare their results with the protocol versions the service is configured to support.
Apply the fix
Correct the listener, routing, secure TLS configuration or client-authentication setup shown by the logs. Repeat the original client handshake with the required identity and verification enabled, then check the HTTP or application response separately.
Confirm the result
Repeat the handshake with the client that failed, then verify its certificate result and application response.
Check the deployment details
Compare certificate signature algorithms separately from connection ciphers. If the server requires mutual TLS, test with the correct client certificate and key. Change one setting at a time so the result is attributable.
Keep it monitored
Monitor connection success, certificate validation and expiry as separate results. Keep the negotiated protocol and failure alert with each connection test.