hashicorp/raft

raft-net: failed to decode incoming command: error="unknown rpc type 71"

dingzhiqiang opened this issue · 2 comments

I deployed three nodes, and the above error occurred, which made it impossible to choose the master

Hi @dingzhiqiang ,

Sorry for the late response. Is this something you're still concerned with? If so, could you provide logs please, we don't have information to understand what's going on here.

Hi @ncabatoff ,
I also encountered this issue, but the election was successful, but Raft keeps printing log below. I don't know what the problem is, can you help me?

Mar 27 15:41:00 raft[3577554]: 2024-03-27T15:41:00.005+0800 [ERROR] raft-net: failed to decode incoming command: error="read tcp 192.168.1.104:9115->192.168.1.104:49372: read: connection reset by peer"
Mar 27 15:42:33 raft[3577554]: 2024-03-27T15:42:33.081+0800 [ERROR] raft-net: failed to decode incoming command: error="read tcp 192.168.1.104:9115->192.168.1.104:58574: read: connection reset by peer"
Mar 27 15:43:00 raft[3577554]: 2024-03-27T15:43:00.008+0800 [ERROR] raft-net: failed to decode incoming command: error="read tcp 192.168.1.104:9115->192.168.1.104:56896: read: connection reset by peer"

my code:
trans, err := raft.NewTCPTransport(localRaftAddr, nil, len(metaPeer), 10time.Second, raftLog.Writer())
raftConfig.HeartbeatTimeout = 3
time.Second
raftConfig.ElectionTimeout = 3*time.Second