Kafka hostnames do not resolve

A job that uses a Kafka cluster on Anywhere Cloud fails when the job cannot resolve the hostnames of the bootstrap server or the brokers.

Symptoms

A job that uses a Kafka cluster on Anywhere Cloud fails with an error that the bootstrap server or a broker hostname cannot be resolved.

Cause

The DNS records of the Kafka bootstrap and broker endpoints are not published. The job cannot resolve their hostnames.

A Kafka cluster of Cloudera Streams Messaging has a bootstrap address and one address for each broker, in the form [***KAFKA-INSTANCE***].[***CLUSTER-DOMAIN***]:8443 and [***KAFKA-INSTANCE***]-[***BROKER-ID***]-broker.[***CLUSTER-DOMAIN***]:8443. The client gets the broker addresses from the bootstrap server, so every broker hostname must resolve, not only the bootstrap hostname. For the Kafka clusters that a job can reach, see Kafka clusters that you can connect to.

Solution

  1. Ask your platform administrator to add DNS records for the Kafka bootstrap and broker hostnames to the DNS servers that the compute cluster uses.
  2. Run the job again.