# CCR stopped working after 3 days, what can I do?

**URL:** <https://forum.opensearch.org/t/ccr-stopped-working-after-3-days-what-can-i-do/14351>\
**Category:** Cross-Cluster Replication\
**Tags:** troubleshoot\
**Created:** [May 16, 2023, 2:54pm UTC](https://forum.opensearch.org/t/ccr-stopped-working-after-3-days-what-can-i-do/14351 "2023-05-16T14:54:43Z")\
**Posts on this page:** 3\
**Page:** 1

<div class="post-metadata">

**Author:** ![szurokl](https://avatars.discourse-cdn.com/v4/letter/s/a5b964/32.png) [@szurokl](https://forum.opensearch.org/u/szurokl)\
**Post date:** [May 16, 2023, 2:54pm UTC](https://forum.opensearch.org/t/ccr-stopped-working-after-3-days-what-can-i-do/14351/1 "2023-05-16T14:54:43Z")

</div>

OpenSearch 2.4 (running in docker)

I am trying to use CCR autofollow, to replicate indices. After around 3 days the replication seemingly stopped working and I can’t figure out why. I tried deleting and recreating the autofollow rule, but it did not resolve the issue. I tried to start replication manually for an index that should be replicated by the autofollow rule and I get this response:

```auto
{
  "error" : {
    "root_cause" : [
      {
        "type" : "uninitialized_property_access_exception",
        "reason" : "lateinit property leaderIndex has not been initialized"
      }
    ],
    "type" : "uninitialized_property_access_exception",
    "reason" : "lateinit property leaderIndex has not been initialized"
  },
  "status" : 500
}

```

Any ideas? What should I be looking for?

(Btw, I am deleting replicated indices with a script after they leader dosen’t exist anymore, I guess this should not cause problems, as this happens through OpenSearch API)

Edit: the “lateinit property leaderIndex has not been initialized” problem was my fault, I accidentally left the body of the API call empty and that caused this error. So I am able to start replication by hand. The auto follow is not working tho.

---

<div class="post-metadata">

**Author:** ![soosinha](https://sea1.discourse-cdn.com/flex019/user_avatar/forum.opensearch.org/soosinha/32/3214_2.png) [@soosinha](https://forum.opensearch.org/u/soosinha)\
**Post date:** [June 12, 2023, 1:53am UTC](https://forum.opensearch.org/t/ccr-stopped-working-after-3-days-what-can-i-do/14351/2 "2023-06-12T01:53:36Z")

</div>

Can you verify whether the autofollow task is running correctly by following the below steps:

- Run the `_tasks` API to check whether the autofollow task is running

```auto
_cat/tasks?v&actions=cluster:admin/plugins/replication/autofollow\[c\]&detailed

```

- Run the `autofollow_stats` [API](https://opensearch.org/docs/latest/tuning-your-cluster/replication-plugin/api/#get-auto-follow-stats) and check whether the `last_execution_time` in the response is recent.

If the above checks confirm that autofollow task is running then looking into the logs to see any error in starting replication through autofollow.

---

<div class="post-metadata">

**Author:** ![system](https://us1.discourse-cdn.com/flex019/uploads/mauve_hedgehog/original/2X/3/33547ea01a5b12dcca2958411d3edd97ae2ea8c1.png) [@system](https://forum.opensearch.org/u/system)\
**Post date:** [August 11, 2023, 1:54am UTC](https://forum.opensearch.org/t/ccr-stopped-working-after-3-days-what-can-i-do/14351/3 "2023-08-11T01:54:26Z")

</div>

Closed on August 11, 2023, 1:54am UTC

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