记录一下k8s部署kafka如果名字为kafka时,会一直崩溃。

 ERROR [KafkaServer id=2] Fatal error during KafkaServer startup. Prepare to shutdown (kafka.server.KafkaServer)
java.lang.IllegalArgumentException: requirement failed: Configured end points 10.43.180.42:9092 in advertised listeners are already registered by broker 1
	at kafka.server.KafkaServer.$anonfun$createBrokerInfo$3(KafkaServer.scala:478)
	at kafka.server.KafkaServer.$anonfun$createBrokerInfo$3$adapted(KafkaServer.scala:476)
	at scala.collection.IterableOnceOps.foreach(IterableOnce.scala:553)
	at scala.collection.IterableOnceOps.foreach$(IterableOnce.scala:551)
	at scala.collection.AbstractIterable.foreach(Iterable.scala:920)
	at kafka.server.KafkaServer.createBrokerInfo(KafkaServer.scala:476)
	at kafka.server.KafkaServer.startup(KafkaServer.scala:311)
	at kafka.server.KafkaServerStartable.startup(KafkaServerStartable.scala:44)
	at kafka.Kafka$.main(Kafka.scala:82)
	at kafka.Kafka.main(Kafka.scala)

解决:

把deployment或者statefulset名称修改为非“kafka”,成功解决。

Logo

K8S/Kubernetes社区为您提供最前沿的新闻资讯和知识内容

更多推荐