Java SSLHandshakeException: PKIX path building failed

JVM `cacerts` truststore does not trust the remote server CA or incomplete TLS chain.

Runs locally in browser Free · No login Independently Verified 2026-11-25 v4.1.0
Identifier: Java SSLHandshakeException Platform: Java
Common Root Causes:
  • JVM `cacerts` truststore does not trust the remote server CA or incomplete TLS chain.

Interactive Diagnostic Checklist

Verified Solutions:
  1. Serve full intermediate chain from server or import internal CA into JVM truststore via `keytool`.
Safe Diagnostic Command:
keytool -list -cacerts -storepass changeit | grep -i <ca>
Warning: Verify configuration changes in staging or with dry-run flags (e.g. nginx -t) before reloading production services.

Technical Explanation

JVM `cacerts` truststore does not trust the remote server CA or incomplete TLS chain. Recommended diagnostic: `keytool -list -cacerts -storepass changeit | grep -i <ca>`. Remediation: Serve full intermediate chain from server or import internal CA into JVM truststore via `keytool`.

Worked Examples

  • Run `keytool -list -cacerts -storepass changeit | grep -i <ca>` to verify root cause before applying the remediation.

Limitations & Assumptions

  • Always verify configuration changes in staging or with dry-run flags (e.g. `nginx -t`) before reloading production services.

Source References & Verification

Resource ID: err-java-pkix-path-building-failed · Independently verified: 2026-11-25

Related Resources