ES使用org.elasticsearch.client.transport.NoNodeAvailableException: No node available


 1) 端口錯

client = new TransportClient().addTransportAddress(new InetSocketTransportAddress(ipAddress, 9300));

這里9300 寫成9200的話會No node available

要是你連的不是本機,注意IP有沒有正確

2 )jar報引用版本不匹配,開啟的服務是什么版本,引用的jar最好匹配(這個我沒有去試,反正我的是匹配的)

3) 要是你改了集群名字,還有設置集群名字

Settings settings = ImmutableSettings.settingsBuilder().put("cluster.name", "xxx").build(); 
client = new TransportClient(settings).addTransportAddress(new InetSocketTransportAddress(ipAddress, 9300));


免責聲明!

本站轉載的文章為個人學習借鑒使用,本站對版權不負任何法律責任。如果侵犯了您的隱私權益,請聯系本站郵箱yoyou2525@163.com刪除。



 
粵ICP備18138465號   © 2018-2025 CODEPRJ.COM