报错信息:

[2021-12-21 13:31:45,792] ERROR Exiting Kafka due to fatal exception (kafka.Kafka$)
org.apache.kafka.common.config.ConfigException: Invalid value tcp://10.98.173.7:9092 for configuration port: Not a number of type INT
        at org.apache.kafka.common.config.ConfigDef.parseType(ConfigDef.java:742)
        at org.apache.kafka.common.config.ConfigDef.parseValue(ConfigDef.java:490)
        at org.apache.kafka.common.config.ConfigDef.parse(ConfigDef.java:483)
        at org.apache.kafka.common.config.AbstractConfig.<init>(AbstractConfig.java:108)
        at org.apache.kafka.common.config.AbstractConfig.<init>(AbstractConfig.java:142)
        at kafka.server.KafkaConfig.<init>(KafkaConfig.scala:1386)
        at kafka.server.KafkaConfig.<init>(KafkaConfig.scala:1389)
        at kafka.Kafka$.buildServer(Kafka.scala:67)
        at kafka.Kafka$.main(Kafka.scala:87)
        at kafka.Kafka.main(Kafka.scala)

原因是若存在一个svc名字叫kafka,则k8s自动创建一个环境变量KAFKA_PORT
svc名字避开即可。

发表回复

您的电子邮箱地址不会被公开。 必填项已用*标注

Captcha Code