kafka Failed to send messages after 3 tries.

我在网上搜了不少资料html

说是zookeeper的问题,修改更改server.properties下的host.name,zookeeper.connect的localhost 为ip地址 app

怎么也无论用ui

后来就单独建了一个项目,发现没有问题。结论是jar包冲突,逐个删除jar包 发现是log4j的版本过低,须要1.2.12以上的版本spa

最后问题解决日志

总结:
code

1、其实这个问题能够早点解决,可是因为我没有仔细看日志,全部卡了我两天的时间。以前都是只看错误日志,不看警告日志server

log4j:WARN No appenders could be found for logger (kafka.utils.VerifiableProperties).htm

log4j:WARN Please initialize the log4j system properly.ip

SLF4J: This version of SLF4J requires log4j version 1.2.12 or later. See also http://www.slf4j.org/codes.html#log4j_versionkafka

Exception in thread "main" kafka.common.FailedToSendMessageException: Failed to send messages after 3 tries.

第2、公共jar包尽可能使用高版本的东西。

第3、kafka 要是用ip,localhost 可能没数据

相关文章
相关标签/搜索