安装kafka eagle时踩的一个大坑

根据网上的教程kafka eagle的配置文件配好后,启动kafka eagle,kafka eagle的面板却显示不了kafka的任何信息。

我的配置:

kafka.eagle.zk.cluster.alias=cluster1
cluster1.zk.list=hadoop000:2181

cluster1.kafka.eagle.broker.size=20

kafka.zk.limit.size=25

kafka.eagle.webui.port=8048

cluster1.kafka.eagle.offset.storage=kafka

kafka.eagle.metrics.charts=false
kafka.eagle.metrics.retain=15

kafka.eagle.sql.topic.records.max=5000
kafka.eagle.sql.fix.error=false

kafka.eagle.topic.token=keadmin

cluster1.kafka.eagle.sasl.enable=false
cluster1.kafka.eagle.sasl.protocol=SASL_PLAINTEXT
cluster1.kafka.eagle.sasl.mechanism=SCRAM-SHA-256
cluster1.kafka.eagle.sasl.jaas.config=org.apache.kafka.common.security.scram.ScramLoginModule required username="kafka" password="kafka-eagle";
cluster1.kafka.eagle.sasl.client.id=
cluster1.kafka.eagle.sasl.cgroup.enable=false
cluster1.kafka.eagle.sasl.cgroup.topics=

kafka.eagle.driver=com.mysql.jdbc.Driver
kafka.eagle.url=jdbc:mysql://hadoop000:3306/ke?useUnicode=true&characterEncoding=UTF-8&zeroDateTimeBehavior=convertToNull
kafka.eagle.username=root
kafka.eagle.password=123456

查看log文件:

ERROR [KafkaServiceImpl.org.springframework.scheduling.quartz.SchedulerFactoryBean#2_Worker-1] - Get kafka consumer has error,msg is Failed create new KafkaAdminClient
org.apache.kafka.common.KafkaException: Failed create new KafkaAdminClient

Caused by: org.apache.kafka.common.config.ConfigException: No resolvable bootstrap urls given in bootstrap.servers

主机的映射都没啥问题,为啥就是连接不上kafka呢?

又搞了大半天。。。

最后查看kafka的配置server.properties文件,发现:

zookeeper.connect=hadoop000:2181/kafka

后面有个/kafka,这是问题的主要原因。

解决办法
kafka eagle的配置文件:

cluster1.zk.list=hadoop000:2181

改成:

cluster1.zk.list=hadoop000:2181/kafka

所以在查看和删除topic时的命令,也要改成:

kafka-topics.sh --describe --zookeeper hadoop000:2181/kafka --topic topic_test

kafka-topics.sh  --delete --zookeeper hadoop000:2181/kafka  --topic topic_test
已标记关键词 清除标记
相关推荐
©️2020 CSDN 皮肤主题: 书香水墨 设计师:CSDN官方博客 返回首页