================================================分割线=================================================
conf配置:
storm.zookeeper.servers: - "192.168.10.92"
storm.zookeeper.root: "/jstorm"
nimbus.host: "192.168.10.92" storm.local.dir: "%JSTORM_HOME%/data"
jstorm.log.dir: "/data/jstorm/logs"
java.library.path: "/usr/local/lib:/opt/local/lib:/usr/lib"
supervisor.slots.ports:
- 6800
- 6801
- 6802
- 6803
================================================================
supervisor.log 内容:
[ERROR 2016-04-27 14:00:54 c.a.j.d.s.Heartbeat:115 main] get supervisor host error!
java.lang.Exception: the hostname which supervisor get is localhost
at com.alibaba.jstorm.daemon.supervisor.Heartbeat.initSupervisorInfo(Heartbeat.java:111) [jstorm-core-2.1.1.jar:na]
at com.alibaba.jstorm.daemon.supervisor.Heartbeat.<init>(Heartbeat.java:97) [jstorm-core-2.1.1.jar:na]
at com.alibaba.jstorm.daemon.supervisor.Supervisor.mkSupervisor(Supervisor.java:123) [jstorm-core-2.1.1.jar:na]
at com.alibaba.jstorm.daemon.supervisor.Supervisor.run(Supervisor.java:201) [jstorm-core-2.1.1.jar:na]
at com.alibaba.jstorm.daemon.supervisor.Supervisor.main(Supervisor.java:237) [jstorm-core-2.1.1.jar:na]
[ERROR 2016-04-27 14:00:54 c.a.j.d.s.Supervisor:218 main] Fail to run supervisor
java.lang.RuntimeException: java.lang.Exception: the hostname which supervisor get is localhost
at com.alibaba.jstorm.daemon.supervisor.Heartbeat.initSupervisorInfo(Heartbeat.java:116) ~[jstorm-core-2.1.1.jar:na]
at com.alibaba.jstorm.daemon.supervisor.Heartbeat.<init>(Heartbeat.java:97) ~[jstorm-core-2.1.1.jar:na]
at com.alibaba.jstorm.daemon.supervisor.Supervisor.mkSupervisor(Supervisor.java:123) [jstorm-core-2.1.1.jar:na]
at com.alibaba.jstorm.daemon.supervisor.Supervisor.run(Supervisor.java:201) [jstorm-core-2.1.1.jar:na]
at com.alibaba.jstorm.daemon.supervisor.Supervisor.main(Supervisor.java:237) [jstorm-core-2.1.1.jar:na]
Caused by: java.lang.Exception: the hostname which supervisor get is localhost
at com.alibaba.jstorm.daemon.supervisor.Heartbeat.initSupervisorInfo(Heartbeat.java:111) ~[jstorm-core-2.1.1.jar:na]
... 4 common frames omitted
-------------------------
-------------------------
···
public static String getHostName(Map conf) {
String hostName = ConfigExtension.getSupervisorHost(conf);
if (hostName == null) {
hostName = NetWorkUtils.hostname();
}
if (ConfigExtension.isSupervisorUseIp(conf)) {
hostName = NetWorkUtils.ip();
}
return hostName;
}
···
不是必须的,如果你没有配置,就会通过NetWorkUtils.hostname获取,你机器需要配置host,否则还是拿不到,当然你如果在storm.yaml配置了supervisor.hostname 也是ok的
版权声明:本文内容由阿里云实名注册用户自发贡献,版权归原作者所有,阿里云开发者社区不拥有其著作权,亦不承担相应法律责任。具体规则请查看《阿里云开发者社区用户服务协议》和《阿里云开发者社区知识产权保护指引》。如果您发现本社区中有涉嫌抄袭的内容,填写侵权投诉表单进行举报,一经查实,本社区将立刻删除涉嫌侵权内容。