Connect to remote cluster

hi guys

i want to connect two clusters elasticsearch for cross search

this is my query :

PUT /_cluster/settings
{
"persistent" : {
"cluster" : {
"remote" : {
"c2" : {
"seeds" : [
"*************.westeurope.azure.elastic-cloud.com:9300"
]
}
}
}
}
}

but when i execute a query search :

GET c2:remote-index-test/_search

i have this error :

{
"error": {
"root_cause": [
{
"type": "transport_exception",
"reason": "handshake failed because connection reset"
}
],
"type": "connect_transport_exception",
"reason": "[2...*:9300] general node connection failure",
"caused_by": {
"type": "transport_exception",
"reason": "handshake failed because connection reset"
}
},
"status": 500
}

i think it's a problem of authentication so can some one help me to add basic athentication to configuration or to query please ?

thank you

Have you looked at the documentation related to setting this up on Elastic Cloud?

Hi @Cheroufa please ensure you are using same CA for both the clusters if you have enabled TLS/SSL layer security and if you have deployed the clusters on prem, but, if you have used elastic cloud to deploy both the cluster then all you need to ensure that the other cluster is active when you are trying to connect and instead of using query DSL you can use Kibana to connect remote cluster.

Please ensure that the clusters trust each other here is the documentation for it- Link

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