Kafka版本: 0.10.2.1(服务器)
Zookeeper :与Kafka捆绑在一起
如果删除主题然后重新启动代理 - 它将失败。 Broker配置为 delete.topic.enable = true
删除命令:
./kafka-topics.sh --zookeeper localhost:2182 --delete --topic MY.TOPIC.NAME
目前唯一的出路是手动转到日志目录并删除 主题目录使用rm-rf。发布它确定。
错误:
[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)
答案 0 :(得分:1)
如果您的主题确实在显示的名称中有点("。"),我相信您已遇到此缺陷: 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