Arango DB Replication applier not working

148 views Asked by At

I am trying to setup a master-slave model of Arango. Able to do a first batch update but applier for live sync is not working. It keeps failing on indexing constraint which works perfectly fine in master and does not have a duplicate key issue.

require("@arangodb/replication").setupReplication({
...>   endpoint: "tcp://master:8529",
...>   username: “name”,
...>   password:  “pass”,
...>   autoStart: true,
...>  incremental:true,
...>  verbose:true,
...> });

applier state.

{ 
  "state" : { 
    "started" : "2020-12-08T07:21:50Z", 
    "running" : false, 
    "phase" : "inactive", 
    "lastAppliedContinuousTick" : null, 
    "lastProcessedContinuousTick" : null, 
    "lastAvailableContinuousTick" : null, 
    "safeResumeTick" : null, 
    "progress" : { 
      "time" : "2020-12-09T07:07:44Z", 
      "message" : "applier shut down", 
      "failedConnects" : 0 
    }, 
    "totalRequests" : 4, 
    "totalFailedConnects" : 0, 
    "totalEvents" : 0, 
    "totalDocuments" : 0, 
    "totalRemovals" : 0, 
    "totalResyncs" : 3, 
    "totalOperationsExcluded" : 0, 
    "totalApplyTime" : 0, 
    "averageApplyTime" : 0, 
    "totalFetchTime" : 0, 
    "averageFetchTime" : 0, 
    "lastError" : { 
      "errorNum" : 0 
    }, 
    "time" : "2020-12-09T07:13:02Z" 
  }, 
  "server" : { 
    "version" : "3.6.4", 
    "serverId" : "237391144398597" 
  }, 
  "endpoint" :


I tried (sync, async) everything. It is just doing the first batch update and live updates are not happening. Somehow applier is just shutting down. Please help

1

There are 1 answers

2
stj On

Can you try either

require("@arangodb/replication").setupReplication({ 
   endpoint: "tcp://master:8529",
   username: “name”,
   password:  “pass”,
   autoStart: true,
   incremental:true,
   verbose:true,
   includeSystem: true 
});

for starting the applier on the current database, or, the following for starting the applier for all databases/the entire server

require("@arangodb/replication").setupReplicationGlobal({ 
   endpoint: "tcp://master:8529",
   username: “name”,
   password:  “pass”,
   autoStart: true,
   incremental:true,
   verbose:true
});

In the latter case (setupReplicationGlobal) you can later check the state of the applier via

require("@arangodb/replication").globalApplier.state();

(mind the globalApplier here vs. just applier)