apache/dubbo · error · IllegalStateException
No registry instance in zone or no available providers in th
Error message
No registry instance in zone or no available providers in the registry, zone: {zone}, registries: {invokers.stream().map(...).collect(Collectors.joining(","))} What it means
Thrown by ZoneAwareClusterInvoker as an IllegalStateException when a request carries a registry zone (REGISTRY_ZONE attachment or ZoneDetector), the zone-force flag (REGISTRY_ZONE_FORCE) is 'true', yet no available registry/invoker matches that zone. It is a hard failure that refuses to spill traffic to other zones because the caller demanded strict zone affinity.
Source
Thrown at dubbo-cluster/src/main/java/org/apache/dubbo/rpc/cluster/support/registry/ZoneAwareClusterInvoker.java:96
RpcContext rpcContext = RpcContext.getClientAttachment();
String zone = rpcContext.getAttachment(REGISTRY_ZONE);
String force = rpcContext.getAttachment(REGISTRY_ZONE_FORCE);
if (StringUtils.isEmpty(zone) && zoneDetector != null) {
zone = zoneDetector.getZoneOfCurrentRequest(invocation);
force = zoneDetector.isZoneForcingEnabled(invocation, zone);
}
// providers in the registry with the same zone
if (StringUtils.isNotEmpty(zone)) {
for (Invoker<T> invoker : invokers) {
ClusterInvoker<T> clusterInvoker = (ClusterInvoker<T>) invoker;
if (clusterInvoker.isAvailable()
&& zone.equals(clusterInvoker.getRegistryUrl().getParameter(ZONE_KEY))) {
return clusterInvoker.invoke(invocation);
}
}
if (StringUtils.isNotEmpty(force) && "true".equalsIgnoreCase(force)) {
throw new IllegalStateException(
"No registry instance in zone or no available providers in the registry, zone: "
+ zone
+ ", registries: "
+ invokers.stream()
.map(invoker -> ((ClusterInvoker<T>) invoker)
.getRegistryUrl()
.toString())
.collect(Collectors.joining(",")));
}
}
// load balance among all registries, with registry weight count in.
Invoker<T> balancedInvoker = select(loadbalance, invocation, invokers, null);
if (balancedInvoker != null && balancedInvoker.isAvailable()) {
return balancedInvoker.invoke(invocation);
}
// If none of the invokers has a preferred signal or is picked by the loadbalancer, pick the first oneView on GitHub (pinned to 3a3043227f)
Solutions
- Verify each registry's registry.zone parameter matches the zones the consumer requests, on both consumer and provider registry URLs.
- If spilling across zones on failure is acceptable, set registry.zone.force=false (or omit it) so ZoneAwareClusterInvoker falls back to weighted load balancing.
- Bring up / register providers in the requested zone, or remap the consumer's zone to a populated one via the ZoneDetector.
- Check the listed registries in the message to confirm which are missing the zone tag or have zero available providers.
Example fix
// before: force-zone with no matching zone providers -> hard fail
RpcContext.getClientAttachment().setAttachment("registry.zone", "us-east-1a");
RpcContext.getClientAttachment().setAttachment("registry.zone.force", "true");
// after: relax force so fallback load balancing can serve the call
RpcContext.getClientAttachment().setAttachment("registry.zone.force", "false"); Defensive patterns
Strategy: validation
Validate before calling
// Before forcing a zone, confirm a registry advertises it
boolean zoneExists = invokers.stream()
.anyMatch(i -> zone.equals(((ClusterInvoker<?>) i).getRegistryUrl().getParameter("registry.zone")));
if (!zoneExists) {
log.warn("no registry tagged zone={} ; force will fail", zone);
} Try / catch
try {
return service.call(req);
} catch (IllegalStateException e) {
if (e.getMessage() != null && e.getMessage().startsWith("No registry instance in zone")) {
// zone unavailable + force on; decide whether to relax or fail
log.error("zone-forced call failed; consider disabling zone.force", e);
}
throw e;
} Prevention
- Tag every registry with registry.zone on both consumer and provider sides before enabling force.
- Only enable registry.zone.force=true once the zone is reliably populated.
- Use a ZoneDetector that maps to zones you actually run.
When it happens
Trigger: A consumer sets the registry.zone attachment (or a ZoneDetector returns a zone) plus registry.zone.force=true, and every registry either lacks that zone tag or has no available providers in that zone. The exception lists the candidate registries for diagnosis.
Common situations: Misconfigured zone tag on the registry side (registry.zone mismatch between consumer and provider registries); a datacenter/zone is down while force-zone is enabled; ZoneDetector logic returns a zone id that no registry ever advertises; deploying zone-aware routing before tagging provider registries.
Related errors
- No provider available in {invokers}
- 6
- INTERNAL_ERROR
- Directory of type {simpleName} already destroyed for service
- Failed to acquire read lock on invokerRefreshLock within tim
AI-assisted analysis of apache/dubbo@3a3043227f (2026-08-14).
Data as JSON: /api/errors/a0cf70497ba4e0e9.
Report an issue: GitHub.