I am using elastic search server to search full text. Here i am able to
perform text search from my local using default elasticsearch.yml
configurations and no cluster names and no nodes defined here using below
code.
client = new TransportClient().addTransportAddress(new
InetSocketTransportAddress("127.0.0.1", 9300));
I have hosted elastic server on other machine in same network and trying to
access it using that machine IP
client = new TransportClient().addTransportAddress(new
InetSocketTransportAddress("remoteHost", 9300));
I am not able to connect, i am getting following error.
org.elasticsearch.client.transport.NoNodeAvailableException: None of the
configured nodes are available: []
at
org.elasticsearch.client.transport.TransportClientNodesService.ensureNodesAreAvailable(TransportClientNodesService.java:278)
at
org.elasticsearch.client.transport.TransportClientNodesService.execute(TransportClientNodesService.java:197)
at
org.elasticsearch.client.transport.support.InternalTransportClient.execute(InternalTransportClient.java:106)
at
org.elasticsearch.client.transport.support.InternalTransportClient.execute(InternalTransportClient.java:97)
Please help me, i am not sure where i am doing wrong.
try localhost instead of 127.0.0.1. if it works, I doubt on configuration.
On Wednesday, March 25, 2015 4:22 AM, Vijayakumari B N [via ElasticSearch Users] <ml-node+s115913n4072558h26@n3.nabble.com> wrote:
Hi,
I am using elastic search server to search full text. Here i am able to perform text search from my local using default elasticsearch.yml configurations and no cluster names and no nodes defined here using below code.
client = new TransportClient().addTransportAddress(new InetSocketTransportAddress("127.0.0.1", 9300));
I have hosted elastic server on other machine in same network and trying to access it using that machine IP
client = new TransportClient().addTransportAddress(new InetSocketTransportAddress("remoteHost", 9300));
I am not able to connect, i am getting following error.
org.elasticsearch.client.transport.NoNodeAvailableException: None of the configured nodes are available: [] at org.elasticsearch.client.transport.TransportClientNodesService.ensureNodesAreAvailable(TransportClientNodesService.java:278) at org.elasticsearch.client.transport.TransportClientNodesService.execute(TransportClientNodesService.java:197) at org.elasticsearch.client.transport.support.InternalTransportClient.execute(InternalTransportClient.java:106) at org.elasticsearch.client.transport.support.InternalTransportClient.execute(InternalTransportClient.java:97)
Please help me, i am not sure where i am doing wrong.
Thanks,Vijaya
To connect to cluster one node also we have to define clustername .jsut
define cluster name .The following code worked for me
Settings settings
=ImmutableSettings.settingsBuilder().put("cluster.name",clustername).build();
TransportClient transportClient = new TransportClient(settings);
transportClient = transportClient.addTransportAddress(new
InetSocketTransportAddress("hostname",9300));
hope it helps!!!!!
On Wednesday, March 25, 2015 at 2:52:03 PM UTC+5:30, Vijayakumari B N wrote:
Hi,
I am using Elasticsearch server to search full text. Here i am able to
perform text search from my local using default elasticsearch.yml
configurations and no cluster names and no nodes defined here using below
code.
client = new TransportClient().addTransportAddress(new
InetSocketTransportAddress("127.0.0.1", 9300));
I have hosted elastic server on other machine in same network and trying
to access it using that machine IP
client = new TransportClient().addTransportAddress(new
InetSocketTransportAddress("remoteHost", 9300));
I am not able to connect, i am getting following error.
org.elasticsearch.client.transport.NoNodeAvailableException: None of the
configured nodes are available:
at
org.elasticsearch.client.transport.TransportClientNodesService.ensureNodesAreAvailable(TransportClientNodesService.java:278)
at
org.elasticsearch.client.transport.TransportClientNodesService.execute(TransportClientNodesService.java:197)
at
org.elasticsearch.client.transport.support.InternalTransportClient.execute(InternalTransportClient.java:106)
at
org.elasticsearch.client.transport.support.InternalTransportClient.execute(InternalTransportClient.java:97)
Please help me, i am not sure where i am doing wrong.
Apache, Apache Lucene, Apache Hadoop, Hadoop, HDFS and the yellow elephant
logo are trademarks of the
Apache Software Foundation
in the United States and/or other countries.