{"record":{"id":"aed0da235837d029","repo":"dgraph-io/dgraph","slug":"no-node-with-nodeid-d-found-in-group-d","errorCode":null,"errorMessage":"No node with nodeId %d found in group %d","messagePattern":"No node with nodeId (.+?) found in group (.+?)","errorType":"exception","errorClass":null,"httpStatus":null,"severity":"error","filePath":"dgraph/cmd/zero/zero.go","lineNumber":489,"sourceCode":"\treturn &pb.TabletResponse{\n\t\tTablets: tablets,\n\t}, nil\n}\n\n// RemoveNode removes the given node from the given group.\n// It's the user's responsibility to ensure that node doesn't come back again\n// before calling the api.\nfunc (s *Server) RemoveNode(ctx context.Context, req *pb.RemoveNodeRequest) (*pb.Status, error) {\n\tif req.GroupId == 0 {\n\t\treturn nil, s.Node.ProposePeerRemoval(ctx, req.NodeId)\n\t}\n\tzp := &pb.ZeroProposal{}\n\tzp.Member = &pb.Member{Id: req.NodeId, GroupId: req.GroupId, AmDead: true}\n\tif _, ok := s.state.Groups[req.GroupId]; !ok {\n\t\treturn nil, errors.Errorf(\"No group with groupId %d found\", req.GroupId)\n\t}\n\tif _, ok := s.state.Groups[req.GroupId].Members[req.NodeId]; !ok {\n\t\treturn nil, errors.Errorf(\"No node with nodeId %d found in group %d\", req.NodeId,\n\t\t\treq.GroupId)\n\t}\n\tif len(s.state.Groups[req.GroupId].Members) == 1 && len(s.state.Groups[req.GroupId].\n\t\tTablets) > 0 {\n\t\treturn nil, errors.Errorf(\"Move all tablets from group %d before removing the last node\",\n\t\t\treq.GroupId)\n\t}\n\tif err := s.Node.proposeAndWait(ctx, zp); err != nil {\n\t\treturn nil, err\n\t}\n\n\treturn &pb.Status{}, nil\n}\n\n// Connect is used by Alpha nodes to connect the very first time with group zero.\nfunc (s *Server) Connect(ctx context.Context,\n\tm *pb.Member) (resp *pb.ConnectionState, err error) {\n\t// Ensures that connect requests are always serialized","sourceCodeStart":471,"sourceCodeEnd":507,"githubUrl":"https://github.com/dgraph-io/dgraph/blob/759e242be62c91f8d084da06ad0c8d21256d9c07/dgraph/cmd/zero/zero.go#L471-L507","documentation":"RemoveNode checks that the node id exists among the members of the given group before proposing its removal. If req.NodeId is not a member of s.state.Groups[req.GroupId], the request is rejected with this error.","triggerScenarios":"Calling /removeNode with a NodeId that is not in the target group — wrong node id, node already removed, or the node moved to a different group since the operator listed it.","commonSituations":"Copy-paste of the wrong raft id (ids start at 1 for Zero, Alphas numbered separately); retrying an already-successful removal; cluster rebuilt so raft ids were reassigned.","solutions":["Verify the node id from /state output (members map keys) and re-run removeNode with the correct id.","If the node was already removed, the error confirms success — no action needed.","Ensure the group id and node id pair match; the node may belong to a different group now.","Re-list members of the group (dgraph zero --state or /state) before any removal operation."],"exampleFix":"// before\nremoveNode(zeroAddr, nodeID=2, groupID=1) // node 2 is in group 2, not 1\n// after\nstate := fetchZeroState(zeroAddr)\nif memberExists(state, groupID, nodeID) {\n    removeNode(zeroAddr, nodeID, groupID)\n} else {\n    g := findGroupContainingNode(state, nodeID)\n    removeNode(zeroAddr, nodeID, g)\n}","handlingStrategy":"validation","validationCode":"state := fetchZeroState(zeroAddr)\nif _, ok := state.Groups[groupId].Members[nodeId]; !ok {\n    return fmt.Errorf(\"node %d is not a member of group %d\", nodeId, groupId)\n}","typeGuard":"func nodeInGroup(state *pb.ClusterState, gid, nid uint64) bool {\n    g, ok := state.Groups[gid]\n    if !ok { return false }\n    _, ok = g.Members[nid]\n    return ok\n}","tryCatchPattern":"resp, err := zero.RemoveNode(ctx, req)\nif err != nil && strings.Contains(err.Error(), \"No node with nodeId\") {\n    // already removed or wrong id/group — re-list members and verify\n    log.Infof(\"node %d not in group %d: %v\", req.NodeId, req.GroupId, err)\n}","preventionTips":["Read member ids from /state rather than memory or old runbooks.","Treat this error on retry as confirmation the node was already removed.","Verify both group id and node id together — pairs change after rebalances.","Keep an up-to-date inventory of raft ids per group for ops runbooks."],"tags":["zero","remove-node","cluster-administration","validation"],"backgroundTag":"unknown-member","analyzedSha":"759e242be62c91f8d084da06ad0c8d21256d9c07","analyzedAt":"2026-09-01T14:42:12.034Z","contentChangedAt":null,"schemaVersion":2},"datasetVersion":"2026-09-08T10:18:20.063Z"}