# Elasticsearch cross cluster replication - bi-directional is not working

**URL:** <https://discuss.elastic.co/t/elasticsearch-cross-cluster-replication-bi-directional-is-not-working/365619>\
**Category:** Elasticsearch\
**Tags:** ccr-cross-cluster-replication\
**Created:** [August 27, 2024, 1:48pm UTC](https://discuss.elastic.co/t/elasticsearch-cross-cluster-replication-bi-directional-is-not-working/365619 "2024-08-27T13:48:29Z")\
**Posts on this page:** 7\
**Page:** 1

<div class="post-metadata">

**Author:** ![navaneethan](https://avatars.discourse-cdn.com/v4/letter/n/f17d59/32.png) [@navaneethan](https://discuss.elastic.co/u/navaneethan)\
**Post date:** [August 27, 2024, 1:48pm UTC](https://discuss.elastic.co/t/elasticsearch-cross-cluster-replication-bi-directional-is-not-working/365619/1 "2024-08-27T13:48:29Z")

</div>

Hi

We need to do the cross cluster replication to avoid the downtime in our environment

It is working fine in the single/uni directional DR datacenter and the leader index is replicating fine the follower index

but when we do the bi-direction with following the official document it is not working

we are using es 7.17.x with xpack enabled and we have verified the remote cluster connection with \_remote/info also

---

<div class="post-metadata">

**Author:** ![Christian\_Dahlqvist](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/christian_dahlqvist/32/4617_2.png) [@Christian\_Dahlqvist](https://discuss.elastic.co/u/Christian_Dahlqvist)\
**Post date:** [August 27, 2024, 1:59pm UTC](https://discuss.elastic.co/t/elasticsearch-cross-cluster-replication-bi-directional-is-not-working/365619/2 "2024-08-27T13:59:37Z")

</div>

Bi-directional replication is basically 2 uni-directional replications in the opposite direction for different indices so I do not see why it would not work if it works in one direction.

It would help if you provided information of how you set it up, the configuration of the clusters and any error messages you have encountered.

---

<div class="post-metadata">

**Author:** ![navaneethan](https://avatars.discourse-cdn.com/v4/letter/n/f17d59/32.png) [@navaneethan](https://discuss.elastic.co/u/navaneethan)\
**Post date:** [August 27, 2024, 2:11pm UTC](https://discuss.elastic.co/t/elasticsearch-cross-cluster-replication-bi-directional-is-not-working/365619/3 "2024-08-27T14:11:43Z")

</div>

Hi @Christian_Dahlqvist

unidirectional is working fine.

bi-directional replication alone not working for us, we are getting the below error when we do the indexing and update from the follower index side

```
"type" : "status_exception",
"reason" : "a following engine does not accept operations without an assigned sequence number"

```

we have added the node role remote\_cluster\_client in yml  
updated the cluster settings and verified the connection with \_remote/info

---

<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:** [August 27, 2024, 2:13pm UTC](https://discuss.elastic.co/t/elasticsearch-cross-cluster-replication-bi-directional-is-not-working/365619/4 "2024-08-27T14:13:33Z")

</div>

> [@navaneethan](#):
>
> we are getting the below error when we do the indexing and update from the follower index side

That's the expected outcome of trying to write directly to a follower index. You need to write to the leader index.

---

<div class="post-metadata">

**Author:** ![Christian\_Dahlqvist](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/christian_dahlqvist/32/4617_2.png) [@Christian\_Dahlqvist](https://discuss.elastic.co/u/Christian_Dahlqvist)\
**Post date:** [August 27, 2024, 2:15pm UTC](https://discuss.elastic.co/t/elasticsearch-cross-cluster-replication-bi-directional-is-not-working/365619/5 "2024-08-27T14:15:57Z")

</div>

If you look in [the documentation](https://www.elastic.co/guide/en/elasticsearch/reference/current/xpack-ccr.html#ccr-bi-directional-replication) you can see that the bi-directional replication consists of 2 pairs or leader-follower where you write to the local leader. You can not do this with a single index.

---

<div class="post-metadata">

**Author:** ![navaneethan](https://avatars.discourse-cdn.com/v4/letter/n/f17d59/32.png) [@navaneethan](https://discuss.elastic.co/u/navaneethan)\
**Post date:** [August 27, 2024, 2:38pm UTC](https://discuss.elastic.co/t/elasticsearch-cross-cluster-replication-bi-directional-is-not-working/365619/6 "2024-08-27T14:38:15Z")

</div>

we have checked this creating a index "textz" in one cluster "clusterA" and followed the same index in other cluster "clusterB"

we can able to see the leader index data in follower index ince it is been followed

after that we have deleted the leader index and do the unfollow on the follower side and still the data is present in follower side

our questn is while the leader side is down we need to make the replication stop by doing unfollow on the indices and make the follower cluster for index/writing

during this time we will face data loss / downtime ?

---

<div class="post-metadata">

**Author:** ![Christian\_Dahlqvist](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/christian_dahlqvist/32/4617_2.png) [@Christian\_Dahlqvist](https://discuss.elastic.co/u/Christian_Dahlqvist)\
**Post date:** [August 27, 2024, 2:43pm UTC](https://discuss.elastic.co/t/elasticsearch-cross-cluster-replication-bi-directional-is-not-working/365619/7 "2024-08-27T14:43:12Z")

</div>

If you have uni-directional replication and want/need to make the follower index a normal index I would recommend you [follow the instructions in the docs](https://www.elastic.co/guide/en/elasticsearch/reference/current/ccr-managing.html#ccr-terminate-replication).

Until the follower has been changed to a normal index that is not read-only after the leader has failed you will not be able to write to the index, which I assume could result in data loss.
