springboot整合elasticsearch時報錯NoNodeAvailableException[None of the configured nodes are available: [{#
我在整合elasticsearch在idea的控制檯裡出現如下報錯,但是我的配置是沒有問題的
NoNodeAvailableException[None of the configured nodes are available: [{#transport#-1}{c86bxOiITCqF-lqJc2C-XQ}{localhost}{127.0.0.1:9300}] ] at org.elasticsearch.client.transport.TransportClientNodesService.ensureNodesAreAvailable(TransportClientNodesService.java:347) at org.elasticsearch.client.transport.TransportClientNodesService.execute(TransportClientNodesService.java:245) at org.elasticsearch.client.transport.TransportProxyClient.execute(TransportProxyClient.java:59) at org.elasticsearch.client.transport.TransportClient.doExecute(TransportClient.java:366) at org.elasticsearch.client.support.AbstractClient.execute(AbstractClient.java:408) at org.elasticsearch.action.ActionRequestBuilder.execute(ActionRequestBuilder.java:80) at org.elasticsearch.action.ActionRequestBuilder.execute(ActionRequestBuilder.java:54)
然後我在elasticsearch的控制檯,看見如下錯誤
原來是我的elasticsearch是2.4.4版本太低了,我就換成5.2.0版本,問題解決