简体   繁体   English

风暴-java.net.ConnectException:连接被拒绝

[英]Storm - java.net.ConnectException: Connection refused

I have deployed storm server, but I am receiving the following error every time I start supervisor. 我已经部署了风暴服务器,但是每次启动主管时都会收到以下错误。

2014-09-08 09:04:40 o.a.z.ClientCnxn [INFO] Opening socket connection to server localhost/127.0.0.1:2181. Will not attempt to authenticate using SASL (unknown error)
2014-09-08 09:04:40 o.a.z.ClientCnxn [WARN] Session 0x0 for server null, unexpected error, closing socket connection and attempting reconnect
java.net.ConnectException: Connection refused
at sun.nio.ch.SocketChannelImpl.checkConnect(Native Method) ~[na:1.7.0_65]
at sun.nio.ch.SocketChannelImpl.finishConnect(SocketChannelImpl.java:739) ~[na:1.7.0_65]
at org.apache.zookeeper.ClientCnxnSocketNIO.doTransport(ClientCnxnSocketNIO.java:350) ~[zookeeper-3.4.5.jar:3.4.5-1392090]
at org.apache.zookeeper.ClientCnxn$SendThread.run(ClientCnxn.java:1068) ~[zookeeper-3.4.5.jar:3.4.5-1392090]

can anyone please help me with the error. 谁能帮我解决这个错误。 Thanks in advance 提前致谢

Starting Zookeeper was my issue here: 启动Zookeeper是我在这里遇到的问题:

zkServer start

After which you should rerun the topology. 之后,您应该重新运行拓扑。

Have you setup Zookeeper? 您设置了Zookeeper吗? Zookeeper should be up and running before running storm topologies. 在运行风暴拓扑之前,Zookeeper应该已启动并正在运行。

In the storm documentation refer to Set up a Zookeeper cluster section. Storm文档中,请参阅“ 设置Zookeeper群集”部分。

This exception has one meaning only: nothing was listening at the IP:port you tried to connect to. 此异常仅具有一个含义:在尝试连接的IP:端口上没有监听。 Either that was wrong or you didn't start the server. 可能是错误的消息,或者您没有启动服务器。

  1. Go to Zookeeper Installation directory. 进入“ Zookeeper安装目录”。
  2. cd to bin. cd到bin。
  3. Give the command ./zkServer stop in all zookeeper nodes. 在所有zookeeper节点中输入命令./zkServer stop
  4. Again give the command ./zkServer start in all zookeeper nodes. 再次在所有zookeeper节点中输入命令./zkServer start
  5. Start all the storm processes(Nimbus and Supervisor). 启动所有风暴过程(Nimbus和Supervisor)。

Now you will not get this exception in Zookeeper cluster. 现在,您将不会在Zookeeper群集中收到此异常。

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM