简体   繁体   中英

Arango DB Replication applier not working

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

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 )

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM