grpc/grpc-go · error
rls_csp: nil configuration message provided
Error message
rls_csp: nil configuration message provided
What it means
The RLS cluster specifier plugin's ParseClusterSpecifierConfig was called with a nil proto.Message (rls.go:55-56). The parser requires a non-nil configuration to extract the RLS route lookup settings from the xDS resource.
Solutions
- Ensure the xDS server sends a valid RouteLookupClusterSpecifier proto for RLS cluster resources
- Check the route configuration on the xDS server for missing RLS config fields
- Verify the resource type URL matches 'type.googleapis.com/grpc.lookup.v1.RouteLookupClusterSpecifier'
Defensive patterns
Strategy: type-guard
Type guard
// Guard against nil config before calling ParseClusterSpecifierConfig.
func isNonNilConfig(cfg proto.Message) bool {
return cfg != nil
} Prevention
- Validate xDS server config payloads for nil RLS cluster specifier configs before deployment
- Use xDS config dump tools to inspect RLS cluster specifier resources for nil or empty configs
- Add server-side validation that rejects RLS resources without configuration payloads
When it happens
Trigger: clusterspecifier.ParseClusterSpecifierConfig is called with cfg == nil, either directly by test code or through the xDS resource processing pipeline when an RLS cluster specifier resource arrives from the management server with no configuration payload.
Common situations: xDS management server sends an RLS cluster specifier resource with an empty or null config field; route configuration references the RLS cluster specifier type URL but omits the config payload; xDS protocol version mismatch where the server omits a required field.
Related errors
- rls_csp: error marshaling load balancing config
- rls_csp: error marshaling route lookup config
- rls_csp: error parsing config
- rls_csp: error parsing config
- rls_csp: validation error from rls lb policy parsing
AI-assisted analysis of grpc/grpc-go@0c51461d27 (2026-08-11).
Data as JSON: /api/errors/92995a119b31712d.
Report an issue: GitHub.
Appendix: source
Thrown at internal/xds/clusterspecifier/rls/rls.go:56
type rls struct{}
func (rls) TypeURLs() []string {
return []string{"type.googleapis.com/grpc.lookup.v1.RouteLookupClusterSpecifier"}
}
// lbConfigJSON is the RLS LB Policies configuration in JSON format.
// RouteLookupConfig will be a raw JSON string from the passed in proto
// configuration, and the other fields will be hardcoded.
type lbConfigJSON struct {
RouteLookupConfig json.RawMessage `json:"routeLookupConfig"`
ChildPolicy []map[string]json.RawMessage `json:"childPolicy"`
ChildPolicyConfigTargetFieldName string `json:"childPolicyConfigTargetFieldName"`
}
func (rls) ParseClusterSpecifierConfig(cfg proto.Message) (clusterspecifier.BalancerConfig, error) {
if cfg == nil {
return nil, fmt.Errorf("rls_csp: nil configuration message provided")
}
m, ok := cfg.(*anypb.Any)
if !ok {
return nil, fmt.Errorf("rls_csp: error parsing config %v: unknown type %T", cfg, cfg)
}
rlcs := new(rlspb.RouteLookupClusterSpecifier)
if err := m.UnmarshalTo(rlcs); err != nil {
return nil, fmt.Errorf("rls_csp: error parsing config %v: %v", cfg, err)
}
rlcJSON, err := protojson.Marshal(rlcs.GetRouteLookupConfig())
if err != nil {
return nil, fmt.Errorf("rls_csp: error marshaling route lookup config: %v: %v", rlcs.GetRouteLookupConfig(), err)
}
lbCfgJSON := &lbConfigJSON{
RouteLookupConfig: rlcJSON, // "JSON form of RouteLookupClusterSpecifier.config" - RLS in xDS Design Doc
ChildPolicy: []map[string]json.RawMessage{
{View on GitHub (pinned to 0c51461d27)