Working with version Spring -elastic 1.4.2 and elastic search 1.7.1
Closed this issue · 5 comments
Vijendra07Kulhade commented
Giving esClient like
<elasticsearch:client id="esClient" esNodes="localhost:9300,localhost:9301" properties="esProperties"/>
and esProperties like
<util:map id="esProperties">
<entry key="cluster.name" value="myCluster"/>
</util:map>
But getting
None of the configured nodes are available: []
Caused by: org.elasticsearch.client.transport.NoNodeAvailableException: None of the configured nodes are available: []
dadoonet commented
If you format your code, that'd be easier to read. I updated your question.
Do you have a node running? What is the cluster name?
Vijendra07Kulhade commented
Thanks for very quick response.
My Node is running in the same machine. cluster name is myCluster.
I have simply injected this esClient into my Spring component. but it is giving above exceptions during startup only.
Vijendra07Kulhade commented
When I am trying to create the client like below I am able to find he running node
Settings settings = ImmutableSettings.settingsBuilder()
.put("cluster.name","myCluster").build();
TransportClient client = new TransportClient(settings);
client.addTransportAddress(new InetSocketTransportAddress("localhost",9300));
dadoonet commented
@Vijendra07Kulhade Did you manage to solve it?
Vijendra07Kulhade commented
Yes It started working for me after I removed all properties. I just gave cluster name in properties.