apache/dubbo · error · RpcException

No provider available in {invokers}

Error message

No provider available in {invokers}

What it means

Thrown by AvailableClusterInvoker.doInvoke() when none of the invokers in the list reports isAvailable()==true. The 'available' cluster strategy iterates invokers and picks the first available one; if every provider is unavailable it throws RpcException. This is the failure mode of the AvailableCluster.

Source

Thrown at dubbo-cluster/src/main/java/org/apache/dubbo/rpc/cluster/support/AvailableClusterInvoker.java:46

/**
 * AvailableClusterInvoker
 *
 */
public class AvailableClusterInvoker<T> extends AbstractClusterInvoker<T> {

    public AvailableClusterInvoker(Directory<T> directory) {
        super(directory);
    }

    @Override
    public Result doInvoke(Invocation invocation, List<Invoker<T>> invokers, LoadBalance loadbalance)
            throws RpcException {
        for (Invoker<T> invoker : invokers) {
            if (invoker.isAvailable()) {
                return invokeWithContext(invoker, invocation);
            }
        }
        throw new RpcException("No provider available in " + invokers);
    }
}

View on GitHub (pinned to 3a3043227f)

Solutions

  1. Check provider health and connectivity; ensure providers are up and reachable from the consumer.
  2. Review why isAvailable() returns false for all providers (connection state, heartbeat failures) and fix the underlying transport/registry issue.
  3. Consider a more robust cluster strategy (failover/failfast) if availability checks are unreliable in your environment.

Example fix

// before: all providers unavailable -> throws
Result r = availableClusterInvoker.invoke(inv); // AvailableCluster

// after: ensure at least one provider is healthy, or switch cluster
// @DubboReference(cluster = "failover")
// and verify connectivity / restart providers so isAvailable()==true
Defensive patterns

Strategy: try-catch

Validate before calling

// Pre-flight for AvailableCluster: check if any provider is available
boolean anyAvailable = invokers.stream().anyMatch(Invoker::isAvailable);
if (!anyAvailable) {
    log.warn("No available provider for invoke; skipping");
    return fallback();
}
return availableClusterInvoker.invoke(invocation);

Try / catch

try {
    return availableClusterInvoker.invoke(invocation);
} catch (RpcException e) {
    if (e.getMessage().contains("No provider available in")) {
        // all providers reported unavailable; degrade or alert ops
        log.error("All providers unavailable: " + e.getMessage());
        return fallback();
    }
    throw e;
}

Prevention

When it happens

Trigger: Using cluster='available' and invoking when every provider's isAvailable() returns false (e.g., connections down, providers marked unhealthy). The loop completes without finding an available invoker.

Common situations: All providers temporarily unreachable/unhealthy; long-lived connections dropped and not yet re-established; using the AvailableCluster (rare, mostly for specific scenarios) where providers are flaky.

Related errors


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