gpt4 book ai didi

apache-storm - Storm 中的连接被拒绝错误

转载 作者:行者123 更新时间:2023-12-04 04:16:10 28 4
gpt4 key购买 nike

我是 Storm 的新手..我遇到了以下错误

java.net.ConnectException: Connection refused
at sun.nio.ch.SocketChannelImpl.checkConnect(Native Method)
at sun.nio.ch.SocketChannelImpl.finishConnect(SocketChannelImpl.java:599)
at org.apache.zookeeper.ClientCnxn$SendThread.run(ClientCnxn.java:1119)
1178482 [Thread-11-SendThread(localhost:2000)] WARN org.apache.zookeeper.ClientCnxn - Session 0x1417cd58578000b for server null, unexpected error, closing socket connection and attempting reconnect

有时我的拓扑工作正常,但当我再次尝试时,我遇到了上述错误。在谷歌中搜索了很多但找不到任何线索。我在本地集群中运行拓扑。请提出一些解决方案

请在下面找到更多日志:-

2595 [Thread-11-EventThread] INFO  com.netflix.curator.framework.state.ConnectionStateManager  - State change: SUSPENDED
2596 [Thread-11-EventThread] WARN backtype.storm.cluster - Received event :disconnected::none: with disconnected Zookeeper.
2596 [ConnectionStateManager-0] WARN com.netflix.curator.framework.state.ConnectionStateManager - There are no ConnectionStateListeners registered.
3592 [Thread-11-SendThread(localhost:2000)] WARN org.apache.zookeeper.ClientCnxn - Session 0x1417e6596c7000b for server null, unexpected error, closing socket connection and attempting reconnect
java.net.ConnectException: Connection refused
at sun.nio.ch.SocketChannelImpl.checkConnect(Native Method)
at sun.nio.ch.SocketChannelImpl.finishConnect(SocketChannelImpl.java:599)
at org.apache.zookeeper.ClientCnxn$SendThread.run(ClientCnxn.java:1119)
3895 [Thread-11-SendThread(localhost:2000)] WARN org.apache.zookeeper.ClientCnxn - Session 0x1417e6596c7000b for server null, unexpected error, closing socket connection and attempting reconnect
org.apache.zookeeper.KeeperException$ConnectionLossException: KeeperErrorCode = ConnectionLoss
at org.apache.zookeeper.KeeperException.create(KeeperException.java:90)
at com.netflix.curator.framework.imps.CuratorFrameworkImpl.processBackgroundOperation(CuratorFrameworkImpl.java:380)
at com.netflix.curator.framework.imps.BackgroundSyncImpl$1.processResult(BackgroundSyncImpl.java:49)
at org.apache.zookeeper.ClientCnxn$EventThread.processEvent(ClientCnxn.java:617)
at org.apache.zookeeper.ClientCnxn$EventThread.run(ClientCnxn.java:506)

请查找更多日志:-

java.net.ConnectException: Connection refused
at sun.nio.ch.SocketChannelImpl.checkConnect(Native Method)
at sun.nio.ch.SocketChannelImpl.finishConnect(SocketChannelImpl.java:599)
at org.apache.zookeeper.ClientCnxn$SendThread.run(ClientCnxn.java:1119)
50454 [Thread-15] ERROR com.netflix.curator.ConnectionState - Connection timed out
org.apache.zookeeper.KeeperException$ConnectionLossException: KeeperErrorCode = ConnectionLoss
at com.netflix.curator.ConnectionState.getZooKeeper(ConnectionState.java:72)
at com.netflix.curator.CuratorZookeeperClient.getZooKeeper(CuratorZookeeperClient.java:74)
at com.netflix.curator.framework.imps.CuratorFrameworkImpl.getZooKeeper(CuratorFrameworkImpl.java:353)
at com.netflix.curator.framework.imps.ExistsBuilderImpl$2.call(ExistsBuilderImpl.java:149)
at com.netflix.curator.framework.imps.ExistsBuilderImpl$2.call(ExistsBuilderImpl.java:138)
at com.netflix.curator.RetryLoop.callWithRetry(RetryLoop.java:85)
at com.netflix.curator.framework.imps.ExistsBuilderImpl.pathInForeground(ExistsBuilderImpl.java:134)
at com.netflix.curator.framework.imps.ExistsBuilderImpl.forPath(ExistsBuilderImpl.java:125)
at com.netflix.curator.framework.imps.ExistsBuilderImpl.forPath(ExistsBuilderImpl.java:34)
at backtype.storm.zookeeper$exists_node_QMARK_.invoke(zookeeper.clj:78)
at backtype.storm.zookeeper$exists.invoke(zookeeper.clj:117)
at backtype.storm.cluster$mk_distributed_cluster_state$reify__1996.set_data(cluster.clj:70)
at backtype.storm.cluster$mk_storm_cluster_state$reify__2415.worker_heartbeat_BANG_(cluster.clj:276)
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
at java.lang.reflect.Method.invoke(Method.java:597)
at clojure.lang.Reflector.invokeMatchingMethod(Reflector.java:93)
at clojure.lang.Reflector.invokeInstanceMethod(Reflector.java:28)
at backtype.storm.daemon.worker$do_executor_heartbeats.doInvoke(worker.clj:35)
at clojure.lang.RestFn.invoke(RestFn.java:439)
at backtype.storm.daemon.worker$fn__4348$exec_fn__1228__auto____4349$fn__4352.invoke(worker.clj:346)
at backtype.storm.timer$schedule_recurring$this__1776.invoke(timer.clj:69)
at backtype.storm.timer$mk_timer$fn__1759$fn__1760.invoke(timer.clj:33)
at backtype.storm.timer$mk_timer$fn__1759.invoke(timer.clj:26)
at clojure.lang.AFn.run(AFn.java:24)
at java.lang.Thread.run(Thread.java:680)

最佳答案

我也遇到了这个问题。我的问题是运行时间设置得太短。zookeeper 没有足够的时间正常关闭。看下面的代码:

    builder.createTopology());

try {
Thread.sleep(20000);
} catch (InterruptedException e) {
// TODO Auto-generated catch block
e.printStackTrace();
}
cluster.shutdown();
}

您应该在调用 cluster.shutdown() 之前设置足够的时间。一开始我设置了Thread.sleep(1000),然后出现了和你一样的问题。我改了时间之后,这个问题就再也没有出现过。

关于apache-storm - Storm 中的连接被拒绝错误,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/19151897/

28 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com