我从Apache官网下载kafka_2.11-0.9.0.1.tgz,或自己编译kafka-0.9.0.1-src,然后自己虚拟机上部署单节点的Kafka时,
[mw_shl_code=bash,true]bin/zookeeper-server-start.sh config/zookeeper.properties[/mw_shl_code]
可以启动单节点的ZK实例,但是
[mw_shl_code=bash,true]bin/kafka-server-start.sh config/server.properties[/mw_shl_code]
启动Kafka server时报错如下:
[mw_shl_code=bash,true][2016-05-21 21:56:15,368] FATAL (kafka.Kafka$)
java.lang.NoSuchMethodError: scala.Predef$.ArrowAssoc(Ljava/lang/Object;)Ljava/lang/Object;
at kafka.api.ApiVersion$.<init>(ApiVersion.scala:33)
at kafka.api.ApiVersion$.<clinit>(ApiVersion.scala)
at kafka.server.Defaults$.<init>(KafkaConfig.scala:121)
at kafka.server.Defaults$.<clinit>(KafkaConfig.scala)
at kafka.server.KafkaConfig$.<init>(KafkaConfig.scala:522)
at kafka.server.KafkaConfig$.<clinit>(KafkaConfig.scala)
at kafka.server.KafkaServerStartable$.fromProps(KafkaServerStartable.scala:28)
at kafka.Kafka$.main(Kafka.scala:58)
at kafka.Kafka.main(Kafka.scala)
[/mw_shl_code]
我用Kafka GitHub上的命令自己编译指定Scala版本也报上述同样的错误:
[mw_shl_code=bash,true]gradlew -PscalaVersion=2.11.8 jar
gradlew -PscalaVersion=2.11.8 test
gradlew -PscalaVersion=2.11.8 releaseTarGz[/mw_shl_code]
想问问大家这是怎么回事?有木有人遇到过类似的情况?
|