Java client fails with `PKIX path building failed: unable to find valid certification path to requested target`.
IntermediateTroubleshootingTLS and certificate errors
Answer
Likely causes → The JVM truststore (cacerts) lacks the issuing CA, the server sends an incomplete chain, or the app uses a custom truststore that overrides defaults.
Diagnose →
keytool -list -cacerts -storepass changeit | grep -i myca
java -Djavax.net.debug=ssl:handshake -jar app.jar 2>&1 | grep -i -A3 'certificate'
Fix → Import the CA: keytool -importcert -cacerts -storepass changeit -alias myca -file myca.crt -noprompt, or fix the server chain.
Prevent → Build images with the CA imported; check -Djavax.net.ssl.trustStore overrides.
More on TLS and certificate errors
`curl: (60) SSL certificate problem: certificate has expired`Beginner`curl: (60) SSL certificate problem: unable to get local issuer certificate`Beginner`SSL: no alternative certificate subject name matches target host name 'api.example.com'`BeginnerSome clients get the wrong certificate (another site's) from a shared IP.Intermediate`SSL routines::sslv3 alert handshake failure` from `openssl` or curl.IntermediatePython `requests` fails with `SSLError: [SSL: CERTIFICATE_VERIFY_FAILED] certificate verify failed: self-signed certificate in certificate chain`.Beginner