sofastack / sofa-jraft

A production-grade java implementation of RAFT consensus algorithm.
https://www.sofastack.tech/projects/sofa-jraft/
Apache License 2.0
3.52k stars 1.12k forks source link

集群重启时,follower启动失败 #1096

Open jiangguiqiang199 opened 3 months ago

jiangguiqiang199 commented 3 months ago

集群重启时,follower启动失败,

follower节点报错信息: Node reject term_unmatched AppendEntriesRequest from xxxxxxx.cluster.local:9002, term=40, prevLogIndex=89436606188, prevLogTerm=40, localPrevLogTerm=0, lastLogIndex=0, entriesSize=0.

后采用CliService.removePeer(String groupId, Configuration conf, PeerId peer);将该异常follower节点移除

再采用 CliService.addPeer(String groupId, Configuration conf, PeerId peer);将该节点加入jraft group

addPeer异常信息: {"code":-1,"errorMsg":"com.alipay.remoting.rpc.exception.InvokeTimeoutException: Invoke timeout when invoke with callback.The address is 10.3.31.43:9002","ok":false,"raftError":"UNKNOWN"}

主节点报错: com.alipay.sofa.jraft.core.Replicator : Fail to issue RPC to xxxxxx:9002, consecutiveErrorTimes=31, error=Status[EINTERNAL<1004>: RPC exception:null]

Your scenes

Describe your use scenes (why need this feature)

Your advice

Describe the advice or solution you'd like

Environment