grpc/grpc-java · error · IllegalArgumentException

No xds servers found for authority

Error message

No xds servers found for authority 

What it means

XdsClientImpl.getOrCreateControlPlaneClient looks up the list of ServerInfo for the requested authority. If no bootstrap servers are registered for that authority (getServerInfos returns null), it throws IllegalArgumentException("No xds servers found for authority " + authority). The client cannot open a control-plane channel for an unknown authority.

Source

Thrown at xds/src/main/java/io/grpc/xds/client/XdsClientImpl.java:482

    for (Map<String, ResourceSubscriber<?>> subscriberMap : resourceSubscribers.values()) {
      for (ResourceSubscriber<?> subscriber : subscriberMap.values()) {
        if (cpcForThisStream == null || authoritiesForCpc.contains(subscriber.authority)) {
          subscriber.stopTimer();
        }
      }
    }
  }

  private ControlPlaneClient getOrCreateControlPlaneClient(String authority) throws IOException {
    // Optimize for the common case of a working ads stream already exists for the authority
    ControlPlaneClient activeCpc = getActiveCpc(authority);
    if (activeCpc != null && !activeCpc.isInError()) {
      return activeCpc;
    }

    ImmutableList<ServerInfo> serverInfos = getServerInfos(authority);
    if (serverInfos == null) {
      throw new IllegalArgumentException("No xds servers found for authority " + authority);
    }

    for (ServerInfo serverInfo : serverInfos) {
      ControlPlaneClient cpc = getOrCreateControlPlaneClient(serverInfo);
      if (cpc.isInError()) {
        continue;
      }
      return cpc;
    }

    // Everything existed and is in backoff so throw
    throw new IOException("All xds transports for authority " + authority + " are in backoff");
  }

  private ControlPlaneClient getOrCreateControlPlaneClient(ServerInfo serverInfo) {
    syncContext.throwIfNotInThisSynchronizationContext();
    if (serverCpClientMap.containsKey(serverInfo)) {
      return serverCpClientMap.get(serverInfo);

View on GitHub (pinned to 64daddc1f3)

Solutions

  1. Add the missing authority (with its own 'xds_servers' list) to the 'authorities' section of the bootstrap JSON.
  2. Fix the authority name used in the resource name (xdstp://<authority>/...) to match one configured in bootstrap.
  3. Verify the bootstrap file was actually loaded with the intended authorities by checking the logged bootstrap configuration.
  4. If the resource should use the default server, drop the authority from the resource name instead of requesting an unconfigured one.

Example fix

// before: bootstrap has no entry for foo.com
// after
"authorities": {
  "foo.com": { "xds_servers": [{ "server_uri": "dns:///xds-foo.example.com:443",
                                  "channel_creds": [{"type": "google_default"}] }] }
}
Defensive patterns

Strategy: validation

Validate before calling

java.util.Map<String, ?> bootstrap = parseBootstrapJson();
java.util.Map<String, ?> authorities = (java.util.Map<String, ?>) bootstrap.get("authorities");
if (authorities == null || !authorities.containsKey(authorityName)) {
  throw new IllegalStateException("authority not configured in bootstrap: " + authorityName);
}

Type guard

boolean authorityConfigured(java.util.Map<String, ?> bootstrap, String authority) {
  Object a = bootstrap.get("authorities");
  return a instanceof java.util.Map && ((java.util.Map<?, ?>) a).containsKey(authority);
}

Try / catch

try {
  xdsClient.createResourceWatcher(...);
} catch (IllegalArgumentException e) {
  if (e.getMessage().startsWith("No xds servers found for authority")) {
    // add the authority to bootstrap 'authorities' or fix the resource name
  }
}

Prevention

When it happens

Trigger: Requesting resources for an authority that has no entry in the bootstrap 'authorities' map (or when no top-level servers are configured as fallback for the empty/"" authority); bootstrap loaded without the authority in question.

Common situations: Multi-authority (Traffic Director federation) setups where the resource's authority wasn't listed under 'authorities' in the bootstrap file; typo in the authority name; using a default-authority resource while bootstrap only defines named authorities.

Understand the failure class

Background: 'Could not be found', 'does not exist', 'not found in database': the resource-not-found family when an ID, slug, key, or URI lookup comes back empty — this error's family across 20 libraries.

Related errors


AI-assisted analysis of grpc/grpc-java@64daddc1f3 (2026-09-08). Data as JSON: /api/errors/ea0231c9fbb7ded0. Report an issue: GitHub.