問題1. 在storm.yaml 中配置了4個slot,而在Storm UI上面看到了8個slot
解決:Storm.yaml 中配置錯誤,正確配置如下,- 和 6700 之間是有空格存在的,而在我們的集群中配置為-6700,導致錯誤的產生
supervisor.slots.ports:
- 6700
- 6701
- 6702
- 6703
問題2. Storm ui 上看到的supervisor、worker的host 都為主機名,在訪問日志時URL為:http://host:8000/log?file=worker-6703.log
這樣只有在本地hosts文件中配置host 和 ip的映射關系,才能正常訪問
解決: 可在storm.yaml 中添加storm.local.hostname: "192.168.103.102"來明確指定supervisor、worker使用此ip地址
問題3. 啟動Storm local cluster時出現異常CuratorConnectionLossException,日志如下:
on established to localhost/127.0.0.1:2000, initiating session
19469 [main] ERROR org.apache.storm.curator.ConnectionState - Connection timed out for connection st
ring (localhost:2000) and timeout (15000) / elapsed (15203)
org.apache.storm.curator.CuratorConnectionLossException: KeeperErrorCode = ConnectionLoss
at org.apache.storm.curator.ConnectionState.checkTimeouts(ConnectionState.java:198) [storm-c
ore-0.9.3.jar:0.9.3]
at org.apache.storm.curator.ConnectionState.getZooKeeper(ConnectionState.java:88) [storm-cor
e-0.9.3.jar:0.9.3]
at org.apache.storm.curator.CuratorZookeeperClient.getZooKeeper(CuratorZookeeperClient.java:
115) [storm-core-0.9.3.jar:0.9.3
解決:在localcluster模式下,storm會把127.0.0.1:2000作為zookeeper的地址,此端口被占用,導致與zookeeper建立鏈接失敗