I have installed two instances of opensearch with CCR following the steps in the following link Get started - OpenSearch documentation
The “/_remote/info” command executed on the follower cluster returns correct:
{“ClusterMaster”:{“connected”:true,“mode”:“sniff”,“seeds”:[“10.160.34.130:9301”],“num_nodes_connected”:1,“max_connections_per_cluster”:3,“initial_connect_timeout”:“30s”,“skip_unavailable”:false}}
when I try to initialize the replication of an index:
curl -XPUT -H “Content-Type: application/json” “http://10.160.34.130:9232/_plugins/_replication/follower-01/_start” -d’
{
“leader_alias”: “ClusterMaster”,
“leader_index”: “leader-01”,
}’
I get the following errors:
[2021-12-06T18:34:06,518][WARN ][o.o.s.RestoreService ] [nodefollow] [replication-remote-repo-ClusterMaster:replication-remote-snapshot] failed to restore snapshot
org.opensearch.repositories.RepositoryMissingException: [replication-remote-repo-ClusterMaster] missing
at org.opensearch.repositories.RepositoriesService.repository(RepositoriesService.java:474) ~[opensearch-1.2.0.jar:1.2.0]
at org.opensearch.snapshots.RestoreService.restoreSnapshot(RestoreService.java:207) [opensearch-1.2.0.jar:1.2.0]
at org.opensearch.action.admin.cluster.snapshots.restore.TransportRestoreSnapshotAction.masterOperation(TransportRestoreSnapshotAction.java:108) [opensearch-1.2.0.jar:1.2.0]
at org.opensearch.action.admin.cluster.snapshots.restore.TransportRestoreSnapshotAction.masterOperation(TransportRestoreSnapshotAction.java:54) [opensearch-1.2.0.jar:1.2.0]
at org.opensearch.action.support.master.TransportMasterNodeAction.masterOperation(TransportMasterNodeAction.java:124) [opensearch-1.2.0.jar:1.2.0]
at org.opensearch.action.support.master.TransportMasterNodeAction$AsyncSingleAction.lambda$doStart$3(TransportMasterNodeAction.java:197) [opensearch-1.2.0.jar:1.2.0]
at org.opensearch.action.ActionRunnable$2.doRun(ActionRunnable.java:86) [opensearch-1.2.0.jar:1.2.0]
at org.opensearch.common.util.concurrent.ThreadContext$ContextPreservingAbstractRunnable.doRun(ThreadContext.java:792) [opensearch-1.2.0.jar:1.2.0]
at org.opensearch.common.util.concurrent.AbstractRunnable.run(AbstractRunnable.java:50) [opensearch-1.2.0.jar:1.2.0]
at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1130) [?:?]
at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:630) [?:?]
at java.lang.Thread.run(Thread.java:832) [?:?]
[2021-12-06T18:34:06,519][ERROR][o.o.r.t.i.IndexReplicationTask] [nodefollow] [follower-01] Unable to initiate restore call for follower-01 from ClusterMaster:leader-01
org.opensearch.repositories.RepositoryMissingException: [replication-remote-repo-ClusterMaster] missing
at org.opensearch.repositories.RepositoriesService.repository(RepositoriesService.java:474) ~[opensearch-1.2.0.jar:1.2.0]
at org.opensearch.snapshots.RestoreService.restoreSnapshot(RestoreService.java:207) ~[opensearch-1.2.0.jar:1.2.0]
at org.opensearch.action.admin.cluster.snapshots.restore.TransportRestoreSnapshotAction.masterOperation(TransportRestoreSnapshotAction.java:108) ~[opensearch-1.2.0.jar:1.2.0]
at org.opensearch.action.admin.cluster.snapshots.restore.TransportRestoreSnapshotAction.masterOperation(TransportRestoreSnapshotAction.java:54) ~[opensearch-1.2.0.jar:1.2.0]
at org.opensearch.action.support.master.TransportMasterNodeAction.masterOperation(TransportMasterNodeAction.java:124) ~[opensearch-1.2.0.jar:1.2.0]
at org.opensearch.action.support.master.TransportMasterNodeAction$AsyncSingleAction.lambda$doStart$3(TransportMasterNodeAction.java:197) ~[opensearch-1.2.0.jar:1.2.0]
at org.opensearch.action.ActionRunnable$2.doRun(ActionRunnable.java:86) ~[opensearch-1.2.0.jar:1.2.0]
at org.opensearch.common.util.concurrent.ThreadContext$ContextPreservingAbstractRunnable.doRun(ThreadContext.java:792) ~[opensearch-1.2.0.jar:1.2.0]
at org.opensearch.common.util.concurrent.AbstractRunnable.run(AbstractRunnable.java:50) ~[opensearch-1.2.0.jar:1.2.0]
at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1130) [?:?]
at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:630) [?:?]
at java.lang.Thread.run(Thread.java:832) [?:?]