【转】ElasticSearch报错None of the configured nodes are available

org.elasticsearch.client.transport.NoNodeAvailableException: None of the configured nodes are available: []

经查,最后的问题在于前面初始化settings时给cluster设置了个新的名字,如:Settings settings = ImmutableSettings.settingsBuilder().put("cluster.name", "elasticsearch").build();

因为如果设置elasticsearch后,容器会在添加transportaddress时,从集群名为elasticsearch里查找是否有要设置的这个IP和端口,此时肯定找不到,所以会报这个错。​

将这个重命名给去掉即可。

本文转载自:http://blog.sina.com.cn/s/blog_81410c790102vldw.html

posted @ 2017-05-02 18:36  GoQC  阅读(152)  评论(0)    收藏  举报