上传下载好的版本到服务器文件夹/usr/local/software/下
解压 tar -zxvf apache-storm-2.1.0.tar.gz -C /usr/local/ 位置可以自己选择
然后设置环境变量 vim /etc/profile
设置export STORM_HOME=/usr/local/apache-storm-2.1.0
然后 在path 中加入 $STORM_HOME/bin:
然后 source /etc/profile 立即生效
然后配置 apache-storm-2.1.0下的conf下的配置文件
zk服务器配置
storm.zookeeper.servers:
- "192.168.1.6" #建议域名
- "192.168.1.8"#建议域名
- "192.168.1.9"#建议域名
nimbus.seeds: ["192.168.1.6"] #主节点#建议域名
配置的时候 storm.zookeeper.servers:开始有一个空格, - "192.168.1.9" - 短线和“ip”之间有一个空格,尽量不要改动,以免造成程序不能正常运行
任务存放目录
设置storm.local.dir(The Nimbus and Supervisor daemons require a directory on the local disk to store small amounts of state (like jars, confs, and things like that). You should create that directory on each machine, give it proper permissions, and then fill in the directory location using this config.)
—————————-------------———————
storm.local.dir: "usr/local/apache-storm-2.1.0/data"
端口配置
ui.port:18080
配置从节点work启动的进程的端口,指定工作从节点端口
supervisor.slots.ports:
- 6700
- 6701
- 6702
- 6703
需要在主节点上建立data文件夹
在 apache-storm-2.1.0目录下 执行 mkdir -p data
storm nimbus & 后台启动主节点 storm supervisor & 从节点启动
storm ui & 后台启动ui管控台(在主节点上启动)
查看tail -f -n 100 nimbus.log 在storm下会自动生成一个log日志
main [INFO] Starting nimbus server for storm version '2.1.0'
————————————————————————————————————————
Storm启动显示有2个nimbus
一、故障现象
1.Nimbus启动之后,在WebUI中进行查看,发现有两个Nimbus,但是两个均是一台机器,一个为IP地址,一个为域名
二、原因分析
在storm配置文件中,Nimbus地址配置的是IP而非域名,Nimbus会从/etc/hosts中寻找localhost,导致出现2个nimbus
三、解决方案:
3.1 将NImbus节点、supervisor节点上的storm.yaml配置文件进行修改,将其中Nimbus的地址都改为域名不用IP地址(奇葩)
3.2 配置Nimbus节点上的etc/hosts的本地域名解析
3.3 在supervisor节点上执行相同操作
3.4 建议将zk的地址也改为域名,storm这个东西真是奇葩,各种小问题
————————————————
版权声明:本文为CSDN博主「Alex_Sheng_Sea」的原创文章,遵循CC 4.0 BY-SA版权协议,转载请附上原文出处链接及本声明。
原文链接:https://blog.csdn.net/Alex_Sheng_Sea/article/details/84638366
-------------------------------------------------------------------------------
发现出现了两个nimbus 一个是ip 一个是localhost,按照上边的修改完毕后,发现一个
为域名,一个为localhost。
修改了 /etc/hosts
原
192.168.1.6 sino6
127.0.0.1 localhost, sion6 等系统映射
修改为
192.168.1.6 sino6
127.0.0.1 localhost 等系统映射
发现问题解决
网友评论