{"record":{"id":"699efb6770e76a0f","repo":"apache/dubbo","slug":"no-provider-available-in-invokers","errorCode":null,"errorMessage":"No provider available in {invokers}","messagePattern":"No provider available in (.+?)","errorType":"exception","errorClass":"RpcException","httpStatus":null,"severity":"error","filePath":"dubbo-cluster/src/main/java/org/apache/dubbo/rpc/cluster/support/AvailableClusterInvoker.java","lineNumber":46,"sourceCode":"/**\n * AvailableClusterInvoker\n *\n */\npublic class AvailableClusterInvoker<T> extends AbstractClusterInvoker<T> {\n\n    public AvailableClusterInvoker(Directory<T> directory) {\n        super(directory);\n    }\n\n    @Override\n    public Result doInvoke(Invocation invocation, List<Invoker<T>> invokers, LoadBalance loadbalance)\n            throws RpcException {\n        for (Invoker<T> invoker : invokers) {\n            if (invoker.isAvailable()) {\n                return invokeWithContext(invoker, invocation);\n            }\n        }\n        throw new RpcException(\"No provider available in \" + invokers);\n    }\n}\n","sourceCodeStart":28,"sourceCodeEnd":49,"githubUrl":"https://github.com/apache/dubbo/blob/3a3043227f5571d25eb2889de5bca22f2914843b/dubbo-cluster/src/main/java/org/apache/dubbo/rpc/cluster/support/AvailableClusterInvoker.java#L28-L49","documentation":"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.","triggerScenarios":"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.","commonSituations":"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.","solutions":["Check provider health and connectivity; ensure providers are up and reachable from the consumer.","Review why isAvailable() returns false for all providers (connection state, heartbeat failures) and fix the underlying transport/registry issue.","Consider a more robust cluster strategy (failover/failfast) if availability checks are unreliable in your environment."],"exampleFix":"// before: all providers unavailable -> throws\nResult r = availableClusterInvoker.invoke(inv); // AvailableCluster\n\n// after: ensure at least one provider is healthy, or switch cluster\n// @DubboReference(cluster = \"failover\")\n// and verify connectivity / restart providers so isAvailable()==true","handlingStrategy":"try-catch","validationCode":"// Pre-flight for AvailableCluster: check if any provider is available\nboolean anyAvailable = invokers.stream().anyMatch(Invoker::isAvailable);\nif (!anyAvailable) {\n    log.warn(\"No available provider for invoke; skipping\");\n    return fallback();\n}\nreturn availableClusterInvoker.invoke(invocation);","typeGuard":null,"tryCatchPattern":"try {\n    return availableClusterInvoker.invoke(invocation);\n} catch (RpcException e) {\n    if (e.getMessage().contains(\"No provider available in\")) {\n        // all providers reported unavailable; degrade or alert ops\n        log.error(\"All providers unavailable: \" + e.getMessage());\n        return fallback();\n    }\n    throw e;\n}","preventionTips":["Monitor provider isAvailable() health and alert when all are down.","Consider failover/failfast if AvailableCluster availability checks are unreliable.","Ensure connections/heartbeats are healthy so isAvailable() reflects reality."],"tags":["cluster","available","no-provider","connectivity"],"backgroundTag":null,"analyzedSha":"3a3043227f5571d25eb2889de5bca22f2914843b","analyzedAt":"2026-08-14T00:43:19.853Z","schemaVersion":2},"datasetVersion":"2026-08-14T05:17:29.042Z"}