Received fatal alert: handshake_failure SSL / TLS Origin: Network Last updated 4 Nov 2026

Java: javax.net.ssl.SSLHandshakeException: Received fatal alert: handshake_failure

The server rejected the Java client's TLS offer — no shared protocol/cipher, SNI issue or a required client certificate.

Exact message you may see javax.net.ssl.SSLHandshakeException: Received fatal alert: handshake_failureReceived fatal alert: handshake_failureRemote host closed connection during handshakejavax.net.ssl.SSLException: Unsupported or unrecognized SSL messageReceived fatal alert: protocol_version
Seen on: SSL Java

Meaning

Run with -Djavax.net.debug=ssl:handshake to see the ClientHello and the alert. Old JDKs (Java 7 default TLS 1.0) can't talk to TLS 1.2-only servers; new JDKs disable weak algorithms (jdk.tls.disabledAlgorithms) that old servers still use. Upgrade or align both sides.

Common causes

  • Old JDK without TLS 1.2 by default
  • Server demands a client certificate
  • Disabled algorithms (TLS 1.0/1.1, 3DES) in new JDK
  • SNI not sent (rare)
  • Weak DH key rejected

⚡ Quick fix

  1. Enable debug: -Djavax.net.debug=ssl:handshake
  2. Use a modern JDK and TLS 1.2+
  3. Provide the keystore for mTLS: -Djavax.net.ssl.keyStore=...

Detailed fix by platform

Linux

  1. java -Djavax.net.debug=ssl:handshake -jar app.jar 2>&1 | head -100

How to diagnose

  1. Debug — ClientHello vs server alert?
  2. JDK — Version?
  3. mTLS — Required?

🔧 Still not fixed?

Many errors look alike. If the steps above didn’t solve it, one of these is probably what you’re facing:

Where this error sits

Origin: Network. Errors that are often confused with or caused by this one (click to open):

EOF occurred in violation of protocol — Python: ssl.SSLEOFError: EOF occurred in violation of protocol (_ssl.c:2396) (SSL / TLS)EOF occurred in viola…gRPC: Ssl handshake failed / authentication handshake failed — gRPC: rpc error: code = Unavailable desc = connection error: desc = "transport: authentication handshake failed: x509: certificate signed by unknown authority" (SSL / TLS)gRPC: Ssl handshake f…Keystore was tampered with, or password was incorrect — Java keytool: java.io.IOException: Keystore was tampered with, or password was incorrect (SSL / TLS)Keystore was tampered…No subject alternative names present — Java: javax.net.ssl.SSLHandshakeException: No subject alternative names matching IP address 10.0.0.5 found (SSL / TLS)No subject alternativ…PKIX path building failed — javax.net.ssl.SSLHandshakeException: PKIX path building failed: unable to find valid certification path to requested target (Java)PKIX path building fa…sslv3 alert handshake failure — OpenSSL: error:14094410:SSL routines:ssl3_read_bytes:sslv3 alert handshake failure (SSL alert number 40) (SSL / TLS)sslv3 alert handshake…tlsv1 alert protocol version — OpenSSL: error:14094410 / SSL alert number 70 — tlsv1 alert protocol version (SSL / TLS)tlsv1 alert protocol …tlsv1 unrecognized name (SNI) — OpenSSL: SSL alert number 112 — tlsv1 unrecognized name (SSL / TLS)tlsv1 unrecognized na…Received …

Explore the map of this error Full error map →

🧠 Still stuck? Analyze your error

Paste the full message, response headers or stack trace — we'll detect the platform and point to the most likely cause.

💬 What worked for others

No tips yet — did something else fix this for you?

Share what worked for you

Tips are checked by an editor before they appear. Links are removed.