Apache storm 如何将Apache Storm supervisors注册到Apache Zookeeper

Apache storm 如何将Apache Storm supervisors注册到Apache Zookeeper,apache-storm,apache-zookeeper,Apache Storm,Apache Zookeeper,我正在跟踪&在awsec2的ubuntu14.04lts中设置apachestorm集群 我的主节点是10.0.0.185。我的从属节点在zookeeper数据中分别为10.0.0.83、10.0.0.124和10.0.0.84,myid为1、2和3。我建立了一个由所有3个从节点组成的ApacheZooKeeper集合 下面是我的主节点和从节点的my zoo.cfg: tickTime=2000 initLimit=10 syncLimit=5 dataDir=/home/ubuntu/zoo

我正在跟踪&在awsec2的ubuntu14.04lts中设置apachestorm集群

我的主节点是10.0.0.185。我的从属节点在zookeeper数据中分别为10.0.0.83、10.0.0.124和10.0.0.84,myid为1、2和3。我建立了一个由所有3个从节点组成的ApacheZooKeeper集合

下面是我的主节点和从节点的my zoo.cfg:

tickTime=2000
initLimit=10
syncLimit=5

dataDir=/home/ubuntu/zookeeper-data
clientPort=2181

server.1=10.0.0.83:2888:3888
server.2=10.0.0.124:2888:3888
server.3=10.0.0.84:2888:3888

autopurge.snapRetainCount=3
autopurge.purgeInterval=1
########### These MUST be filled in for a storm configuration
 storm.zookeeper.server:
     - "10.0.0.83"
     - "10.0.0.124"
     - "10.0.0.84"
#     - "localhost"
 storm.zookeeper.port: 2181

# nimbus.host: "localhost"
 nimbus.host: "10.0.0.185"

 storm.local.dir: "/home/ubuntu/storm/data"
 java.library.path: "/usr/lib/jvm/java-7-oracle"

 supervisor.slots.ports:
     - 6700
     - 6701
     - 6702
     - 6703

# worker.childopts: "-Xmx768m"
# nimbus.childopts: "-Xmx512m"
# supervisor.childopts: "-Xmx256m"
127.0.0.1 localhost
10.0.0.185 ip-10-0-0-185.ap-southeast-1.compute.internal stormNimbus
10.0.0.124 ip-10-0-0-124.ap-southeast-1.compute.internal slaveRain
10.0.0.83 ip-10-0-0-83.ap-southeast-1.compute.internal slaveCloud
10.0.0.84 ip-10-0-0-84.ap-southeast-1.compute.internal slaveLightning
下面是从节点的my storm.yaml:

tickTime=2000
initLimit=10
syncLimit=5

dataDir=/home/ubuntu/zookeeper-data
clientPort=2181

server.1=10.0.0.83:2888:3888
server.2=10.0.0.124:2888:3888
server.3=10.0.0.84:2888:3888

autopurge.snapRetainCount=3
autopurge.purgeInterval=1
########### These MUST be filled in for a storm configuration
 storm.zookeeper.server:
     - "10.0.0.83"
     - "10.0.0.124"
     - "10.0.0.84"
#     - "localhost"
 storm.zookeeper.port: 2181

# nimbus.host: "localhost"
 nimbus.host: "10.0.0.185"

 storm.local.dir: "/home/ubuntu/storm/data"
 java.library.path: "/usr/lib/jvm/java-7-oracle"

 supervisor.slots.ports:
     - 6700
     - 6701
     - 6702
     - 6703

# worker.childopts: "-Xmx768m"
# nimbus.childopts: "-Xmx512m"
# supervisor.childopts: "-Xmx256m"
127.0.0.1 localhost
10.0.0.185 ip-10-0-0-185.ap-southeast-1.compute.internal stormNimbus
10.0.0.124 ip-10-0-0-124.ap-southeast-1.compute.internal slaveRain
10.0.0.83 ip-10-0-0-83.ap-southeast-1.compute.internal slaveCloud
10.0.0.84 ip-10-0-0-84.ap-southeast-1.compute.internal slaveLightning
主节点中的storm.yaml文件与从节点类似,只是supervisor.slots.ports用#注释

以下是主节点和从节点中的/etc/hosts文件:

tickTime=2000
initLimit=10
syncLimit=5

dataDir=/home/ubuntu/zookeeper-data
clientPort=2181

server.1=10.0.0.83:2888:3888
server.2=10.0.0.124:2888:3888
server.3=10.0.0.84:2888:3888

autopurge.snapRetainCount=3
autopurge.purgeInterval=1
########### These MUST be filled in for a storm configuration
 storm.zookeeper.server:
     - "10.0.0.83"
     - "10.0.0.124"
     - "10.0.0.84"
#     - "localhost"
 storm.zookeeper.port: 2181

# nimbus.host: "localhost"
 nimbus.host: "10.0.0.185"

 storm.local.dir: "/home/ubuntu/storm/data"
 java.library.path: "/usr/lib/jvm/java-7-oracle"

 supervisor.slots.ports:
     - 6700
     - 6701
     - 6702
     - 6703

# worker.childopts: "-Xmx768m"
# nimbus.childopts: "-Xmx512m"
# supervisor.childopts: "-Xmx256m"
127.0.0.1 localhost
10.0.0.185 ip-10-0-0-185.ap-southeast-1.compute.internal stormNimbus
10.0.0.124 ip-10-0-0-124.ap-southeast-1.compute.internal slaveRain
10.0.0.83 ip-10-0-0-83.ap-southeast-1.compute.internal slaveCloud
10.0.0.84 ip-10-0-0-84.ap-southeast-1.compute.internal slaveLightning
当我在从属节点10.0.0.124上发出命令回显状态| nc 10.0.124 2181时:

Zookeeper version: 3.4.6-1569965, built on 02/20/2014 09:09 GMT
Clients:
 /10.0.0.124:53790[0](queued=0,recved=1,sent=0)
我在所有3个从节点中启动zookeeper&supervisor。另外两个从属节点没有注册到zookeeper,尽管我在集群模式下设置了zookeeper

当我在storm UI的拓扑摘要中发布storm rebalance时,不允许添加新的从节点并与旧的从节点并发运行,而是使用新的从节点替换旧的从节点来运行拓扑

每次只有一个从属节点运行拓扑


可能的问题是什么?我应该如何解决?

只是一个小问题,Storm和Zookeeper不使用主/从术语。所以我有点不确定你用这个术语是什么意思。你说的主/从节点是指nimbus/supervisor吗?我对AWS没有经验。但是,如果不是所有的主管都注册,那么这个问题不应该与ZK的集群设置有关。此外,主管日志显示了什么?如果主管无法连接,则应显示错误消息。是的,我指的是nimbus&supervisor,而我指的是master&slaves。请先解决问题。请参阅评论