A Java service started failing calls to a partner API with "PKIX path building failed: unable to find valid certification path to requested target".
AdvancedTroubleshootingDNS, TLS and certificates
Answer
Likely causes → The partner rotated to a certificate from a CA that isn't in the JVM truststore you use: an old JDK cacerts, a custom truststore baked into the image with only the old CA, or a pinned certificate in code.
Diagnose →
openssl s_client -connect api.partner.com:443 -servername api.partner.com -showcerts </dev/null | grep 'i:'
keytool -list -cacerts -storepass changeit | grep -i "<new root name>"
java -Djavax.net.debug=ssl:handshake -jar app.jar 2>&1 | grep -i 'certificate_unknown'
Check whether the app passes -Djavax.net.ssl.trustStore= to a custom file.
Fix → Add the partner's new root to the truststore you actually use (keytool -importcert -alias partner-root -file root.pem -keystore truststore.jks), or move to the JDK's updated cacerts. Roll pods so the JVM reloads it.
Prevent → Avoid custom truststores that replace the default; append to it instead. Keep base JDK images current, and ask partners for CA-change notices.
More on DNS, TLS and certificates
Monday morning every browser shows "NET::ERR_CERT_DATE_INVALID" for app.example.com; the cert is from Let's Encrypt via cert-manager.BeginnerYou changed the A record for api.example.com to a new load balancer an hour ago, but some users still reach the old server.BeginnerA cert-manager Certificate is stuck at "Issuing"; the Challenge says "Waiting for HTTP-01 challenge propagation: wrong status code '404', expected '200'".IntermediateAfter switching to a slim base image, the service fails every outbound HTTPS call with "x509: certificate signed by unknown authority".BeginnerBrowsers load the site fine, but Android apps and `curl` from servers fail with "unable to verify the first certificate" or "unable to get local issuer certificate".Intermediate`https://example.com` works, but `https://www.example.com` shows "NET::ERR_CERT_COMMON_NAME_INVALID".Beginner