# Cross-cluster-search

**URL:** <https://discuss.elastic.co/t/cross-cluster-search/189982>\
**Category:** Elasticsearch\
**Created:** [July 11, 2019, 11:06am UTC](https://discuss.elastic.co/t/cross-cluster-search/189982 "2019-07-11T11:06:41Z")\
**Posts on this page:** 5\
**Page:** 1

<div class="post-metadata">

**Author:** ![prasad.ram1431](https://avatars.discourse-cdn.com/v4/letter/p/c89c15/32.png) [@prasad.ram1431](https://discuss.elastic.co/u/prasad.ram1431)\
**Post date:** [July 11, 2019, 11:06am UTC](https://discuss.elastic.co/t/cross-cluster-search/189982/1 "2019-07-11T11:06:41Z")

</div>

Hi,

I am using AWS EC2 linux servers with self-managed Elasticsearch usage.  
Now, I have to search data from Elasticsearch Indices which are located in two different regions. For this I came to know we have to use cross-cluster-search functionality.

As these are EC2 servers, i have configured with private IP's of both as below,

```
{
  "persistent": {
    "cluster": {
      "remote": {
        "ireland_cluster": {
          "seeds": [
            "<private_IP>:9301"
          ],
          "transport.ping_schedule": "60s"
        },
        "singapore_cluster": {
          "seeds": [
            "<private_IP>:9302"
          ],
          "transport.compress": false
        }
      }
    }
  }
}

```

I ran the above query in both the clusters.  
With the above configuration, when i execute below query,  
GET \<private\_IP of ireland\>:9200/ireland\_cluster:index,singapore\_cluster:index/\_search  
I am getting below error,

type": "connect\_transport\_exception",

"reason": "[\<private\_IP\>:9302] connect\_timeout[30s]

Could someone please help me on this issue.

Thanks & Regards,  
Ram

---

<div class="post-metadata">

**Author:** ![DavidTurner](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/davidturner/32/22453_2.png) [@DavidTurner](https://discuss.elastic.co/u/DavidTurner)\
**Post date:** [July 11, 2019, 11:33am UTC](https://discuss.elastic.co/t/cross-cluster-search/189982/2 "2019-07-11T11:33:59Z")

</div>

It looks like your network is not correctly configured for these instances to communicate with each other on their private IP addresses. Setting this up correctly is outside the scope of what I can help you with, but perhaps this [documentation on VPC peering](https://docs.aws.amazon.com/vpc/latest/peering/what-is-vpc-peering.html) is what you're looking for?

---

<div class="post-metadata">

**Author:** ![prasad.ram1431](https://avatars.discourse-cdn.com/v4/letter/p/c89c15/32.png) [@prasad.ram1431](https://discuss.elastic.co/u/prasad.ram1431)\
**Post date:** [July 11, 2019, 1:10pm UTC](https://discuss.elastic.co/t/cross-cluster-search/189982/3 "2019-07-11T13:10:13Z")

</div>

Hi David,

Thank you very much for your fast reply.  
But I came to know that we have done the VPC peering.

Let me explain clearly what we are trying to do.

1. Windows machine from which we will be hitting both linux EC2(where Elasticsearch installed)
2. I have created sample index in both region's elasticsearch

Now I tried hitting like below from windows machine,

http://\<private\_IP of ireland\>:9200/:sample\_index/\_search

it is giving connection time\_out error.  
Thanks & Regards,  
Ram

---

<div class="post-metadata">

**Author:** ![DavidTurner](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/davidturner/32/22453_2.png) [@DavidTurner](https://discuss.elastic.co/u/DavidTurner)\
**Post date:** [July 12, 2019, 11:13am UTC](https://discuss.elastic.co/t/cross-cluster-search/189982/4 "2019-07-12T11:13:27Z")

</div>

It still sounds like a basic AWS connectivity issue, and you'll likely get more useful help on a more AWS-focussed forum. For this to work your Windows machine also needs to be on a network on which the private IP addresses of your EC2 instances are reachable (e.g. within one of their VPCs or within another VPC to which they are peered).

---

<div class="post-metadata">

**Author:** ![system](https://us1.discourse-cdn.com/elastic/original/3X/1/a/1ac57faf039f6b580b3f104ef42a2a89e41014de.png) [@system](https://discuss.elastic.co/u/system)\
**Post date:** [August 9, 2019, 11:13am UTC](https://discuss.elastic.co/t/cross-cluster-search/189982/5 "2019-08-09T11:13:28Z")

</div>

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