None of the configured nodes are available - elastic 2.3.4

(Moshe Sucaz) #1

Hi, I created a new 2.3.4 elastic cluster with 3 nodes, each on different machine.
All 3 see each other when I boot the elastic. But when trying to execute actionGet (from other machine that running web application with playframework 1.4.3) , I get:

play.exceptions.JavaExecutionException: None of the configured nodes are available: [{#transport#-1}{}{}]
at helpers.ExceptionalJob$
at java.util.concurrent.ScheduledThreadPoolExecutor$ScheduledFutureTask.access$201(
at java.util.concurrent.ScheduledThreadPoolExecutor$
at java.util.concurrent.ThreadPoolExecutor.runWorker(
at java.util.concurrent.ThreadPoolExecutor$

I set the client in this way:

client = TransportClient.builder().build()
.addTransportAddress(new InetSocketTransportAddress(InetAddress.getByName(host), port));

my elasticsearch.yml is: node_${HOSTNAME}
node.tag: gen1

transport.tcp.port: 9300
http.port: 9200

bootstrap.mlockall: true ["host1", "host2"] false

discovery.zen.minimum_master_nodes: 2
gateway.recover_after_nodes: 1
gateway.recover_after_time: 1m
gateway.expected_nodes: 2

netstat -nltp command on all nodes machines give me:

tcp6 0 0 :::9200 :::* LISTEN 4753/java
tcp6 0 0 :::9300 :::* LISTEN 4753/java

running curl command from the playframework machine does work:

curl -XGET -d '{ "query": {"match": {"topic.english": "hello"}}}'
"count" : 94,
"_shards" : {
"total" : 107,
"successful" : 107,
"failed" : 0

I tried to replace 9300 with 9200, but it is also not working...

Any idea?

(Ada) #2

feel like it is not forming cluster. what's your cluster health status? :9200/_cluster/health is green?

Did you set the clustername when you build the client? something like this:

Settings settings = Settings.settingsBuilder().put("", clusterName).build();
TransportClient transportClient = TransportClient.builder().settings(settings).build();
for (String server : servers) {
transportClient = transportClient.addTransportAddress(new InetSocketTransportAddress(InetAddress.getByName(server), 9300));

(Moshe Sucaz) #3

Thanks Ada
Yes, that's exactly what I did and status is green.
Still not working...

(Moshe Sucaz) #4

Ada, when looking at it again I had a mistake where in the for loop I recreated TransportClient transportClient without the settings (which had the in it). After copying your code problem solved! Thank you very much!!!

(system) #5