本文介绍了Zookeeper&的错误风暴的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我正在为Storm开发代码,这是开发人员的示例.我的问题是,当您从IDE Eclipse运行此代码时,不要在Storm和Zookeeper之间建立连接. Zookeeper运行在2181年,并且也设置在storm.yaml中.

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.

我的例外是:

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?

推荐答案

在与Storm一起乞讨时,我曾经遇到过同样的问题.我还不是专家,但是我可以肯定地说@Matthias J. Sax是正确的,该拓扑必须以本地模式运行才能在Eclipse上启动它.我使用Eclipse Mars(运行Storm 0.10.0)做到了这一点,并且运行良好.您必须这样做:

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:

替换:

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

使用:

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

希望它对您有所帮助.

这篇关于Zookeeper&的错误风暴的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持!

09-11 08:12