Getting exception: No node available?


(Sam-4) #1

Hi

I am getting following error:

org.elasticsearch.client.transport.NoNodeAvailableException: No node
available
at
org.elasticsearch.client.transport.TransportClientNodesService.execute(TransportClientNodesService.java:
139)
at
org.elasticsearch.client.transport.support.InternalTransportClient.search(InternalTransportClient.java:
238)
at
org.elasticsearch.client.transport.TransportClient.search(TransportClient.java:
300)
at
org.elasticsearch.client.action.search.SearchRequestBuilder.doExecute(SearchRequestBuilder.java:
583)
at
org.elasticsearch.client.action.support.BaseRequestBuilder.execute(BaseRequestBuilder.java:
56)

please help me solve above exception and how to check node is
available in network.

Thanks


(jason-3) #2

I've seen that same exception when the cluster name in my client is not the
same as the cluster name of the cluster.

So your code:

Settings s = ImmutableSettings.settingsBuilder().
put(Collections.singletonMap("cluster.name",
"myclustername")).build();
Client client = new TransportClient(s).addTransportAddress(new
InetSocketTransportAddress(host, port));

Needs to match your elasticsearch.yml:

cluster.name: myclustername

--Jason

On Tue, Oct 11, 2011 at 2:20 AM, sam mishra.sameek@gmail.com wrote:

Hi

I am getting following error:

org.elasticsearch.client.transport.NoNodeAvailableException: No node
available
at

org.elasticsearch.client.transport.TransportClientNodesService.execute(TransportClientNodesService.java:
139)
at

org.elasticsearch.client.transport.support.InternalTransportClient.search(InternalTransportClient.java:
238)
at

org.elasticsearch.client.transport.TransportClient.search(TransportClient.java:
300)
at

org.elasticsearch.client.action.search.SearchRequestBuilder.doExecute(SearchRequestBuilder.java:
583)
at

org.elasticsearch.client.action.support.BaseRequestBuilder.execute(BaseRequestBuilder.java:
56)

please help me solve above exception and how to check node is
available in network.

Thanks


(system) #3