Turn: http://blog.chinaunix.net/uid-25135004-id-4172954.html
Test Kafka producer send message and consumer accept message error, Kafka version kafka_2.9.2-0.8.1
[[Email protected] ~] #/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.
Solution:
Download slf4j-1.7.6.zip
Http://www.slf4j.org/dist/slf4j-1.7.6.zip
Extract
Unzip slf4j-1.7.6.zip
Copy the slf4j-nop-1.7.6.jar package to the Kafka libs directory
CD slf4j-1.7.6
CP slf4j-nop-1.7.6.jar/export/Kafka/libs/
Kafka reports failed to load class "org. slf4j. impl. staticloggerbinder". [Z]