我也遇到类似的问题,zookeeper可以启动,但是jstorm启动不了,也参考了之前论坛中的解决方法来设置的,但还是报错,具体信息如下:
这是nimbus.log中的异常:
[ERROR 2016-05-31 19:02:56 c.a.j.s.FollowerRunnable:85 main] get nimbus host error!
java.lang.Exception: the hostname which Nimbus get is localhost
at com.alibaba.jstorm.schedule.FollowerRunnable.<init>(FollowerRunnable.java:82) ~[jstorm-core-2.1.1.jar:na]
at com.alibaba.jstorm.daemon.nimbus.NimbusServer.initFollowerThread(NimbusServer.java:275) [jstorm-core-2.1.
at com.alibaba.jstorm.daemon.nimbus.NimbusServer.launchServer(NimbusServer.java:121) [jstorm-core-2.1.1.jar:
at com.alibaba.jstorm.daemon.nimbus.NimbusServer.main(NimbusServer.java:95) [jstorm-core-2.1.1.jar:na]
[ERROR 2016-05-31 19:02:56 c.a.j.d.n.NimbusServer:137 main] Fail to run nimbus
java.lang.RuntimeException: java.lang.Exception: the hostname which Nimbus get is localhost
at com.alibaba.jstorm.schedule.FollowerRunnable.<init>(FollowerRunnable.java:86) ~[jstorm-core-2.1.1.jar:na]
at com.alibaba.jstorm.daemon.nimbus.NimbusServer.initFollowerThread(NimbusServer.java:275) [jstorm-core-2.1.
at com.alibaba.jstorm.daemon.nimbus.NimbusServer.launchServer(NimbusServer.java:121) [jstorm-core-2.1.1.jar:
at com.alibaba.jstorm.daemon.nimbus.NimbusServer.main(NimbusServer.java:95) [jstorm-core-2.1.1.jar:na]
Caused by: java.lang.Exception: the hostname which Nimbus get is localhost
at com.alibaba.jstorm.schedule.FollowerRunnable.<init>(FollowerRunnable.java:82) ~[jstorm-core-2.1.1.jar:na]
... 3 common frames omitted
-------------------------------------------------------------------
我的storm.yaml设置如下,其他几个虚拟机中的storm.yaml文件和这个一样:
########### These MUST be filled in for a storm configuration
storm.zookeeper.servers:
- "192.168.152.128"
- "192.168.152.130"
- "192.168.152.131"
storm.zookeeper.root: "/jstorm"
nimbus.host: "192.168.152.128"
storm.local.dir: "%JSTORM_HOME%/data"
------------------------------------------------------------------
主机名:
hostname:
[xu@CentOS jstorm-2.1.1]$ hostname
CentOS
本机ip:192.168.152.128
------------------------------------------------------------------
/etc/hosts设置如下:
[xu@CentOS jstorm-2.1.1]$ cat /etc/hosts
192.168.152.128 CentOS
127.0.0.1 localhost CentOS localhost4 localhost4.localdomain4
::1 localhost localhost.localdomain localhost6 localhost6.localdomain6
192.168.152.130 worker1
192.168.152.131 worker2
本人新手,被这个困扰许久,望大神不吝赐教。
版权声明:本文内容由阿里云实名注册用户自发贡献,版权归原作者所有,阿里云开发者社区不拥有其著作权,亦不承担相应法律责任。具体规则请查看《阿里云开发者社区用户服务协议》和《阿里云开发者社区知识产权保护指引》。如果您发现本社区中有涉嫌抄袭的内容,填写侵权投诉表单进行举报,一经查实,本社区将立刻删除涉嫌侵权内容。