开发者社区> 问答> 正文

IllegalArgumentExceptionCannot start server in local mode

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);

展开
收起
小学生2333 2016-06-13 00:31:05 4938 0
2 条回答
写回答
取消 提交回答
  • 本地模式 请参考https://github.com/alibaba/jstorm/wiki/%E5%A6%82%E4%BD%95%E6%9C%AC%E5%9C%B0%E8%B0%83%E8%AF%95-JStorm-%E7%A8%8B%E5%BA%8F
    2016-06-13 08:51:35
    赞同 展开评论 打赏
  • ReIllegalArgumentExceptionCannot start server in local mode
    is there exist some default.yaml we can't see explicitly?  because I didn't configure most items that appears in nimbus.log?
    2016-06-13 00:33:39
    赞同 展开评论 打赏
问答分类:
问答地址:
问答排行榜
最热
最新

相关电子书

更多
Glint:An Asynchronous Parameter Server for Spark 立即下载
Using Hadoop to build a Data Quality Service for both real-time and batch data 立即下载
Data as a Service - 数据即服务 立即下载