bin/kafka-producer-perf-test.sh 报错

凡峯 发表于: 2017-12-28   最后更新时间: 2017-12-28 22:43:27   3,302 游览
./kafka-producer-perf-test.sh --broker--list localhost:2181 --topic push-serve-1
Exception in thread "main" java.lang.NoClassDefFoundError: kafka/perf/ProducerPerformance
Caused by: java.lang.ClassNotFoundException: kafka.perf.ProducerPerformance
        at java.net.URLClassLoader$1.run(URLClassLoader.java:202)
        at java.security.AccessController.doPrivileged(Native Method)
        at java.net.URLClassLoader.findClass(URLClassLoader.java:190)
        at java.lang.ClassLoader.loadClass(ClassLoader.java:306)
        at sun.misc.Launcher$AppClassLoader.loadClass(Launcher.java:301)
        at java.lang.ClassLoader.loadClass(ClassLoader.java:247)
Could not find the main class: kafka.perf.ProducerPerformance.  Program will exit.

我的kafka应该也算起来了吧 这个server.log

controller_epoch
2017-12-28 20:11:47,549 DEBUG [main-EventThread - ZkClient.java:395] Leaving process event
2017-12-28 20:11:47,552 DEBUG [main - ZkClient.java:137] Subscribed data changes for /admin/reassign_partitions
2017-12-28 20:11:47,553 DEBUG [main - ZkClient.java:137] Subscribed data changes for /admin/preferred_replica_election
2017-12-28 20:11:47,801 DEBUG [main - ZkClient.java:137] Subscribed data changes for /brokers/topics/push-serve-1
2017-12-28 20:11:47,842 INFO  [ZkClient-EventThread-19-192.168.3.99:2181 - Logging.scala:67] New leader is 14
2017-12-28 20:11:47,862 INFO  [main - Logging.scala:67] [Kafka Server 14], Started
2017-12-28 20:11:47,894 INFO  [kafka-request-handler-0 - Logging.scala:67] [Replica Manager on Broker 14]: Handling LeaderAndIsr request Name:LeaderAndIsrRequest;Version:0;Controller:14;ControllerEpoch:3;CorrelationId:0;ClientId:id_14-host_192.168.3.99-port_9092;PartitionState:(push-serve-1,0) -> (LeaderAndIsrInfo:(Leader:14,ISR:14,LeaderEpoch:0,ControllerEpoch:1),ReplicationFactor:1),AllReplicas:14);Leaders:id:14,host:192.168.3.99,port:9092
2017-12-28 20:11:47,910 INFO  [kafka-request-handler-0 - Logging.scala:67] [ReplicaFetcherManager on broker 14] Removing fetcher for partition [push-serve-1,0]
2017-12-28 20:11:47,923 INFO  [kafka-request-handler-0 - Logging.scala:67] [Replica Manager on Broker 14]: Handled leader and isr request Name:LeaderAndIsrRequest;Version:0;Controller:14;ControllerEpoch:3;CorrelationId:0;ClientId:id_14-host_192.168.3.99-port_9092;PartitionState:(push-serve-1,0) -> (LeaderAndIsrInfo:(Leader:14,ISR:14,LeaderEpoch:0,ControllerEpoch:1),ReplicationFactor:1),AllReplicas:14);Leaders:id:14,host:192.168.3.99,port:9092
发表于 2017-12-28
添加评论

你的命令错了额。

你的答案

查看kafka相关的其他问题或提一个您自己的问题