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

  1. Verify providers are started and registered in the registry for the exact service key (interface + group + version).
  2. Inspect the router snapshot (enable dubbo router snapshot logging) to see which router removed all invokers, then relax/fix that rule.
  3. Confirm consumer group/version/query conditions match the registered providers.
  4. 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

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


AI-assisted analysis of apache/dubbo@3a3043227f (2026-08-14). Data as JSON: /api/errors/c8f65ee56ca61eef. Report an issue: GitHub.