dgraph-io/dgraph · error
REUSE_ADDR: Duplicate address to existing member: %+v. Self:
Error message
REUSE_ADDR: Duplicate address to existing member: %+v. Self: +%v
What it means
Zero detected two different Raft IDs claiming the same network address. When an incoming Connect request's Addr equals an existing member's Addr but the IDs differ, Zero refuses the connection because a single host cannot host two distinct Raft members and routing would be ambiguous. Note the message has a typo: "Self: +%v" (extra +).
Source
Thrown at dgraph/cmd/zero/zero.go:569
}
}
numberOfNodes := len(ms.Zeros)
for _, group := range ms.Groups {
for _, member := range group.Members {
switch {
case member.Addr == m.Addr && m.Id == 0:
glog.Infof("Found a member with the same address. Returning: %+v", member)
conn.GetPools().Connect(m.Addr, s.tlsClientConfig)
return &pb.ConnectionState{
State: ms,
Member: member,
}, nil
case member.Addr == m.Addr && member.Id != m.Id:
// Same address. Different Id. If Id is zero, then it might be trying to connect for
// the first time. We can just directly return the membership information.
return nil, errors.Errorf("REUSE_ADDR: Duplicate address to existing member: %+v."+
" Self: +%v", member, m)
case member.Addr != m.Addr && member.Id == m.Id:
// Same Id. Different address.
if pl, err := conn.GetPools().Get(member.Addr); err == nil && pl.IsHealthy() {
// Found a healthy connection.
return nil, errors.Errorf("REUSE_RAFTID: Healthy connection to a member"+
" with same ID: %+v", member)
}
}
numberOfNodes++
}
}
// Create a connection and check validity of the address by doing an Echo.
conn.GetPools().Connect(m.Addr, s.tlsClientConfig)
createProposal := func() *pb.ZeroProposal {View on GitHub (pinned to 759e242be6)
Solutions
- Ensure the re-provisioned node keeps its original Raft ID (restore p directory) or use a new unique address via --my.
- Fix networking so every dgraph server has a unique, directly reachable --my address (avoid shared service IPs for membership).
- Check /state on Zero to find which member owns the address and remove/reconfigure the conflicting node.
- Correct duplicate --my flags in deployment manifests (StatefulSet pod identity, hostPort collisions).
Example fix
// before dgraph alpha --my=alpha-svc:7080 --raft "id=9" // alpha-svc already owned by id=2 // after dgraph alpha --my=alpha3.default.svc:7080 --raft "id=9"
Defensive patterns
Strategy: validation
Validate before calling
state := fetchZeroState("http://zero:6080/state")
for _, groups := range state.Groups {
for id, m := range groups.Members {
if m.Addr == myAddr && id != myRaftID {
return fmt.Errorf("address %s already owned by member id %d", myAddr, id)
}
}
} Try / catch
_, err := zc.Connect(ctx, m)
if err != nil && strings.Contains(err.Error(), "REUSE_ADDR") {
return fmt.Errorf("address %s is taken by another member; fix --my or networking: %w", m.Addr, err)
} Prevention
- Give every dgraph server a unique --my address; don't share service IPs for raft membership.
- Re-provision nodes with the same raft id and address together.
- Audit k8s manifests for duplicate hostPorts/service addresses.
When it happens
Trigger: Connect with m.Addr equal to a current member's Addr while m.Id differs from that member's Id; restarting an alpha behind the same address after its Raft state was wiped (new ID), or two containers sharing a service IP/hostPort.
Common situations: Kubernetes services/NAT making distinct pods appear at one address; re-provisioned node with new raft ID but old address; DNS entry pointing at the wrong instance; copying config with a duplicate --my value.
Related errors
- NO_ADDR: No address provided: %+v
- Move all tablets from group %d before removing the last node
- REUSE_RAFTID: Duplicate Raft ID %d to removed member: %+v
- REUSE_RAFTID: Healthy connection to a member with same ID: %
- Unable to find group
AI-assisted analysis of dgraph-io/dgraph@759e242be6 (2026-09-01).
Data as JSON: /api/errors/eb80f716c915ea00.
Report an issue: GitHub.