apache/dubbo · error · RpcException
6
6
Error message
Failed to invoke the method {RpcUtils.getMethodName(invocation)} in the service {getInterface().getName()}. No provider available for the service {getDirectory().getConsumerUrl().getServiceKey()} from registry {getDirectory()} on the consumer {NetUtils.getLocalHost()} using the dubbo version {Version.getVersion()}. Please check if the providers have been started and registered. What it means
Thrown by AbstractClusterInvoker.checkInvokers() with code NO_INVOKER_AVAILABLE_AFTER_FILTER (6) when the invoker list passed to a cluster invoke is empty. This means routing/filtering removed all providers — there is no provider reachable for the service after the router chain ran.
Source
Thrown at dubbo-cluster/src/main/java/org/apache/dubbo/rpc/cluster/support/AbstractClusterInvoker.java:388
}
protected void checkWhetherDestroyed() {
if (destroyed.get()) {
throw new RpcException(
"Rpc cluster invoker for " + getInterface() + " on consumer " + NetUtils.getLocalHost()
+ " use dubbo version " + Version.getVersion()
+ " is now destroyed! Can not invoke any more.");
}
}
@Override
public String toString() {
return getInterface() + " -> " + getUrl().toString();
}
protected void checkInvokers(List<Invoker<T>> invokers, Invocation invocation) {
if (CollectionUtils.isEmpty(invokers)) {
throw new RpcException(
RpcException.NO_INVOKER_AVAILABLE_AFTER_FILTER,
"Failed to invoke the method "
+ RpcUtils.getMethodName(invocation) + " in the service "
+ getInterface().getName()
+ ". No provider available for the service "
+ getDirectory().getConsumerUrl().getServiceKey()
+ " from registry " + getDirectory()
+ " on the consumer " + NetUtils.getLocalHost()
+ " using the dubbo version " + Version.getVersion()
+ ". Please check if the providers have been started and registered.");
}
}
protected Result invokeWithContext(Invoker<T> invoker, Invocation invocation) {
Invoker<T> originInvoker = setContext(invoker);
Result result;
try {
if (ProfilerSwitch.isEnableSimpleProfiler()) {View on GitHub (pinned to 3a3043227f)
Solutions
- Verify providers are started and registered in the registry for the exact service key (interface + group + version).
- Inspect the router snapshot (enable dubbo router snapshot logging) to see which router removed all invokers, then relax/fix that rule.
- Confirm consumer group/version/query conditions match the registered providers.
- Check registry health and that address notifications actually reached the consumer (RegistryDirectory logs).
Example fix
# diagnose: enable router snapshot to find which rule empties the list # -Ddubbo.rpc.router.snapshot=true # then check: are providers registered? do group/version match? # common fix: align consumer group/version with provider @DubboReference(group = "order", version = "1.0.0") private OrderService orderService;
Defensive patterns
Strategy: try-catch
Validate before calling
// Pre-flight: confirm providers are present for the service key
Directory<T> dir = clusterInvoker.getDirectory();
if (CollectionUtils.isEmpty(dir.getAllInvokers())) {
log.warn("No providers registered for " + dir.getConsumerUrl().getServiceKey());
return fallback();
}
return clusterInvoker.invoke(invocation); Try / catch
try {
return service.foo();
} catch (RpcException e) {
if (e.getCode() == RpcException.NO_INVOKER_AVAILABLE_AFTER_FILTER) {
// no provider after routing: degrade or alert; check registry/router rules
log.error("No provider for " + e.getMessage());
return fallback();
}
throw e;
} Prevention
- Verify providers are registered (interface + group + version) before relying on a consumer.
- Enable router snapshot logging to see which router empties the list.
- Keep routing rules permissive enough that at least one provider remains.
When it happens
Trigger: After the directory lists and the router chain filters, zero invokers remain. Caused by: no providers registered for the service, all providers filtered out by condition/script/affinity/mesh routing rules, providers excluded by the connectivity (isAvailable) filter, or a registry/address-notification problem.
Common situations: Provider not started or not registered; registry connectivity issue so the consumer sees no addresses; an overly restrictive routing rule that excludes all providers; provider group/version mismatch; all providers marked unavailable by the health checker.
Related errors
- Directory of type {simpleName} already destroyed for service
- Rpc cluster invoker for {getInterface()} on consumer {NetUti
- No provider available in {invokers}
- Failed to invoke the method {methodName} in the service {get
- Failed to forking invoke provider {selected}, but no luck to
AI-assisted analysis of apache/dubbo@3a3043227f (2026-08-14).
Data as JSON: /api/errors/c8f65ee56ca61eef.
Report an issue: GitHub.