{"record":{"id":"8f61dcfefdf30d9a","repo":"alibaba/nacos","slug":"e-geterrcode","errorCode":"{e.getErrCode()}","errorMessage":"Get Running Client failed: ","messagePattern":"Get Running Client failed: ","errorType":"exception","errorClass":"NacosRuntimeException","httpStatus":null,"severity":"error","filePath":"client/src/main/java/com/alibaba/nacos/client/config/impl/ClientWorker.java","lineNumber":1501,"sourceCode":"                return getOneRunningClient().isRunning();\n            } catch (NacosException e) {\n                LOGGER.warn(\"check server status failed.\", e);\n                return false;\n            }\n        }\n        \n        /**\n         * Determine whether nacos-server supports the capability.\n         *\n         * @param abilityKey ability key\n         * @return true if supported, otherwise false\n         */\n        public boolean isAbilitySupportedByServer(AbilityKey abilityKey) {\n            try {\n                return getOneRunningClient()\n                    .getConnectionAbility(abilityKey) == AbilityStatus.SUPPORTED;\n            } catch (NacosException e) {\n                throw new NacosRuntimeException(e.getErrCode(), \"Get Running Client failed: \", e);\n            }\n        }\n    }\n    \n    public String getAgentName() {\n        return agent.getName();\n    }\n    \n    public ConfigTransportClient getAgent() {\n        return agent;\n    }\n    \n}\n","sourceCodeStart":1483,"sourceCodeEnd":1515,"githubUrl":"https://github.com/alibaba/nacos/blob/9b989acdf181d00898f2e8839257bb2b2a3cefe3/client/src/main/java/com/alibaba/nacos/client/config/impl/ClientWorker.java#L1483-L1515","documentation":"Thrown as a NacosRuntimeException by ClientWorker.isAbilitySupportedByServer when getOneRunningClient() throws a NacosException (e.g. no connected gRPC client available). The wrapper preserves the original errorCode and chains the cause. It occurs when the client tries to query server capability (used for feature gating like fuzzy watch) but no RPC client is connected.","triggerScenarios":"Calling a capability-gated feature (fuzzy watch registration, etc.) before the gRPC client is connected, or after the client has been shut down / lost all connections.","commonSituations":"Invoking fuzzy watch immediately after constructing the ConfigService before the gRPC channel is established, or after a shutdown() call.","solutions":["Ensure the client is initialized and connected before using capability-gated APIs (await the first successful config interaction).","Do not call feature APIs after client.shutdown().","Inspect the chained NacosException cause to see the underlying connection failure code.","Recreate/restart the ConfigService if the underlying gRPC client was closed."],"exampleFix":null,"handlingStrategy":"try-catch","validationCode":"// ensure client is connected before capability-gated calls\n// (perform one successful getConfig/listen first to establish the gRPC channel)","typeGuard":null,"tryCatchPattern":"try {\n    boolean supported = client.isAbilitySupportedByServer(AbilityKey.SERVER_FUZZY_WATCH);\n} catch (NacosRuntimeException e) {\n    log.warn(\"cannot query server capability, client not connected: {}\", e.getErrCode());\n    supported = false;\n}","preventionTips":["Establish the gRPC connection (first config interaction) before capability checks.","Do not use capability-gated APIs after shutdown().","Handle the wrapped NacosRuntimeException and inspect the cause."],"tags":["config","grpc","capability","client","connection"],"backgroundTag":null,"analyzedSha":"9b989acdf181d00898f2e8839257bb2b2a3cefe3","analyzedAt":"2026-08-14T07:17:31.569Z","schemaVersion":2},"datasetVersion":"2026-08-14T10:17:34.591Z"}