码迷,mamicode.com
首页 > 其他好文 > 详细

kafka 报Failed to load class "org.slf4j.impl.StaticLoggerBinder".[z]

时间:2014-10-11 18:40:56      阅读:403      评论:0      收藏:0      [点我收藏+]

标签:des   blog   http   io   ar   for   strong   sp   on   

转:http://blog.chinaunix.net/uid-25135004-id-4172954.html

 

测试kafka    producer发送消息 和  consumer 接受消息报错 ,kafka版本kafka_2.9.2-0.8.1

[root@master ~]#  /export/kafka/bin/kafka-console-producer.sh  --broker-list 10.14.2.201:9092,10.14.2.202:9092,10.14.2.203:9092,10.14.2.204:9092    --topic test 
SLF4J: Failed to load class "org.slf4j.impl.StaticLoggerBinder".
SLF4J: Defaulting to no-operation (NOP) logger implementation
SLF4J: See http://www.slf4j.org/codes.html#StaticLoggerBinder for further details.

# /export/kafka/bin/kafka-console-consumer.sh  --zookeeper   10.14.2.201:2181,10.14.2.202:2181,10.14.2.203:2181,10.14.2.204:2181  --topic test --from-beginning
SLF4J: Failed to load class "org.slf4j.impl.StaticLoggerBinder".
SLF4J: Defaulting to no-operation (NOP) logger implementation
SLF4J: See http://www.slf4j.org/codes.html#StaticLoggerBinder for further details.



解决方法:

下载slf4j-1.7.6.zip
http://www.slf4j.org/dist/slf4j-1.7.6.zip

解压
unzip slf4j-1.7.6.zip

把slf4j-nop-1.7.6.jar 包复制到kafka libs目录下面
cd  slf4j-1.7.6
cp slf4j-nop-1.7.6.jar  /export/kafka/libs/

kafka 报Failed to load class "org.slf4j.impl.StaticLoggerBinder".[z]

标签:des   blog   http   io   ar   for   strong   sp   on   

原文地址:http://www.cnblogs.com/jjj250/p/4019366.html

(0)
(0)
   
举报
评论 一句话评论(0
登录后才能评论!
© 2014 mamicode.com 版权所有  联系我们:gaon5@hotmail.com
迷上了代码!