LAB 03 · KAFKA
The broker is reachable.
TLS still cannot build trust.
A Kafka consumer fails before fetching metadata with SSLHandshakeException: PKIX path building failed.
DNS resolves and TCP connects to the TLS listener. Rotating SASL credentials changed nothing.
Separate network reachability, authentication, and certificate-chain trust before changing client secrets.
CLIENT EXCERPT
Relevant security settings
consumer = Consumer({
"bootstrap.servers": "orders-kafka.internal:9093",
"security.protocol": "SSL",
"ssl.ca.location": "/app/certs/platform-root.pem",
"group.id": "daily-orders",
})
consumer.list_topics(timeout=10)
The client starts a TLS handshake before it can authenticate or request Kafka metadata.
EVIDENCE TRAIL
Open the signals in order
01Connection attemptDid the client reach the broker?
Connecting to orders-kafka.internal:9093
TCP connection established
SSL handshake failed: unable to get local issuer certificate
Metadata request was not sentThe network path works. The failure happens before broker authentication or authorisation is relevant.
02Presented chainWhich issuer did the broker omit?
Subject: CN=orders-kafka.internal
Issuer: CN=Data Platform Issuing CA 02
Presented certificates: 1
Verification error: unable to get local issuer certificateThe listener presented its leaf certificate but not the issuing intermediate certificate.
03Client trust bundleCan it complete the missing link?
/app/certs/platform-root.pem
└── CN=Platform Root CA
Missing: CN=Data Platform Issuing CA 02The client has the root, but cannot validate a leaf whose intermediate was neither served by the broker nor available in the configured trust bundle.
Reference: Apache Kafka TLS / SSL documentation.
LIKELY ROOT CAUSEThe listener served an incomplete certificate chain, and the client bundle did not contain the missing intermediate.
This is a trust-chain problem, not a Kafka credential failure. The durable correction is to configure the broker listener with the complete certificate chain.
ssl.ca.location=/app/certs/platform-root.pemssl.ca.location=/app/certs/platform-ca-bundle.pemREVIEW BEFORE APPLYINGA client bundle can unblock this workload, but repair the broker chain too. Otherwise every new client inherits the same fragile workaround.