我試圖讓基於位置的Apache的風暴演示例如:http://www.allprogrammingtutorials.com/tutorials/setting-up-apache-storm-cluster.phpNimbusLeaderNotFoundException在Apache的風暴
到目前爲止,我已經創建了2個虛擬機與Oracle VM VirtualBox和上傳他們兩人的Ubuntu 14.04 64位。只有他們的IP地址不同,兩者的RAM都是2GB。否則就像在這個例子中。
在這個例子中,有這句話我沒有很好地理解:
更新/ etc/hosts文件上都與其他虛擬機的IP地址的虛擬機文件。例如。 VM1上的/ etc/hosts需要具有VM2的IP地址以及主機名(VM2)。在我的情況下,VM1主機文件中的這條附加行類似於192.168.111.132 VM2。
當我使用ifconfig,我得到2 IP地址192.168.0.74和76但是在/ etc/hosts文件上寫着:
127.0.0.1 localhost
127.0.1.1 master-Virtualbox (slave1-VirtualBox in other)
192.168.0.76 slave1-VirtualBox (master-VirtualBox and 74 in other)
可能有一些錯誤在這裏。
無論如何,在這兩個虛擬機上都會上傳apache storm和zookeeper,並且我將兩個zookeepers作爲服務器啓動(因爲在示例鏈接中就是這樣)。然後我在VM1啓動nimbus,在slave1啓動監控程序。但在這兩個UI中,我得到NimbusLeaderNotFoundException。
動物園管理員confs:
tickTime=2000
initLimit=10
syncLimit=5
dataDir=/home/master/Downloads/zookeeper-3.4.8/data (slave1 instead of master in the other)
dataLogDir=/home/.../zookeeper-3.4.8/logs
clientPort=2181
server.1=192.168.0.74:2888:3888
server.2=192.168.0.76:2888:3888
Storm.yaml:
storm.zookeeper.servers:
- "192.168.0.74"
- "192.168.0.76"
nimbus.host: "192.168.0.74"
storm.local.dir: "/home/.../apache-storm-1.0.1/data"
# only in slave
supervisor.slots.ports:
- 6700
- 6701
- 6702
- 6703
這裏有什麼問題,我該怎麼解決呢?謝謝。