【发布时间】:2015-07-12 19:39:03
【问题描述】:
我正在关注 http://jayatiatblogs.blogspot.com/2011/11/storm-installation.html 。 我尝试在 Amazon Web Services 中配置 Apache Storm 远程集群,但在我的 Storm UI 中遇到以下错误:
org.apache.thrift7.transport.TTransportException: java.net.ConnectException: Connection refused
at org.apache.thrift7.transport.TSocket.open(TSocket.java:183)
at org.apache.thrift7.transport.TFramedTransport.open(TFramedTransport.java:81)
at backtype.storm.thrift$nimbus_client_and_conn.invoke(thrift.clj:75)
at backtype.storm.ui.core$cluster_configuration.invoke(core.clj:472)
at backtype.storm.ui.core$fn__8260.invoke(core.clj:844)
这是我在 10.0.0.230 的主节点的storm.yaml 文件:
########### These MUST be filled in for a storm configuration
storm.zookeeper.servers:
- "10.0.0.230"
# - "localhost"
#
storm.zookeeper.port: 2181
nimbus.host: "127.0.0.1"
nimbus.thrift.port: 6627
# nimbus.task.launch.secs: 240
# supervisor.worker.start.timeout.secs: 240
# supervisor.worker.timeout.secs: 240
ui.port: 8772
storm.local.dir: "/home/ubuntu/storm/data"
java.library.path: "/usr/lib/jvm/java-7-oracle"
# supervisor.slots.ports:
# - 6700
# - 6701
# - 6702
# - 6703
# - 6704
# worker.childopts: "-Xmx768m"
# nimbus.childopts: "-Xmx512m"
# supervisor.childopts: "-Xmx256m"
下面是我在 10.0.0.79 的从节点的storm.yaml 文件:
########### These MUST be filled in for a storm configuration
storm.zookeeper.server:
- "10.0.0.230"
# - "localhost"
storm.zookeeper.port: 2181
# nimbus.host: "localhost"
nimbus.host: "10.0.0.230"
nimbus.thrift.port: 6627
#
#ui.port: 8772
#
storm.local.dir: "/home/ubuntu/storm/data"
java.library.path: "/usr/lib/jvm/java-7-oracle"
supervisor.slots.ports:
- 6700
- 6701
- 6702
- 6703
# - 6704
#
# worker.childopts: "-Xmx768m"
# nimbus.childopts: "-Xmx512m"
# supervisor.childopts: "-Xmx256m"
下面是我的主节点 zoo.cfg 文件:
tickTime=2000
initLimit=10
syncLimit=5
dataDir=/home/ubuntu/zookeeper-data
dataLogDir=/home/ubuntu/zookeeper/log/data_log
clientPort=2181
server.1=10.0.0.230:2888:3888
autopurge.snapRetainCount=3
autopurge.purgeInterval=24
我在主节点中使用了 zkServer.sh start、storm nimbus 和storm ui;从节点中的风暴主管。主节点的myid为1,从节点的myid为2。
错误的原因是什么?如何解决?
【问题讨论】:
-
问题已解决。该错误是由于 zoo.cfg 文件中的 dataLogDir=/home/ubuntu/zookeeper/log/data_log 造成的。评论该行将解决问题。
标签: apache-storm apache-zookeeper