Error with zookeeper & storm

一个人想着一个人 提交于 2019-12-08 09:08:47

问题


I am developing a code for Storm, which is an example of the developers. My problem is that when you run this code from IDE Eclipse, do not get the connection between Storm and Zookeeper is established. Zookeeper is running in 2181 and is also set in storm.yaml.

My exception is:

72992 [NIOServerCxn.Factory:0.0.0.0/0.0.0.0:2000] WARN  o.a.s.s.o.a.z.s.NIOServerCnxn - caught end of stream exception
org.apache.storm.shade.org.apache.zookeeper.server.ServerCnxn$EndOfStreamException: Unable to read additional data from client sessionid 0x15432be39f50004, likely client has closed socket
    at org.apache.storm.shade.org.apache.zookeeper.server.NIOServerCnxn.doIO(NIOServerCnxn.java:228) [storm-core-1.0.0.jar:1.0.0]
    at org.apache.storm.shade.org.apache.zookeeper.server.NIOServerCnxnFactory.run(NIOServerCnxnFactory.java:208) [storm-core-1.0.0.jar:1.0.0]
    at java.lang.Thread.run(Thread.java:745) [?:1.7.0_67]
73194 [NIOServerCxn.Factory:0.0.0.0/0.0.0.0:2000] INFO  o.a.s.s.o.a.z.s.NIOServerCnxn - Closed socket connection for client /127.0.0.1:37597 which had sessionid 0x15432be39f50004

Any idea or procedure to be performed? Pass from the configuration code? And as I do?


回答1:


I faced the same issue in the past,when I was beggining with Storm. I'm not an expert yet, but I can afford to say that @Matthias J. Sax is right, the topology must run in local-mode to start it on Eclipse. I did that with Eclipse Mars, running Storm 0.10.0 and worked perfect. You have to do this:

Replace:

StormSubmitter.submitTopology("test", conf, builder.createTopology());

With:

 LocalCluster cluster = new LocalCluster();
      cluster.submitTopology("test", conf, builder.createTopology());

Hope it helped you.



来源:https://stackoverflow.com/questions/36737999/error-with-zookeeper-storm

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!