dgraph-io/dgraph · error
This server doesn't serve group id: %v
Error message
This server doesn't serve group id: %v
What it means
The internal gRPC Schema worker endpoint checks whether this server (Alpha) serves the requested group via groups().ServesGroup. If not, it rejects the request because schema is served only by the group's leader/member.
Source
Thrown at worker/schema.go:232
return nil, r.err
}
schemaNodes = append(schemaNodes, r.result.Schema...)
case <-ctx.Done():
return nil, ctx.Err()
}
}
return schemaNodes, nil
}
// Schema is used to get schema information over the network on other instances.
func (w *grpcWorker) Schema(ctx context.Context, s *pb.SchemaRequest) (*pb.SchemaResult, error) {
if ctx.Err() != nil {
return &emptySchemaResult, ctx.Err()
}
if !groups().ServesGroup(s.GroupId) {
return &emptySchemaResult, errors.Errorf("This server doesn't serve group id: %v", s.GroupId)
}
return getSchema(ctx, s)
}
// GetTypes processes the type requests and retrieves the desired types.
func GetTypes(ctx context.Context, req *pb.SchemaRequest) ([]*pb.TypeUpdate, error) {
if len(req.Types) == 0 && len(req.Predicates) > 0 {
return nil, nil
}
var typeNames []string
var out []*pb.TypeUpdate
if len(req.Types) == 0 {
typeNames = schema.State().Types()
} else {
typeNames = req.Types
}View on GitHub (pinned to 759e242be6)
Solutions
- Retry against the Alpha that currently serves the group (check Zero's state via /state endpoint)
- Refresh membership: wait for the tablet move to complete after `moveTablet`
- Verify the group ID in the request matches a group served by this server
- Restart/rejoin the Alpha if its membership view is stale
Example fix
// before
res, err := grpcWorker.Schema(ctx, &pb.SchemaRequest{GroupId: 1})
// after
if !servesGroup(1) {
// route request to correct alpha or refresh membership from zero
}
res, err := grpcWorker.Schema(ctx, &pb.SchemaRequest{GroupId: 1}) Defensive patterns
Strategy: retry
Validate before calling
// check membership before calling
if !alphaServesGroup(alphaAddr, groupID) { alphaAddr = routeToGroupOwner(groupID) } Try / catch
res, err := Schema(ctx, req)
if err != nil && strings.Contains(err.Error(), "doesn't serve group") {
// refresh membership from zero and retry on the right alpha
time.Sleep(200 * time.Millisecond)
res, err = Schema(ctx, reqWithRoutedGroup(req))
} Prevention
- Check Zero's /state endpoint to route schema requests to the group's serving Alpha
- Add retry-with-backoff for schema calls during tablet moves
- Avoid pinning requests to specific Alpha addresses; use discovery
When it happens
Trigger: A client (or another Alpha, e.g. via GraphQL 'getSchema' fan-out) sends pb.SchemaRequest with a GroupId that this Alpha does not belong to, typically after a zero reassignment or stale membership view.
Common situations: Stale client/cluster state after tablet moves; querying an Alpha that was removed from the group; race during Zero rebalancing; pointing a request at the wrong Alpha.
Related errors
- NO_ADDR: No address provided: %+v
- Couldn't find a server in group %d
- cannot retrieve predicate information
- illegal rune found "%c", expecting {
- JSON map is followed by illegal rune "%c"
AI-assisted analysis of dgraph-io/dgraph@759e242be6 (2026-09-01).
Data as JSON: /api/errors/e63db9df8f5925a7.
Report an issue: GitHub.