Kafka使用者无法连接到zookeeper - 服务器null的会话0x0

时间:2014-11-05 22:11:44

标签: apache-kafka apache-camel apache-zookeeper apache-servicemix

我一直在尝试在servicemix中运行Kafka使用者。当我使用mvn camel:run运行时,消费者能够正确运行。但是,与servicekeeper的连接在servicemix中失败,并出现以下错误:

2014-11-05 13:57:08,125 | INFO  | l Console Thread | VerifiableProperties             | ?                                   ? | 217 - org.apache.servicemix.bundles.kafka_2.10 - 0.8.1.1 | Property zookeeper.connect is overridden to 172.17.0.5:2181
2014-11-05 13:57:08,126 | INFO  | l Console Thread | ZookeeperConsumerConnector       | ?                                   ? | 217 - org.apache.servicemix.bundles.kafka_2.10 - 0.8.1.1 | [group2_sumit-lm-1415224628125-d456f96e], Connecting to zookeeper instance at 172.17.0.5:2181
2014-11-05 13:57:08,126 | INFO  | l Console Thread | ZooKeeper                        | ?                                   ? | 250 - org.apache.hadoop.zookeeper - 3.4.6 | Initiating client connection, connectString=172.17.0.5:2181 sessionTimeout=6000 watcher=org.I0Itec.zkclient.ZkClient@79130d54
2014-11-05 13:57:08,126 | INFO  | -172.17.0.5:2181 | ZkEventThread                    | ?                                   ? | 259 - wrap_mvn_com.github.sgroschupf_zkclient_0.1 - 0.0.0 | Starting ZkClient event thread.
2014-11-05 13:57:08,128 | WARN  | 172.17.0.5:2181) | ClientCnxn                       | ?                                   ? | 250 - org.apache.hadoop.zookeeper - 3.4.6 | Session 0x0 for server null, unexpected error, closing socket connection and attempting reconnect
java.lang.NoClassDefFoundError: org/ietf/jgss/GSSException
    at org.apache.zookeeper.ClientCnxn$SendThread.startConnect(ClientCnxn.java:945)[250:org.apache.hadoop.zookeeper:3.4.6]
    at org.apache.zookeeper.ClientCnxn$SendThread.run(ClientCnxn.java:1003)[250:org.apache.hadoop.zookeeper:3.4.6]
Caused by: java.lang.ClassNotFoundException: org.ietf.jgss.GSSException not found by org.apache.hadoop.zookeeper [250]
    at org.apache.felix.framework.BundleWiringImpl.findClassOrResourceByDelegation(BundleWiringImpl.java:1556)[org.apache.felix.framework-4.4.1.jar:]
    at org.apache.felix.framework.BundleWiringImpl.access$400(BundleWiringImpl.java:77)[org.apache.felix.framework-4.4.1.jar:]
    at org.apache.felix.framework.BundleWiringImpl$BundleClassLoader.loadClass(BundleWiringImpl.java:1993)[org.apache.felix.framework-4.4.1.jar:]
    at java.lang.ClassLoader.loadClass(ClassLoader.java:358)[:1.7.0_65]

zookeeper和kafka只在我本地计算机上的docker容器内运行。连接在这里不是问题,因为我可以通过端口2181 telnet到zookeeper。我似乎也无法从zookeeper日志获得任何东西。 zookeeper上的日志采用加密格式。有没有办法从servicemix或zookeeper中调试此问题?

任何指针都会非常有用。

2 个答案:

答案 0 :(得分:0)

我只是快速搜索GSSException,看起来您需要更改servicemix etc / jre.properties文件以导出" org.ietf.jgss"来自JVM的包。

答案 1 :(得分:0)

Zookeeper Site

提交了一个错误