In my local development servers, we created two clusters, each having single node.
The cluster status for each of them made green by making number of replicas to 0.
Below is the cluster configurations.
{
"persistent": {
"search": {
"remote": {
"new-cluster": {
"seeds": [
"172.25.24.160:9300"
]
},
"nc3": {
"seeds": [
"172.25.25.237:9300"
]
}
}
}
},
"transient": {}
}
When checked the network level settings there is no issue observed.
When the send the search query using kibana tool, remote cluster search is working normally.
However when search request sent via the REST API it is saying unable to communicate with remote cluster as below.
org.elasticsearch.transport.TransportException: unable to communicate with remote cluster [new-cluster]
at org.elasticsearch.action.search.RemoteClusterService$1.onFailure(RemoteClusterService.java:286) ~[elasticsearch-5.4.0.jar:5.4.0]
at org.elasticsearch.action.ActionListener$1.onFailure(ActionListener.java:67) ~[elasticsearch-5.4.0.jar:5.4.0]
at org.elasticsearch.action.ActionListener.onFailure(ActionListener.java:101) ~[elasticsearch-5.4.0.jar:5.4.0]
Below is the logs at the elastic search startup time,
[2019-03-14T15:40:48,618][WARN ][o.e.a.s.RemoteClusterService] [node-3] failed to update seed list for cluster: new-cluster
org.elasticsearch.transport.ConnectTransportException: [node-1][10.0.30.48:9300] connect_timeout[30s]
at org.elasticsearch.transport.netty4.Netty4Transport.connectToChannels(Netty4Transport.java:359) ~[?:?]
at org.elasticsearch.transport.TcpTransport.openConnection(TcpTransport.java:526) ~[elasticsearch-5.4.0.jar:5.4.0]
at org.elasticsearch.transport.TcpTransport.connectToNode(TcpTransport.java:465) ~[elasticsearch-5.4.0.jar:5.4.0]
at org.elasticsearch.transport.TransportService.connectToNode(TransportService.java:315) ~[elasticsearch-5.4.0.jar:5.4.0]
Here the 10.0.30.48:9300
is the internal IP address. ELK is running in the cloud-servers.
In the elasticsearch.yml file network.host is given as below.
network.host: 10.0.30.48
My elastic search version is 5.4.0 on both clusters.
Below is curl command output.
curl 172.25.24.160:9200
{
"name" : "node-1",
"cluster_name" : "new-cluster",
"cluster_uuid" : "CWn8aXerToK2bc1O4VBrjw",
"version" : {
"number" : "5.4.0",
"build_hash" : "780f8c4",
"build_date" : "2017-04-28T17:43:27.229Z",
"build_snapshot" : false,
"lucene_version" : "6.5.0"
},
"tagline" : "You Know, for Search"
}
curl 172.25.25.237:9200
{
"name" : "node-3",
"cluster_name" : "nc3",
"cluster_uuid" : "28hSUEv8T3aSS5MN16sZVg",
"version" : {
"number" : "5.4.0",
"build_hash" : "780f8c4",
"build_date" : "2017-04-28T17:43:27.229Z",
"build_snapshot" : false,
"lucene_version" : "6.5.0"
},
"tagline" : "You Know, for Search"
}
The search request URI is same in both the cases.