Sorry for writing English because of the input method bug
storm.yaml
storm.zookeeper.servers:
- "localhost"
storm.zookeeper.root: "/jstorm"
nimbus.host: "192.168.1.200"
######because I can't run it properly,
exceptions occur: "the hostname which Nimbus get is localhost", I modify the /etc/hosts already, but it didn't work.
# when I check the
nimbus.log, I found "nimbus.host=192.168.1.200,
storm.cluster.mode=distributed" where does this come from
? does there exist the default.yaml
# so I added this line in storm.yaml, it throw the exception in the titlte "IllegalArgumentException:
Cannot start server in local mode!"
storm.cluster.mode: "local"
log:
[ERROR 2016-06-12 23:55:33 c.a.j.d.n.NimbusServer:137 main] Fail to run nimbus
java.lang.IllegalArgumentException: Cannot start server in local mode!
at com.alibaba.jstorm.cluster.StormConfig.validate_distributed_mode(StormConfig.java:128) ~[jstorm-core-2.1.1.jar:na]
at com.alibaba.jstorm.daemon.nimbus.NimbusServer.launchServer(NimbusServer.java:111) [jstorm-core-2.1.1.jar:na]
at com.alibaba.jstorm.daemon.nimbus.NimbusServer.main(NimbusServer.java:95) [jstorm-core-2.1.1.jar:na]
/etc/hosts:
192.168.1.200 localhost.localdomain
127.0.0.1 localhost localhost.localdomain localhost4 localhost4.localdomain4
::1 localhost localhost.localdomain localhost6 localhost6.localdomain6
I read the source code of
com.alibaba.jstorm.daemon.nimbus;
private void launchServer(final Map conf, INimbus inimbus) {
LOG.info("Begin to start nimbus with conf " + conf);
try {
// 1. check whether mode is distributed or not
StormConfig.
validate_distributed_mode(conf); //
does this mean only distributed mode allowed? how can i use local mode
?
//only this method is invoked in main() , no launchLocalServer,
why?
instance.launchServer(config, iNimbus);
版权声明:本文内容由阿里云实名注册用户自发贡献,版权归原作者所有,阿里云开发者社区不拥有其著作权,亦不承担相应法律责任。具体规则请查看《阿里云开发者社区用户服务协议》和《阿里云开发者社区知识产权保护指引》。如果您发现本社区中有涉嫌抄袭的内容,填写侵权投诉表单进行举报,一经查实,本社区将立刻删除涉嫌侵权内容。