Hello everyone,
I have been using Elasticsearch for a few months now, but I am only now embracing more and more of its features. One feature in particular, "Cross Cluster Search", is causing me some troubles.
I am trying to have one cluster (Cluster A) on which the cross cluster search will be available and one cluster (Cluster B) that will be accessed through Cluster A.
With my understanding of the Cross Cluster Search, I came out with those config files (elasticsearch.yml):
Cluster A (used to forward the searches):
cluster.name: cluster_a
node.name: cluster_a_node-1
network.host: 0
network.bind_host: 0
network.publish_host: 0
http.port: 9200
search:
remote:
cluster_b:
seeds: <address_of_the_cluster_b_machine>:9200
Cluster B (used to receive the searches):
cluster.name: cluster_b
node.name: cluster_b_node-1
network.host: 0
network.bind_host: 0
network.publish_host: 0
When I am on the machine hosting the Cluster A I can do both:
$ curl -XGET 'localhost:9200/'
... # Success
$ curl -XGET '<address_of_the_cluster_b_machine>:9200/index'
... # Success
with success. However, when trying to do the cross search, I face the following issue:
$ curl -XGET 'localhost:9200/cluster_b:index/?pretty'
{
"error" : {
"root_cause" : [
{
"type" : "index_not_found_exception",
"reason" : "no such index",
"resource.type" : "index_or_alias",
"resource.id" : "cluster_b:index",
"index_uuid" : "_na_",
"index" : "cluster_b:index"
}
],
"type" : "index_not_found_exception",
"reason" : "no such index",
"resource.type" : "index_or_alias",
"resource.id" : "cluster_b:index",
"index_uuid" : "_na_",
"index" : "cluster_b:index"
},
"status" : 404
}
I also noticed that seeds is empty there:
$ curl -XGET 'localhost:9200/_remote/info?pretty'
{
"cluster_b" : {
"seeds" : [ ],
"http_addresses" : [ ],
"connected" : false,
"num_nodes_connected" : 0,
"max_connections_per_cluster" : 3,
"initial_connect_timeout" : "30s",
"skip_unavailable" : false
}
}
and that upon starting, Elasticsearch shows this:
[2018-01-17T17:49:30,483][WARN ][o.e.t.RemoteClusterService] [cluster_a] failed to connect to remote clusters within 30s
[2018-01-17T17:49:30,506][INFO ][o.e.b.BootstrapChecks ] [cluster_a] bound or publishing to a non-loopback address, enforcing bootstrap checks
[2018-01-17T17:49:30,520][WARN ][o.e.t.RemoteClusterService] [cluster_a] failed to update seed list for cluster: cluster_b
I feel that this shouldn't be that hard and that I am probably missing a key point...
Please tell me if you need more information about my configuration in order to solve this issue.
"version" : {
"number" : "6.1.2",
"build_hash" : "5b1fea5",
"build_date" : "2018-01-10T02:35:59.208Z",
"build_snapshot" : false,
"lucene_version" : "7.1.0",
"minimum_wire_compatibility_version" : "5.6.0",
"minimum_index_compatibility_version" : "5.0.0"
}
Thank you,
Arnaud