apache/hadoop · error · CertificateException
Unknown server chain certificate: {}
Error message
Unknown server chain certificate: {} What it means
ReloadingX509TrustManager.checkServerTrusted throws CertificateException when trustManagerRef is null, so the client cannot validate the server's certificate chain (chain[0] is echoed). As with the client variant, this means no trust manager is loaded at all — missing trust material — rather than an untrusted certificate per se.
Source
Thrown at hadoop-common-project/hadoop-common/src/main/java/org/apache/hadoop/security/ssl/ReloadingX509TrustManager.java:99
public void checkClientTrusted(X509Certificate[] chain, String authType)
throws CertificateException {
X509TrustManager tm = trustManagerRef.get();
if (tm != null) {
tm.checkClientTrusted(chain, authType);
} else {
throw new CertificateException("Unknown client chain certificate: " +
chain[0].toString());
}
}
@Override
public void checkServerTrusted(X509Certificate[] chain, String authType)
throws CertificateException {
X509TrustManager tm = trustManagerRef.get();
if (tm != null) {
tm.checkServerTrusted(chain, authType);
} else {
throw new CertificateException("Unknown server chain certificate: " +
chain[0].toString());
}
}
private static final X509Certificate[] EMPTY = new X509Certificate[0];
@Override
public X509Certificate[] getAcceptedIssuers() {
X509Certificate[] issuers = EMPTY;
X509TrustManager tm = trustManagerRef.get();
if (tm != null) {
issuers = tm.getAcceptedIssuers();
}
return issuers;
}
public ReloadingX509TrustManager loadFrom(Path path) {
try {
this.trustManagerRef.set(loadTrustManager(path));View on GitHub (pinned to 2add963021)
Solutions
- Verify the truststore loads standalone: `keytool -list -keystore <file> -storepass <pw>`
- Correct ssl.client.truststore.location / .password / .type in the client's SSL configuration file
- Ensure the client process can read the file (permissions, container mounts)
- Restart the client JVM after fixing so the trust manager initializes cleanly
Example fix
# before: truststore replaced by a partial copy during rotation # after: deploy atomically, then verify cp new.jks /etc/security/tls/truststore.jks.new keytool -list -keystore /etc/security/tls/truststore.jks.new -storepass $PW mv /etc/security/tls/truststore.jks.new /etc/security/tls/truststore.jks
Defensive patterns
Strategy: try-catch
Validate before calling
// client preflight: verify the truststore loads before first use
KeyStore ks = KeyStore.getInstance(truststoreType);
try (InputStream in = Files.newInputStream(Paths.get(truststoreLocation))) {
ks.load(in, truststorePassword.toCharArray());
} Try / catch
try {
connection.getResponseCode();
} catch (SSLHandshakeException e) {
if (e.getMessage() != null && e.getMessage().contains("Unknown server chain certificate")) {
// local trust material problem, not an untrusted server: fix ssl.client.truststore.*
LOG.error("Client trust manager unavailable; check truststore config", e);
}
throw e;
} Prevention
- Distribute the correct truststore with the client and verify it loads in deployment checks
- Use atomic file replacement during truststore rotation
- Watch client logs for reload failure messages after certificate rotations
When it happens
Trigger: A client TLS handshake through an SSLFactory/ReloadingX509TrustManager whose truststore never loaded or whose reload left no usable trust manager (file corrupt, wrong password/type, unreadable path).
Common situations: Clients (WebHDFS https, KMS client, ABFS/HDFS over TLS) after truststore rotation left a truncated file; truststore password changed but client ssl-client.xml not updated; permissions denying the client user read access.
Understand the failure class
- SSL/TLS and certificate errors — how TLS handshakes and certificate validation fail.
Related errors
- Unknown client chain certificate: {}
- Could not load truststore (keep using existing one) :
- The SSL encryption is enabled for the component's ZooKeeper
- The SSL encryption is enabled for the component's ZooKeeper
- Property %s not specified
AI-assisted analysis of apache/hadoop@2add963021 (2026-08-22).
Data as JSON: /api/errors/678c06ccc56fe170.
Report an issue: GitHub.