{"record":{"id":"24837fec2faee8b5","repo":"dgraph-io/dgraph","slug":"group-d-is-not-a-known-group","errorCode":null,"errorMessage":"group: [%d] is not a known group","messagePattern":"group: \\[(.+?)\\] is not a known group","errorType":"exception","errorClass":null,"httpStatus":null,"severity":"error","filePath":"dgraph/cmd/zero/tablet.go","lineNumber":109,"sourceCode":"// MoveTablet can be used to move a tablet to a specific group.\n// It takes in tablet and destination group as argument.\n// It returns a *pb.Status to be used by the `/moveTablet` HTTP handler in Zero.\nfunc (s *Server) MoveTablet(ctx context.Context, req *pb.MoveTabletRequest) (*pb.Status, error) {\n\tif !s.Node.AmLeader() {\n\t\treturn &pb.Status{Code: 1, Msg: x.Error}, errNotLeader\n\t}\n\n\tknownGroups := s.KnownGroups()\n\tvar isKnown bool\n\tfor _, grp := range knownGroups {\n\t\tif grp == req.DstGroup {\n\t\t\tisKnown = true\n\t\t\tbreak\n\t\t}\n\t}\n\tif !isKnown {\n\t\treturn &pb.Status{Code: 1, Msg: x.ErrorInvalidRequest},\n\t\t\tfmt.Errorf(\"group: [%d] is not a known group\", req.DstGroup)\n\t}\n\n\ttablet := x.NamespaceAttr(req.Namespace, req.Tablet)\n\ttab := s.ServingTablet(tablet)\n\tif tab == nil {\n\t\treturn &pb.Status{Code: 1, Msg: x.ErrorInvalidRequest},\n\t\t\tfmt.Errorf(\"namespace: %d. No tablet found for: %s\", req.Namespace, req.Tablet)\n\t}\n\n\tsrcGroup := tab.GroupId\n\tif srcGroup == req.DstGroup {\n\t\treturn &pb.Status{Code: 1, Msg: x.ErrorInvalidRequest},\n\t\t\tfmt.Errorf(\"namespace: %d. Tablet: [%s] is already being served by group: [%d]\",\n\t\t\t\treq.Namespace, req.Tablet, srcGroup)\n\t}\n\n\tif err := s.movePredicate(tablet, srcGroup, req.DstGroup); err != nil {\n\t\tglog.Errorf(\"namespace: %d. While moving predicate %s from %d -> %d. Error: %v\",","sourceCodeStart":91,"sourceCodeEnd":127,"githubUrl":"https://github.com/dgraph-io/dgraph/blob/759e242be62c91f8d084da06ad0c8d21256d9c07/dgraph/cmd/zero/tablet.go#L91-L127","documentation":"MoveTablet is the gRPC/HTTP entry point on Dgraph Zero for moving a tablet (predicate) to a specific group. Before doing anything it checks that the requested destination group (req.DstGroup) is among the groups Zero currently knows about (s.KnownGroups()). If the group ID does not correspond to any registered Alpha group, Zero rejects the request as an invalid request (Status Code 1, x.ErrorInvalidRequest) with this message.","triggerScenarios":"Calling the /moveTablet HTTP endpoint (or MoveTablet gRPC) with a dst group ID that no Alpha group has registered: a typo'd or out-of-range group ID, referencing a group whose Alphas have never joined the cluster, or moving a tablet to a group that was decommissioned.","commonSituations":"Operators manually rebalancing predicates after scaling down and passing a now-removed group ID; scripting moves with wrong zero-based vs one-based group numbering; stale documentation or runbooks referencing groups from a previous cluster; Alphas of the destination group still down so they never registered with Zero.","solutions":["Check the cluster's known groups via /state endpoint on Zero and use an existing group ID as dst group","Verify the destination Alphas are running and have registered with Zero (check Zero logs for membership)","Correct the group ID in the /moveTablet request and retry"],"exampleFix":"// before\ncurl localhost:6080/moveTablet?tablet=name&dst_group=5   # group 5 doesn't exist\n// after\ncurl 'localhost:6080/state' | jq '.groups | keys'        # confirm e.g. only groups 1,2\ncurl 'localhost:6080/moveTablet?tablet=name&dst_group=2'","handlingStrategy":"validation","validationCode":"// before calling /moveTablet, confirm dst group exists\nstate=$(curl -s localhost:6080/state)\necho \"$state\" | jq -e --argjson g \"$DST_GROUP\" '.groups | has($g)' \\\n  || { echo \"group $DST_GROUP is not known to Zero\"; exit 1; }","typeGuard":"is_known_group() {\n  curl -s localhost:6080/state | jq -e --argjson g \"$1\" '.groups | has($g)' >/dev/null\n}","tryCatchPattern":"resp=$(curl -s \"localhost:6080/moveTablet?tablet=$TABLET&dst_group=$DST_GROUP\")\ncode=$(echo \"$resp\" | jq -r .code)\n[ \"$code\" = 1 ] && echo \"moveTablet rejected: $(echo \"$resp\" | jq -r .msg)\"","preventionTips":["Fetch /state and pick only group IDs listed under .groups","Verify destination Alphas are healthy via /health before issuing moves","Keep a single source of truth (script reads /state) instead of hard-coding group IDs"],"tags":["dgraph","zero","tablet","invalid-request","distributed-systems"],"backgroundTag":"unknown-group-id","analyzedSha":"759e242be62c91f8d084da06ad0c8d21256d9c07","analyzedAt":"2026-09-01T14:42:12.034Z","contentChangedAt":null,"schemaVersion":2},"datasetVersion":"2026-09-08T10:18:20.063Z"}