Hi,
We have been using Compass and Grails Searchable Plugin for some time
to
store our product data. Now we are evaluating Elastic Search and treat
it as
an external system for the first phase. I'm using ElasticSearch 0.5.1
release, and trying to connect to a node in the local machine with
TransportClient. When I execute the following code I got "No node
available
exception".
System.setProperty("java.net.preferIPv4Stack", "true");
TransportClient client = new TransportClient();
client.addTransportAddress(new
InetSocketTransportAddress("192.168.1.102",
9300));
ClusterHealthRequest healthRequest = new ClusterHealthRequest();
ClusterHealthResponse response =
client.admin().cluster().health(healthRequest).actionGet();
client.close();
Here is the exception trace:
Exception in thread "main"
org.elasticsearch.client.transport.NoNodeAvailableException: No node
available
at
org.elasticsearch.client.transport.TransportClientNodesService.execute(TransportClientNodesService.java:
129)
at
org.elasticsearch.client.transport.support.InternalTransportClusterAdminClient.health(InternalTransportClusterAdminClient.java:
84)
I got the same exception with other actions except "health". But when
I open
a browser and request the cluster health I got the response properly.
That's great news. First I've tried the embedded server version but I
had some classpath problems with the Compass version that we are
using. (we already have older lucene jars in our classpath). So I
decided to go on with TransportClient for the time being.
See if your api settings differ to what the server is listening on.
/dom
On Apr 8, 12:21 pm, "sezgin.kucukkaraaslan" sezo...@gmail.com wrote:
That's great news. First I've tried the embedded server version but I
had some classpath problems with the Compass version that we are
using. (we already have older lucene jars in our classpath). So I
decided to go on with TransportClient for the time being.
See if your api settings differ to what the server is listening on.
/dom
On Apr 8, 12:21 pm, "sezgin.kucukkaraaslan" sezo...@gmail.com wrote:
That's great news. First I've tried the embedded server version but I
had some classpath problems with the Compass version that we are
using. (we already have older lucene jars in our classpath). So I
decided to go on with TransportClient for the time being.
See if your api settings differ to what the server is listening on.
/dom
On Apr 8, 12:21 pm, "sezgin.kucukkaraaslan" sezo...@gmail.com wrote:
That's great news. First I've tried the embedded server version but I
had some classpath problems with the Compass version that we are
using. (we already have older lucene jars in our classpath). So I
decided to go on with TransportClient for the time being.
If you want the TransportClient to work with you clusterName
"snmpCluster". Create the transport client as follows:
Map<String,String> m = new HashMap<String,String>();
m.put("cluster.name","snmpCluster");
Settings s = ImmutableSettings.settingsBuilder() .put(m).build();
See if your api settings differ to what the server is listening on.
/dom
On Apr 8, 12:21 pm, "sezgin.kucukkaraaslan" sezo...@gmail.com wrote:
That's great news. First I've tried the embedded server version but I
had some classpath problems with the Compass version that we are
using. (we already have older lucene jars in our classpath). So I
decided to go on with TransportClient for the time being.
If you want the TransportClient to work with you clusterName
"snmpCluster". Create the transport client as follows:
Map<String,String> m = new HashMap<String,String>();
m.put("cluster.name","snmpCluster");
Settings s = ImmutableSettings.settingsBuilder() .put(m).build();
See if your api settings differ to what the server is listening on.
/dom
On Apr 8, 12:21 pm, "sezgin.kucukkaraaslan" sezo...@gmail.com
wrote:
That's great news. First I've tried the embedded server version but
I
had some classpath problems with the Compass version that we are
using. (we already have older lucene jars in our classpath). So I
decided to go on with TransportClient for the time being.
If you want the TransportClient to work with you clusterName
"snmpCluster". Create the transport client as follows:
Map<String,String> m = new HashMap<String,String>();
m.put("cluster.name","snmpCluster");
Settings s = ImmutableSettings.settingsBuilder() .put(m).build();
See if your api settings differ to what the server is listening on.
/dom
On Apr 8, 12:21 pm, "sezgin.kucukkaraaslan" sezo...@gmail.com
wrote:
That's great news. First I've tried the embedded server version
but I
had some classpath problems with the Compass version that we are
using. (we already have older lucene jars in our classpath). So I
decided to go on with TransportClient for the time being.
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.