Cross Cluster Search locally

Does anyone know how to set up cross-cluster search on a locally using a zip version of Elasticsearch search? Whatever mixture of nodes between 2 clusters, how do you get cluster 1 to talk to cluster 2.

My current yml settings are as followed.
cluster.name: cluster 1
xpack.security.enabled: true
xpack.security.transport.ssl.enabled: true
xpack.security.transport.ssl.verification_mode: certificate
xpack.security.transport.ssl.keystore.path: elastic-certificates.p12
xpack.security.transport.ssl.truststore.path: elastic-certificates.p12

I opened this same terminal and created a 5-node cluster.
node.name=node1
node.name=node2
node.name=node3
node.name=node4
node.name=node5

Another complete install of elasticsearch installed and open with these yml settings. No security enabled as it looking for the cluster1 keystore.

cluster.name=cluster2
node.name=node6

After starting all terminals I receive the following errors from the cluster1 nodes

[node1] fetching nodes from external cluster [my_application] failed

Hi @Mack_rogers,

Thanks a lot for taking the time to open this discussion. We will probably need a bit more information from your setup and request to give you an educated and proper answer. Can you please copy and paste the cross-cluster search request you are performing here in the discussion? And let's see if we can figure out things from there.

Awaiting your response.

Solved...this is my PUT command.

PUT _cluster/settings
{
"persistent": {
"cluster": {
"remote": {
"cluster1": {
"seeds": [
"127.0.0.1:9300"
],
"transport.ping_schedule": "30s"
},
"cluster2": {
"seeds": [
"127.0.0.1:9305"
],
"transport.compress": true,
"skip_unavailable": true
}
}
}
},
"transient": {
"cluster": {
"routing": {
"allocation.awareness.attributes": "my_rack"
}
}
}
}

I then checked cluster/remote settings and both addresses are connected: true

I performed a this query and got back results GET cluster2:earthquakes,earthquakes/_search

The IP's were taken from the published addresses when the nodes start up. So I took the cluster1, node1 published address against the cluster2, node6 published address.

NO security is enabled for either cluster for this sample.

1 Like

This topic was automatically closed 30 days after the last reply. New replies are no longer allowed.