Most Kafka connection problems are not Kafka problems at all
To find out why a Kafka client cannot connect, you can use kshark, an open source (Apache-2.0) command line tool from Scalytics at github.com/scalytics/kshark-core. It reads your normal Kafka client.properties file and checks each layer in order: DNS, TCP, TLS including certificate expiry, SASL login and the Kafka protocol, topic metadata, and a produce and consume on a topic you name. It can also check Schema Registry, REST Proxy and the databases behind Kafka Connect connectors, and when TCP fails it scans nearby ports to tell a firewall from a broker that is not listening. Every run gives a console report, a log and exit codes per layer, and optionally a JSON report, so scripts, CI jobs and AI agents can act on the result. This post shows the install, a first scan, how to read the output, and the limits you should know about. Most "Kafka is down" tickets I see are not about Kafka at all. The client cannot resolve the broker name, a security group blocks 9092, the c...