conduktor.io ↗

Kafka Exception BrokerNotFoundException

org.apache.kafka.streams.errors.BrokerNotFoundException
Non-retriable Streams

Indicates that none of the specified BOOTSTRAP_SERVERS_CONFIG brokers could be found.

Common Causes

Solutions

Example Stack Trace

Exception in thread "main" org.apache.kafka.streams.errors.BrokerNotFoundException: Could not find any available broker. at org.apache.kafka.streams.processor.internals.StreamsKafkaClient.ensureOneNodeIsReady(StreamsKafkaClient.java:204) at org.apache.kafka.streams.processor.internals.StreamsKafkaClient.getBrokerCompatibility(StreamsKafkaClient.java:281) at org.apache.kafka.streams.KafkaStreams.checkBrokerVersionCompatibility(KafkaStreams.java:401) at org.apache.kafka.streams.KafkaStreams.<init>(KafkaStreams.java:622) at org.apache.kafka.streams.KafkaStreams.<init>(KafkaStreams.java:577)

Diagnostic Commands

kafka-broker-api-versions.sh --bootstrap-server localhost:9092 # confirm a broker actually answers from this host nc -zv broker1 9092 # raw TCP reachability from the failing instance getent hosts broker1 # confirm DNS resolves the advertised hostname on this node

Related

Related Streams exceptions: InternalTopicsAlreadySetupException · InvalidStateStoreException · InvalidStateStorePartitionException · LockException · MisconfiguredInternalTopicException · MissingInternalTopicsException · MissingSourceTopicException · ProcessorStateException

Hitting BrokerNotFoundException in production? Conduktor Console gives you real-time visibility into clients, consumer groups, and broker health. Browse every Kafka exception or protocol error code.