{"record":{"id":"fa7afd22647a4206","repo":"grpc/grpc-java","slug":"httpconnectionmanager-contains-invalid-rds-must-s","errorCode":null,"errorMessage":"HttpConnectionManager contains invalid RDS: must specify ADS or self ConfigSource","messagePattern":"HttpConnectionManager contains invalid RDS: must specify ADS or self ConfigSource","errorType":"exception","errorClass":"ResourceInvalidException","httpStatus":null,"severity":"error","filePath":"xds/src/main/java/io/grpc/xds/XdsListenerResource.java","lineNumber":565,"sourceCode":"      }\n      filterConfigs.add(new Filter.NamedFilterConfig(filterName, filterConfig.getStruct()));\n    }\n\n    // Parse inlined RouteConfiguration or RDS.\n    if (proto.hasRouteConfig()) {\n      List<VirtualHost> virtualHosts = extractVirtualHosts(\n          proto.getRouteConfig(), filterRegistry, args);\n      return io.grpc.xds.HttpConnectionManager.forVirtualHosts(\n          maxStreamDuration, virtualHosts, filterConfigs);\n    }\n    if (proto.hasRds()) {\n      Rds rds = proto.getRds();\n      if (!rds.hasConfigSource()) {\n        throw new ResourceInvalidException(\n            \"HttpConnectionManager contains invalid RDS: missing config_source\");\n      }\n      if (!rds.getConfigSource().hasAds() && !rds.getConfigSource().hasSelf()) {\n        throw new ResourceInvalidException(\n            \"HttpConnectionManager contains invalid RDS: must specify ADS or self ConfigSource\");\n      }\n      return io.grpc.xds.HttpConnectionManager.forRdsName(\n          maxStreamDuration, rds.getRouteConfigName(), filterConfigs);\n    }\n    throw new ResourceInvalidException(\n        \"HttpConnectionManager neither has inlined route_config nor RDS\");\n  }\n\n  // hard-coded: currently router config is the only terminal filter.\n  private static boolean isTerminalFilter(Filter.FilterConfig filterConfig) {\n    return RouterFilter.ROUTER_CONFIG.equals(filterConfig);\n  }\n\n  @VisibleForTesting\n  @Nullable // Returns null if the filter is optional but not supported.\n  static StructOrError<Filter.FilterConfig> parseHttpFilter(\n      io.envoyproxy.envoy.extensions.filters.network.http_connection_manager.v3.HttpFilter","sourceCodeStart":547,"sourceCodeEnd":583,"githubUrl":"https://github.com/grpc/grpc-java/blob/64daddc1f3d1975670f769f3e97bde8b2ba32d25/xds/src/main/java/io/grpc/xds/XdsListenerResource.java#L547-L583","documentation":"When an HttpConnectionManager uses RDS, the config_source must specify either ADS or SELF as the discovery mechanism. A config_source pointing at a non-ADS, non-SELF source (e.g. a path-based or gRPC API source) is rejected because this gRPC xDS implementation only supports ADS or self discovery for route configurations.","triggerScenarios":"parseHttpConnectionManager: rds.hasConfigSource() is true but neither config_source.hasAds() nor config_source.hasSelf() is set (e.g. api_type GRPC or path-based config_source).","commonSituations":"Configs written for Envoy's file-based (path) config source or a separate gRPC management server being reused with gRPC xDS; copy-pasted Envoy bootstrap config_source blocks.","solutions":["Change the Rds config_source to ads: {}","Or use config_source { self: {} } if the listener and routes come from the same server","Ensure the client connects over ADS (grpc xDS bootstrap with ADS servers) so the source is valid"],"exampleFix":"// before\nrds: {\n  route_config_name: \"routes\"\n  config_source: { path: \"/etc/envoy/routes.pb\" }\n}\n// after\nrds: {\n  route_config_name: \"routes\"\n  config_source: { ads: {} }\n}","handlingStrategy":"validation","validationCode":"// Java (proto): ensure config_source is ADS or SELF\nRds rds = hcm.getRds();\nif (rds.hasConfigSource()\n    && !rds.getConfigSource().hasAds()\n    && !rds.getConfigSource().hasSelf()) {\n  throw new IllegalArgumentException(\"RDS config_source must be ads or self\");\n}","typeGuard":null,"tryCatchPattern":"try {\n  xdsClient.watchResource(LISTENER, name, listenerWatcher);\n} catch (ResourceInvalidException e) {\n  log.error(\"Unsupported RDS config_source: {}\", e.getMessage());\n}","preventionTips":["Never reuse Envoy path/grpc-api config_source blocks in gRPC xDS configs","Use ads: {} or self: {} exclusively for RDS config sources","Keep the client's bootstrap configured for ADS"],"tags":["xds","grpc","rds","config-source"],"backgroundTag":"unsupported-config-value","analyzedSha":"64daddc1f3d1975670f769f3e97bde8b2ba32d25","analyzedAt":"2026-09-08T06:14:57.704Z","contentChangedAt":"2026-09-08T06:14:57.704Z","schemaVersion":2},"datasetVersion":"2026-09-17T15:17:12.973Z"}