Reputation: 1
I am having sping boot application and if i use my local elastic search i am able to connect but if i used the remote elastic search i'am not able to connect.
spring:
data:
elasticsearch:
cluster-name: es_psc
cluster-nodes: 100.84.57.2:9300
if i run in browser(http://100.84.57.2:9200/) I am able to see the details
{
"name" : "i58Q9JC",
"cluster_name" : "es_psc",
"cluster_uuid" : "EKeTJwviQvWeTzbS1h1w4w",
"version" : {
"number" : "6.4.3",
"build_flavor" : "default",
"build_type" : "tar",
"build_hash" : "fe40335",
"build_date" : "2018-10-30T23:17:19.084789Z",
"build_snapshot" : false,
"lucene_version" : "7.4.0",
"minimum_wire_compatibility_version" : "5.6.0",
"minimum_index_compatibility_version" : "5.0.0"
},
"tagline" : "You Know, for Search"
}
But I i run my spring boot application its giving below error:
Caused by: org.elasticsearch.client.transport.NoNodeAvailableException: None of the configured nodes are available: [{#transport#-1}{6SiLGoTHTmmiuzBTvweb3A}{100.84.57.2}{100.84.57.2:9300}]
Upvotes: 0
Views: 768
Reputation: 415
You are using the wrong port in your config file. You should be using port 9200, which is meant for rest communication.
Port 9300 is used for internal communication between Elasticsearch nodes.
Upvotes: 0