开发者社区> 问答> 正文

本地提交遇到Failed to get topology from ZK

[RefreshActive] ERROR com.alibaba.jstorm.daemon.worker.RefreshActive - Failed to get topology from ZK
java.lang.NullPointerException: null
    at com.alibaba.jstorm.daemon.worker.RefreshActive.run(RefreshActive.java:97) ~[jstorm-core-2.1.1.jar:na]
    at com.alibaba.jstorm.callback.AsyncLoopRunnable.run(AsyncLoopRunnable.java:95) [jstorm-core-2.1.1.jar:na]
    at java.lang.Thread.run(Thread.java:745) [na:1.8.0_73]


请问是什么原因?

展开
收起
白啊白啊白 2016-05-25 13:40:08 8223 0
4 条回答
写回答
取消 提交回答
  • Re本地提交遇到Failed to get topology from ZK
    程序有错误。
    2016-06-03 09:49:08
    赞同 展开评论 打赏
  • 你去zk上看看,有没有这个topology。 你可以试一下这个工具 jstorm zktool

    -------------------------

    你这是本地模式

    -------------------------

    你既然要在集群跑,就跑分布式模式

    2016-05-25 13:54:39
    赞同 展开评论 打赏
  • 回 1楼宁晶的帖子
    我是在本地搭建了JStorm环境,进行实验时发现了这个Error,不知道怎么解决...

    -------------------------

    回 3楼玄弟的帖子
    [zk: localhost:2181(CONNECTED) 0] ls /jstorm/topology
    []
    [zk: localhost:2181(CONNECTED) 1] get /jstorm/topology

    cZxid = 0x35
    ctime = Tue May 24 17:56:15 CST 2016
    mZxid = 0x35
    mtime = Tue May 24 17:56:15 CST 2016
    pZxid = 0x1181
    cversion = 4
    dataVersion = 0
    aclVersion = 0
    ephemeralOwner = 0x0
    dataLength = 1
    numChildren = 0

    storm list
    Successfully get cluster info
    {
      "nimbus": {
        "nimbusMaster": {
          "host": "172.28.134.248:8627",
          "uptimeSecs": "344"
        },
        "nimbusSlaves": [],
        "supervisorNum": 1,
        "totalPortNum": 4,
        "usedPortNum": 0,
        "freePortNum": 4,
        "version": "2.1.1",
        "__isset_bitfield": 15
      },
      "supervisors": [
        {
          "host": "172.28.134.248",
          "supervisorId": "c1ff5e34-7752-4db6-9828-fee919e7e655",
          "uptimeSecs": 300,
          "numWorkers": 4,
          "numUsedWorkers": 0,
          "__isset_bitfield": 7
        }
      ],
      "topologies": []
    }

    貌似上面什么都没有...

    以下是我的Topology程序:

    public class MyTopology {

        public static void main(String[] args) {
            TopologyBuilder builder = new TopologyBuilder();
            
            builder.setSpout("spout", new SequenceSpout(), 1);
            
            builder.setBolt("split", new Split(), 1).shuffleGrouping("spout");
            builder.setBolt("counter", new Counter(), 2).fieldsGrouping("split", new Fields("word"));
            
            Config conf = new Config();

                    conf.setDebug(true);

                    conf.setNumWorkers(3);
            
            LocalCluster cluster = new LocalCluster();
            cluster.submitTopology("MyWordCounter", conf, builder.createTopology());
        }

    }
    2016-05-25 13:52:14
    赞同 展开评论 打赏
  • 回 楼主(白啊白啊白) 的帖子
    你好,中间件比赛刚开放了报名,还没开始比赛,等到比赛开始后,才可以提交结果
    2016-05-25 13:47:24
    赞同 展开评论 打赏
问答地址:
问答排行榜
最热
最新

相关电子书

更多
MongoShake -- Multi Active-Active and Cross-Region Disaster Recoverable MongoDB Service 立即下载
Spark Cluster with Elasticsear 立即下载
Bnng Consensus to Data Replica 立即下载