# Cross-Cluster search Implementation Issues

**URL:** https://discuss.elastic.co/t/cross-cluster-search-implementation-issues/270651
**Category:** Elasticsearch
**Tags:** ccr-cross-cluster-replication
**Created:** [April 20, 2021, 5:36am UTC](https://discuss.elastic.co/t/cross-cluster-search-implementation-issues/270651 "2021-04-20T05:36:37Z")
**Posts on this page:** 9
**Page:** 1

<div class="post-metadata">

### Author: ![tusharnemade](https://avatars.discourse-cdn.com/v4/letter/t/67e7ee/32.png) [@tusharnemade](https://discuss.elastic.co/u/tusharnemade)
#### Post date: [April 20, 2021, 5:36am UTC](https://discuss.elastic.co/t/cross-cluster-search-implementation-issues/270651/1 "2021-04-20T05:36:38Z")

</div>

Hello Team

We have implemented Cross-Cluster Search in Elasticsearch version 7.8.0 clusters.

For example Cluster-A and Cluster-B.

Cluster-A elasticsearch.yml file has below parameters :

```
cluster.remote.Cluster-B.seeds: 10.10.10.20:9300
cluster.remote.Cluster-B.transport.ping_schedule: 60s

```

Cluster-B Does not have parameters for Cluster-A , as its only one-side cross-cluster search implemented.

Now Cluster-A and Cluster-B were down for some maintenance.

Started Cluster-A , first , it gave below error :

```auto
[2021-04-20T03:33:25,375][WARN][o.e.t.SniffConnectionStrategy] [node-1] fetching nodes from external cluster [cls_pp_applog] failed
org.elasticsearch.transport.ConnectTransportException: [][10.10.10.20:9300] connect_exception
...
...
Caused by: io.netty.channel.AbstractChannel$AnnotatedConnectException: Connection refused: 10.10.10.20:9300
Caused by: java.net.ConnectException: Connection refused

[2021-04-20T03:33:25,414][INFO][o.e.n.Node] [node-1] stopping ...
[2021-04-20T03:33:25,420][INFO][o.e.n.Node] [node-1] stopped
[2021-04-20T03:33:25,420][INFO][o.e.n.Node] [node-1] closing ...
[2021-04-20T03:33:25,465][INFO][o.e.n.Node] [node-1] closed

```

I want to confirm , in Cross-Cluster Search Implementation , its mandatory to have CLUSTER-B should be up and running , otherwise Cluster-A will be shutdown ?

---

<div class="post-metadata">

### Author: ![warkolm](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/warkolm/32/39224_2.png) [@warkolm](https://discuss.elastic.co/u/warkolm)
#### Post date: [April 20, 2021, 5:55am UTC](https://discuss.elastic.co/t/cross-cluster-search-implementation-issues/270651/2 "2021-04-20T05:55:51Z")

</div>

Elasticsearch won't stop itself like that, something has asked the process to stop.  
You might want to check your OS logs to see if there is anything related.

---

<div class="post-metadata">

### Author: ![tusharnemade](https://avatars.discourse-cdn.com/v4/letter/t/67e7ee/32.png) [@tusharnemade](https://discuss.elastic.co/u/tusharnemade)
#### Post date: [April 20, 2021, 6:06am UTC](https://discuss.elastic.co/t/cross-cluster-search-implementation-issues/270651/3 "2021-04-20T06:06:59Z")

</div>

OS Logs are clear.

Nothing found.

This is happened when i started Node-1 of Cluster-A with

`elasticsearch -d ` command....

During this time Cluster-B was completely down.

---

<div class="post-metadata">

### Author: ![tusharnemade](https://avatars.discourse-cdn.com/v4/letter/t/67e7ee/32.png) [@tusharnemade](https://discuss.elastic.co/u/tusharnemade)
#### Post date: [April 21, 2021, 12:07pm UTC](https://discuss.elastic.co/t/cross-cluster-search-implementation-issues/270651/4 "2021-04-21T12:07:05Z")

</div>

> [@tusharnemade](#):
>
> ```auto
> Caused by: io.netty.channel.AbstractChannel$AnnotatedConnectException: Connection refused: 10.10.10.20:9300
> Caused by: java.net.ConnectException: Connection refused
> 
> ```

Above Error is the only indicator of why Elasticsearch daemon on this node went down.

Its Nothing to do with any other factor or OS.

---

<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: [April 22, 2021, 4:04pm UTC](https://discuss.elastic.co/t/cross-cluster-search-implementation-issues/270651/5 "2021-04-22T16:04:38Z")

</div>

> [@tusharnemade](#):
>
> in Cross-Cluster Search Implementation , its mandatory to have CLUSTER-B should be up and running , otherwise Cluster-A will be shutdown ?

Only if you define the remote cluster in `elasticsearch.yml`. If you define it via `PUT _cluster/settings` then no. See this issue for more details:

> <https://github.com/elastic/elasticsearch/issues/27006>
>
> Today when we register a remote cluster for cross cluster search we try to conne…ct to it straight-away. If the remote cluster is not available and it is configured in the \`elasticsearch.yml\` of the CCS node, such node won't start. On the other hand, when a remote cluster is registered through the cluster update settings API we still try to connect to it but a connection failure won't impact the registration of the remote cluster.
> 
> I wonder if we should unify the behaviour between the two ways of registering. Do we prefer the remote cluster to be available in both cases at registration time, or would we want to make remote clusters also optional when registering them in the configuration file.
> 
> With #26118 we are introducing a setting that allows to skip remote clusters that are disconnected at search time. Maybe we want to behave differently at registration time too depending on that setting?
> 
> Opening this one for discussion.
> 
> Relates to #26961

---

<div class="post-metadata">

### Author: ![tusharnemade](https://avatars.discourse-cdn.com/v4/letter/t/67e7ee/32.png) [@tusharnemade](https://discuss.elastic.co/u/tusharnemade)
#### Post date: [April 23, 2021, 3:51am UTC](https://discuss.elastic.co/t/cross-cluster-search-implementation-issues/270651/6 "2021-04-23T03:51:12Z")

</div>

> [@DavidTurner](#):
>
> \_cluster/settings

So we have limitation in here. We want things to be on elasticsearch.yml so that its available to view settings of cluster at one place.

Lastly, Persistent settings will do or only transient ?

```auto

curl -X PUT "localhost:9200/_cluster/settings?pretty" -H 'Content-Type: application/json' -d'
{
  "persistent" : {
    "cluster.remote.Cluster-B.seeds" : "10.10.10.20:9300" ,
    "cluster.remote.Cluster-B.transport.ping_schedule" : "60s"
  }
}
'

```

---

<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: [April 23, 2021, 6:29am UTC](https://discuss.elastic.co/t/cross-cluster-search-implementation-issues/270651/7 "2021-04-23T06:29:40Z")

</div>

Either is fine, it depends whether you want them to persist across restarts or not. Usually you do.

---

<div class="post-metadata">

### Author: ![tusharnemade](https://avatars.discourse-cdn.com/v4/letter/t/67e7ee/32.png) [@tusharnemade](https://discuss.elastic.co/u/tusharnemade)
#### Post date: [April 23, 2021, 6:37am UTC](https://discuss.elastic.co/t/cross-cluster-search-implementation-issues/270651/8 "2021-04-23T06:37:15Z")

</div>

Okay.

Thank You @DavidTurner for your responses and help.

---

<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: [May 21, 2021, 6:38am UTC](https://discuss.elastic.co/t/cross-cluster-search-implementation-issues/270651/9 "2021-05-21T06:38:08Z")

</div>

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