amit.shipra
amit.shipra

Reputation: 197

Kafka Startup Error on topic delete

Kafka Version: 0.10.2.1 (Server)

Zookeeper: bundled with Kafka

Issue

If you delete the topic and then restart the broker - it fails. Broker is configured for delete.topic.enable=true

Delete Command:

./kafka-topics.sh --zookeeper localhost:2182 --delete --topic MY.TOPIC.NAME

Only way out for now is to go to log directory manually and remove the topic dirs using rm-rf. Post that its ok.

Error:

[2017-06-09 12:24:43,359] ERROR There was an error in one of the threads during logs loading: java.lang.StringIndexOutOfBoundsException: String index out of range: -1 (kafka.log.LogManager)
[2017-06-09 12:24:43,360] FATAL [Kafka Server 101], Fatal error during KafkaServer startup. Prepare to shutdown (kafka.server.KafkaServer)
java.lang.StringIndexOutOfBoundsException: String index out of range: -1
        at java.lang.String.substring(String.java:1967)
        at kafka.log.Log$.parseTopicPartitionName(Log.scala:1146)
        at kafka.log.LogManager.$anonfun$loadLogs$10(LogManager.scala:153)
        at kafka.utils.CoreUtils$$anon$1.run(CoreUtils.scala:57)
        at java.util.concurrent.Executors$RunnableAdapter.call(Executors.java:511)
        at java.util.concurrent.FutureTask.run(FutureTask.java:266)
        at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1142)
        at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:617)
        at java.lang.Thread.run(Thread.java:745)
[2017-06-09 12:24:43,363] INFO [Kafka Server 101], shutting down (kafka.server.KafkaServer)

Upvotes: 0

Views: 944

Answers (1)

Michal Borowiecki
Michal Borowiecki

Reputation: 4324

If your topic indeed has the dot (".") in the name as shown, I believe you have been hit by this defect: KAFKA-5232 Kafka broker fails to start if a topic containing dot in its name is marked for delete but hasn't been deleted during previous uptime

Upvotes: 1

Related Questions