Troubleshooting Kafka Clusters

Use troubleshooting information to identify and address common issues that can occur while working with the OCI Streaming with Apache Kafka.

See also Known Issues for Streaming with Apache Kafka.

Topic Creation Fails

Unable to create a topic in a Kafka client application.

When you create a Kafka topic using the kafka-topics.sh command, the topic creation fails or results in unclear errors.

Topic Creation Fails Because of Invalid Replication Factor

When the replication factor specified in the create operation is more than the number of brokers in the Kafka cluster, the topic creation fails.

Following is an example of an incorrect create operation when the Kafka cluster has only 1 broker. The maximum valid replication factor in this case is 1 and because the operations specifies a value of 3, it results in an error.

./kafka-topics.sh --create --bootstrap-server <broker> --replication-factor 3 --partitions 2 --topic topic --command-config client.properties

Resolve topic creation failures caused by an invalid replication factor

  1. Verify the number of brokers in the Kafka cluster.
    oci kafka kafka-cluster kafka-cluster get --region <region> --kafka-cluster-id <cluster-id>
                                        
  2. Ensure that the replication factor used in the create topic operation is less than or equal to the number of brokers in the Kakfa cluster. For example, if the Kafka cluster has only 1 broker, set --replication-factor to 1.
  3. Run the create topic operation again.