Skip to content

AxonOps — AI-Native Control Plane for Open Source Data Platforms

Kafka Client Cannot Connect

Run checks from the affected client’s host, container, or network namespace. A successful test from an administrator laptop does not prove the application path works.

LayerTypical signal
DNSUnknown host, bootstrap resolution timeout
TCPConnection refused or timed out
TLSHandshake, trust, hostname, or certificate error
SASLAuthentication failure or unsupported mechanism
Kafka metadataBootstrap succeeds, then other broker connections fail
AuthorizationKafka returns a resource-specific denial
Terminal window
getent ahosts kafka.example.com
nc -vz -w 5 kafka.example.com 9093
openssl s_client \
-connect kafka.example.com:9093 \
-servername kafka.example.com \
-CAfile ca.pem \
-verify_return_error </dev/null
kafka-cluster.sh list-endpoints \
--bootstrap-server kafka.example.com:9093 \
--command-config client.properties

Check every endpoint returned by Kafka, not only the bootstrap address. Common causes include internal DNS names advertised externally, wrong listener ports, a listener mapped to the wrong security protocol, firewall rules that cover only the bootstrap broker, and IPv4/IPv6 differences.

For intermittent failures, correlate disconnect rate with broker restarts, load balancer/NAT idle timeouts, TLS re-authentication, DNS changes, connection quotas, and request-handler saturation.

A positive bootstrap.resolve.timeout.ms allows Java clients to retry bootstrap DNS resolution asynchronously. BootstrapResolutionException means that deadline expired. It does not affect broker hostnames returned in metadata, and Kafka Streams and Connect force synchronous bootstrap resolution.

  • Fix DNS, routes, firewall rules, listener mappings, or advertised endpoints at the owning layer.
  • Correct truststores, certificates, SASL mechanisms, or credentials without weakening hostname verification.
  • Roll listener changes one broker at a time and preserve a working administration path.
  • Restart clients only after the server-side endpoint is correct so they refresh metadata cleanly.

Test metadata and the real application operation using the affected identity from the affected network. Confirm connections reach all required brokers and remain stable beyond any intermediary idle timeout.

See authentication and authorization failures for deeper security checks.