dgraph-io/dgraph · error
Couldn't find a server in group %d
Error message
Couldn't find a server in group %d
What it means
BackupGroup routes backup requests to the correct raft group. When the local node is not part of the requested group it looks up any server in that group via groups().AnyServer; if none is found, no node currently serves that group and the request fails with this error.
Source
Thrown at worker/backup.go:215
defer closer.Done()
bp := NewBackupProcessor(pstore, req)
defer bp.Close()
return bp.WriteBackup(closer.Ctx())
}
// BackupGroup backs up the group specified in the backup request.
func BackupGroup(ctx context.Context, in *pb.BackupRequest) (*pb.BackupResponse, error) {
glog.V(2).Infof("Sending backup request: %+v\n", in)
if groups().groupId() == in.GroupId {
return backupCurrentGroup(ctx, in)
}
// This node is not part of the requested group, send the request over the network.
pl := groups().AnyServer(in.GroupId)
if pl == nil {
return nil, errors.Errorf("Couldn't find a server in group %d", in.GroupId)
}
res, err := pb.NewWorkerClient(pl.Get()).Backup(ctx, in)
if err != nil {
glog.Errorf("Backup error group %d: %s", in.GroupId, err)
return nil, err
}
return res, nil
}
// backupLock is used to synchronize backups to avoid more than one backup request
// to be processed at the same time. Multiple requests could lead to multiple
// backups with the same backupNum in their manifest.
var backupLock sync.Mutex
// BackupRes is used to represent the response and error of the Backup gRPC call together to be
// transported via a channel.
type BackupRes struct {View on GitHub (pinned to 759e242be6)
Solutions
- Verify the GroupId exists and has healthy members (check Zero / raft membership)
- Correct the GroupId in the backup request configuration
- Restore/replace the downed servers of that group before retrying the backup
- Refresh cluster membership on the caller so AnyServer resolves current members
Example fix
// before
req := &pb.BackupRequest{GroupId: 2} // group may not exist
// after
if groups().AnyServer(2) == nil {
return errors.New("group 2 has no available servers; check cluster membership")
}
req := &pb.BackupRequest{GroupId: 2} Defensive patterns
Strategy: validation
Validate before calling
if groups().AnyServer(in.GroupId) == nil {
return errors.Errorf("group %d has no available server; check membership before backup", in.GroupId)
} Try / catch
resp, err := BackupGroup(ctx, in)
if err != nil && strings.Contains(err.Error(), "Couldn't find a server in group") {
// refresh membership, verify group id, and surface to operator
} Prevention
- Confirm the GroupId exists and has healthy members before requesting backups
- Monitor raft group health and alert when a group loses all servers
- Refresh membership state after cluster resizes/decommissions
- Avoid hardcoding group ids in backup configs; derive them from cluster state
When it happens
Trigger: Calling BackupGroup with in.GroupId set to a group that has no reachable members — the group was removed, all its servers are down/dead, or the GroupId is simply wrong (e.g. typo or group index out of range).
Common situations: Requesting backup for group 2 in a single-group cluster; servers of the target group crashed or were decommissioned; stale membership data in the client; cluster was resized and the group no longer exists.
Related errors
- NO_ADDR: No address provided: %+v
- unable to connect to the leader of group [%v] : %v
- The server doesn't serve group id: %v
- the Alpha that served that task is not available
- This server doesn't serve group id: %v
AI-assisted analysis of dgraph-io/dgraph@759e242be6 (2026-09-01).
Data as JSON: /api/errors/992b13dff5760078.
Report an issue: GitHub.