Java ElasticSearch None of the configured nodes are available
You should check the node's port, you could do it using head. These ports are not same. Example,
The web URL you can open is
but the node's port is
9300, so none of the configured nodes are available if you use the
9200 as the port.
- wrong port, if you use a Java or Scala client, correct port is
- wrong cluster name, make sure the cluster name you set in your code is the same as the cluster.name you set in
- the sniff option, set
truebut can't connect to all nodes of ES cluster will cause this problem too. ES doc here explained why.
Elasticsearch settings are in
$ES_HOME/config/elasticsearch.yml. There, if the
cluster.name setting is commented out, it means ES would take just about any cluster name. So, in your code, the
"elastictest" might be the problem. Try this:
Client client = new TransportClient() .addTransportAddress(new InetSocketTransportAddress( "143.79.236.xxx", 9300));