Connection refused error in Storm

扶醉桌前 提交于 2019-12-03 17:09:51

I have just encountered with this problem, too. My problem is the running time is set too short.The zookeeper do not have enough time to shut down properly.Look at the code below:

    builder.createTopology());

    try {
        Thread.sleep(20000);
    } catch (InterruptedException e) {
        // TODO Auto-generated catch block
        e.printStackTrace();
    }
    cluster.shutdown();
}

You should set enough time before the cluster.shutdown() was called. At first, I set Thread.sleep(1000), then the same problem occurred as yours. After I changed the time, this problem never showed up again.

标签
易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!