我正在为Storm开发代码,这是开发人员的一个例子。我的问题是,当您从IDE Eclipse运行此代码时,不要建立Storm和Zookeeper之间的连接。 Zookeeper在2181运行,也设置在storm.yaml。
我的例外是:
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
要执行的任何想法或程序?从配置代码传递?就像我一样?
答案 0 :(得分:0)
我过去遇到同样的问题,当时我正在和Storm一起开始。我还不是专家,但我可以说@Matthias J. Sax是对的,拓扑必须在本地模式下运行才能在Eclipse上启动它。我用Eclipse Mars做了那个,运行Storm 0.10.0并且工作得很完美。你必须这样做:
替换:
StormSubmitter.submitTopology("test", conf, builder.createTopology());
使用:
LocalCluster cluster = new LocalCluster();
cluster.submitTopology("test", conf, builder.createTopology());
希望它对你有所帮助。