【发布时间】:2016-03-10 03:00:14
【问题描述】:
我用 RedHat 6 创建了 3 个 aws ec2 服务器,并使用 this 教程来部署storm。
创建 zookeeper 和 nimbus 实例后,我可以手动启动 zookeeper 和 nimbus/ui 节点。 nimbus:8080 向我展示了一个空拓扑。 第三台服务器配置为一个主管/从属节点,我在 ui 中看到了它。
之后我添加了 supervisord 选项并更改了一些 ec2 防火墙选项(不幸的是同时)。
现在,当我启动 zookeeper、nimbus 和 ui(有或没有 supervisord)并查看 ui 时,我得到了这个错误。
java.lang.RuntimeException: org.apache.thrift7.transport.TTransportException: java.net.ConnectException: Connection timed out
已经尝试摆弄 aws 防火墙配置,但没有任何改变。甚至向所有 IP 地址开放一些端口....
我使用这个readme 来获得正确的设置。
日志都是空的。 Zookeper 似乎接受连接:
2015-12-04 21:47:04,151 [myid:] - INFO [NIOServerCxn.Factory:0.0.0.0/0.0.0.0:2181:NIOServerCnxnFactory@192] - Accepted s2015-12-04 21:47:04,174 [myid:] - INFO [SyncThread:0:ZooKeeperServer@643] - Established session 0x15170091b370000 with negotiated timeout 20000 for client /52.34.142.187:53935
2015-12-04 21:47:04,177 [myid:] - INFO [ProcessThread(sid:0 cport:2181)::PrepRequestProcessor@489] - Processed session termination for sessionid: 0x15170091b370000
2015-12-04 21:47:04,179 [myid:] - INFO [NIOServerCxn.Factory:0.0.0.0/0.0.0.0:2181:NIOServerCnxn@1008] - Closed socket connection for client /52.34.142.187:53935 which had sessionid 0x15170091b370000
2015-12-04 21:47:04,181 [myid:] - INFO [NIOServerCxn.Factory:0.0.0.0/0.0.0.0:2181:NIOServerCnxnFactory@192] - Accepted socket connection from /52.34.142.187:53936
2015-12-04 21:47:04,183 [myid:] - INFO [NIOServerCxn.Factory:0.0.0.0/0.0.0.0:2181:ZooKeeperServer@898] - Client attempting to establish new session at /52.34.142.187:53936
2015-12-04 21:47:04,187 [myid:] - INFO [SyncThread:0:ZooKeeperServer@643] - Established session 0x15170091b370001 with negotiated timeout 20000 for client /52.34.142.187:53936
2015-12-04 21:47:04,193 [myid:] - INFO [ProcessThread(sid:0 cport:2181)::PrepRequestProcessor@489] - Processed session termination for sessionid: 0x15170091b370001
2015-12-04 21:47:04,194 [myid:] - INFO [NIOServerCxn.Factory:0.0.0.0/0.0.0.0:2181:NIOServerCnxn@1008] - Closed socket connection for client /52.34.142.187:53936 which had sessionid 0x15170091b370001
2015-12-04 21:47:04,201 [myid:] - INFO [NIOServerCxn.Factory:0.0.0.0/0.0.0.0:2181:NIOServerCnxnFactory@192] - Accepted socket connection from /52.34.142.187:53937
2015-12-04 21:47:04,203 [myid:] - INFO [NIOServerCxn.Factory:0.0.0.0/0.0.0.0:2181:ZooKeeperServer@898] - Client attempting to establish new session at /52.34.142.187:53937
2015-12-04 21:47:04,204 [myid:] - INFO [SyncThread:0:ZooKeeperServer@643] - Established session 0x15170091b370002 with negotiated timeout 20000 for client /52.34.142.187:53937
2015-12-04 21:47:54,973 [myid:] - INFO [NIOServerCxn.Factory:0.0.0.0/0.0.0.0:2181:NIOServerCnxnFactory@192] - Accepted socket connection from /52.33.187.63:58714
2015-12-04 21:47:55,034 [myid:] - INFO [NIOServerCxn.Factory:0.0.0.0/0.0.0.0:2181:ZooKeeperServer@898] - Client attempting to establish new session at /52.33.187.63:58714
2015-12-04 21:47:55,035 [myid:] - INFO [SyncThread:0:ZooKeeperServer@643] - Established session 0x15170091b370003 with negotiated timeout 20000 for client /52.33.187.63:58714
2015-12-04 21:47:56,056 [myid:] - INFO [ProcessThread(sid:0 cport:2181)::PrepRequestProcessor@489] - Processed session termination for sessionid: 0x15170091b370003
2015-12-04 21:47:56,058 [myid:] - INFO [NIOServerCxn.Factory:0.0.0.0/0.0.0.0:2181:NIOServerCnxn@1008] - Closed socket connection for client /52.33.187.63:58714 which had sessionid 0x15170091b370003
2015-12-04 21:47:56,063 [myid:] - INFO [NIOServerCxn.Factory:0.0.0.0/0.0.0.0:2181:NIOServerCnxnFactory@192] - Accepted socket connection from /52.33.187.63:58715
2015-12-04 21:47:56,065 [myid:] - INFO [NIOServerCxn.Factory:0.0.0.0/0.0.0.0:2181:ZooKeeperServer@898] - Client attempting to establish new session at /52.33.187.63:58715
2015-12-04 21:47:56,066 [myid:] - INFO [SyncThread:0:ZooKeeperServer@643] - Established session 0x15170091b370004 with negotiated timeout 20000 for client /52.33.187.63:58715
2015-12-04 21:49:12,000 [myid:] - INFO [SessionTracker:ZooKeeperServer@353] - Expiring session 0x15170091b370002, timeout of 20000ms exceeded
2015-12-04 21:49:12,000 [myid:] - INFO [ProcessThread(sid:0 cport:2181)::PrepRequestProcessor@489] - Processed session termination for sessionid: 0x15170091b370002
2015-12-04 21:49:12,002 [myid:] - INFO [SyncThread:0:NIOServerCnxn@1008] - Closed socket connection for client /52.34.142.187:53937 which had sessionid 0x15170091b370002
2015-12-04 21:49:14,001 [myid:] - INFO [SessionTracker:ZooKeeperServer@353] - Expiring session 0x15170091b370004, timeout of 20000ms exceeded
2015-12-04 21:49:14,001 [myid:] - INFO [ProcessThread(sid:0 cport:2181)::PrepRequestProcessor@489] - Processed session termination for sessionid: 0x15170091b370004
2015-12-04 21:49:14,002 [myid:] - INFO [SyncThread:0:NIOServerCnxn@1008] - Closed socket connection for client /52.33.187.63:58715 which had sessionid 0x15170091b370004ocket connection from /52.34.142.187:53935
2015-12-04 21:47:04,164 [myid:] - INFO [NIOServerCxn.Factory:0.0.0.0/0.0.0.0:2181:ZooKeeperServer@898] - Client attempting to establish new session at /52.34.142.187:53935
2015-12-04 21:47:04,165 [myid:] - INFO [SyncThread:0:FileTxnLog@199] - Creating new log file: log.195
nimbus.log:
2015-12-04 22:11:07.531 o.a.s.s.o.a.z.ClientCnxn [INFO] Client session timed out, have not heard from server in 20082ms for sessionid 0x0, closing socket connection and attempting reconnect
2015-12-04 22:11:08.632 o.a.s.s.o.a.z.ClientCnxn [INFO] Opening socket connection to server ec2-52-34-113-54.us-west-2.compute.amazonaws.com/52.34.113.54:2181. Will not attempt to authenticate using SASL (unknown error)
2015-12-04 22:11:18.481 o.a.s.s.o.a.c.ConnectionState [WARN] Connection attempt unsuccessful after 31043 (greater than max timeout of 20000). Resetting connection and trying again with a new connection.
2015-12-04 22:11:27.743 o.a.s.s.o.a.z.ZooKeeper [INFO] Session: 0x0 closed
2015-12-04 22:11:27.743 o.a.s.s.o.a.z.ZooKeeper [INFO] Initiating client connection, connectString=zkserver1:2181 sessionTimeout=20000 watcher=org.apache.storm.shade.org.apache.curator.ConnectionState@185100a6
2015-12-04 22:11:27.747 o.a.s.s.o.a.z.ClientCnxn [INFO] EventThread shut down
2015-12-04 22:11:27.750 o.a.s.s.o.a.z.ClientCnxn [INFO] Opening socket connection to server ec2-52-34-113-54.us-west-2.compute.amazonaws.com/52.34.113.54:2181. Will not attempt to authenticate using SASL (unknown error)
2015-12-04 22:11:47.753 o.a.s.s.o.a.z.ClientCnxn [INFO] Client session timed out, have not heard from server in 20006ms for sessionid 0x0, closing socket connection and attempting reconnect
2015-12-04 22:11:48.854 o.a.s.s.o.a.z.ClientCnxn [INFO] Opening socket connection to server ec2-52-34-113-54.us-west-2.compute.amazonaws.com/52.34.113.54:2181. Will not attempt to authenticate using SASL (unknown error)
2015-12-04 22:12:03.860 o.a.s.s.o.a.c.ConnectionState [WARN] Connection attempt unsuccessful after 45379 (greater than max timeout of 20000). Resetting connection and trying again with a new connection.
2015-12-04 22:12:07.958 o.a.s.s.o.a.z.ZooKeeper [INFO] Session: 0x0 closed
2015-12-04 22:12:07.959 o.a.s.s.o.a.z.ZooKeeper [INFO] Initiating client connection, connectString=zkserver1:2181 sessionTimeout=20000 watcher=org.apache.storm.shade.org.apache.curator.ConnectionState@185100a6
2015-12-04 22:12:07.959 o.a.s.s.o.a.z.ClientCnxn [INFO] EventThread shut down
2015-12-04 22:12:07.960 o.a.s.s.o.a.z.ClientCnxn [INFO] Opening socket connection to server ec2-52-34-113-54.us-west-2.compute.amazonaws.com/52.34.113.54:2181. Will not attempt to authenticate using SASL (unknown error)
2015-12-04 22:12:27.965 o.a.s.s.o.a.z.ClientCnxn [INFO] Client session timed out, have not heard from server in 20006ms for sessionid 0x0, closing socket connection and attempting reconnect
2015-12-04 22:12:29.066 o.a.s.s.o.a.z.ClientCnxn [INFO] Opening socket connection to server ec2-52-34-113-54.us-west-2.compute.amazonaws.com/52.34.113.54:2181. Will not attempt to authenticate using SASL (unknown error)
2015-12-04 22:12:44.074 o.a.s.s.o.a.c.ConnectionState [WARN] Connection attempt unsuccessful after 40213 (greater than max timeout of 20000). Resetting connection and trying again with a new connection.
2015-12-04 22:12:48.169 o.a.s.s.o.a.z.ZooKeeper [INFO] Session: 0x0 closed
2015-12-04 22:12:48.169 o.a.s.s.o.a.z.ZooKeeper [INFO] Initiating client connection, connectString=zkserver1:2181 sessionTimeout=20000 watcher=org.apache.storm.shade.org.apache.curator.ConnectionState@185100a6
2015-12-04 22:12:48.170 o.a.s.s.o.a.z.ClientCnxn [INFO] EventThread shut down
2015-12-04 22:12:48.171 o.a.s.s.o.a.z.ClientCnxn [INFO] Opening socket connection to server ec2-52-34-113-54.us-west-2.compute.amazonaws.com/52.34.113.54:2181. Will not attempt to authenticate using SASL (unknown error)
2015-12-04 22:13:03.172 o.a.s.s.o.a.z.ClientCnxn [INFO] Socket connection established to ec2-52-34-113-54.us-west-2.compute.amazonaws.com/52.34.113.54:2181, initiating session
2015-12-04 22:13:03.177 o.a.s.s.o.a.z.ClientCnxn [INFO] Session establishment complete on server ec2-52-34-113-54.us-west-2.compute.amazonaws.com/52.34.113.54:2181, sessionid = 0x15170091b370005, negotiated timeout = 20000
2015-12-04 22:13:03.179 o.a.s.s.o.a.c.f.s.ConnectionStateManager [INFO] State change: CONNECTED
2015-12-04 22:13:03.180 b.s.zookeeper [INFO] Zookeeper state update: :connected:none
2015-12-04 22:13:03.186 o.a.s.s.o.a.z.ZooKeeper [INFO] Session: 0x15170091b370005 closed
2015-12-04 22:13:03.186 o.a.s.s.o.a.z.ClientCnxn [INFO] EventThread shut down
2015-12-04 22:13:03.187 b.s.u.StormBoundedExponentialBackoffRetry [INFO] The baseSleepTimeMs [1000] the maxSleepTimeMs [30000] the maxRetries [5]
2015-12-04 22:13:03.188 o.a.s.s.o.a.c.f.i.CuratorFrameworkImpl [INFO] Starting
2015-12-04 22:13:03.190 o.a.s.s.o.a.z.ZooKeeper [INFO] Initiating client connection, connectString=zkserver1:2181/storm sessionTimeout=20000 watcher=org.apache.storm.shade.org.apache.curator.ConnectionState@6c4fb026
2015-12-04 22:13:03.191 o.a.s.s.o.a.z.ClientCnxn [INFO] Opening socket connection to server ec2-52-34-113-54.us-west-2.compute.amazonaws.com/52.34.113.54:2181. Will not attempt to authenticate using SASL (unknown error)
2015-12-04 22:13:03.193 o.a.s.s.o.a.z.ClientCnxn [INFO] Socket connection established to ec2-52-34-113-54.us-west-2.compute.amazonaws.com/52.34.113.54:2181, initiating session
2015-12-04 22:13:03.195 o.a.s.s.o.a.z.ClientCnxn [INFO] Session establishment complete on server ec2-52-34-113-54.us-west-2.compute.amazonaws.com/52.34.113.54:2181, sessionid = 0x15170091b370006, negotiated timeout = 20000
2015-12-04 22:13:03.195 o.a.s.s.o.a.c.f.s.ConnectionStateManager [INFO] State change: CONNECTED
2015-12-04 22:13:03.233 b.s.d.nimbus [INFO] Starting Nimbus server...
有什么想法吗?
【问题讨论】:
-
Storm UI 从 Nimbus 进程中获取统计信息。检查是否可以从 UI 机器访问 Nimbus 主机。默认情况下,Nimbus 将在端口 6627 上处理统计请求。在 UI 机器上,检查您是否可以执行“telnet nimbus-host 6627”
-
Nimbus 和 Ui 在同一台机器上
-
但是我不能从我自己的机器上 telnet 到 6627? netstat 显示在 6627 上监听..
-
我发现...我的主机文件是全局的,所以 nimbus ip 是我机器的外部 ip。它尝试通过该 ip 连接,即使它在本地主机上,防火墙需要正确配置或主机文件调整
标签: amazon-web-services apache-zookeeper apache-storm