{"record":{"id":"e1393b5a49b7cb49","repo":"apache/incubator-seata","slug":"mcp-get-call-namespace-failed","errorCode":null,"errorMessage":"MCP GET Call NameSpace Failed.","messagePattern":"MCP GET Call NameSpace Failed\\.","errorType":"exception","errorClass":"ServiceCallException","httpStatus":null,"severity":"error","filePath":"console/src/main/java/org/apache/seata/mcp/service/impl/ConsoleRemoteServiceImpl.java","lineNumber":127,"sourceCode":"        HttpEntity<String> entity = new HttpEntity<>(headers);\n        String responseBody;\n        try {\n            ResponseEntity<String> response = executeRequest(url, HttpMethod.GET, entity);\n\n            responseBody = response.getBody();\n\n            if (!response.getStatusCode().is2xxSuccessful()) {\n                String errorMsg = String.format(\n                        \"MCP GET request failed with status: %s, response: %s\",\n                        response.getStatusCode(), response.getBody());\n                LOGGER.warn(errorMsg);\n                throw new ServiceCallException(errorMsg, response.getStatusCode());\n            }\n            return responseBody;\n        } catch (RestClientException e) {\n            String errorMsg = \"MCP GET Call NameSpace Failed.\";\n            LOGGER.error(errorMsg, e);\n            throw new ServiceCallException(errorMsg);\n        }\n    }\n\n    @Override\n    public String getCallTC(\n            NameSpaceDetail nameSpaceDetail,\n            String path,\n            Object objectQueryParams,\n            Map<String, String> queryParams,\n            HttpHeaders headers) {\n        if (headers == null) {\n            headers = new HttpHeaders();\n        }\n        if (nameSpaceDetail == null || !nameSpaceDetail.isValid()) {\n            return \"If you have not specified the namespace of the TC/Server, specify the namespace first\";\n        } else {\n            setNamespaceHeaderAndQueryParam(nameSpaceDetail, headers, queryParams);\n        }","sourceCodeStart":109,"sourceCodeEnd":145,"githubUrl":"https://github.com/apache/incubator-seata/blob/e01f97c6db397165050caa6764020410c2c8199a/console/src/main/java/org/apache/seata/mcp/service/impl/ConsoleRemoteServiceImpl.java#L109-L145","documentation":"getCallNameSpace wraps any RestClientException from the HTTP GET to the naming server into ServiceCallException('MCP GET Call NameSpace Failed.'). Unlike the non-2xx branch, this fires when the request never completes successfully: connection refused, read timeout, I/O error, or unresolvable host — the underlying exception is logged but not attached to the thrown one.","triggerScenarios":"Calling getCallNameSpace while the naming server is down/unreachable, the configured addr points to a wrong port, DNS fails, or the request exceeds the RestClient's read/connect timeout.","commonSituations":"Naming server not started or still booting when the console serves an MCP query; NamingServerProperties.addr pointing at a stale address after infrastructure changes; firewall dropping the connection; overloaded naming server causing read timeouts.","solutions":["Check naming server health on the configured addr (curl http://<addr>/health or the console UI)","Fix naming-server.addr if stale — remember getNamingServerUrl picks randomly among the list, so one bad entry fails intermittently","Increase the REST client read/connect timeout if the naming server is slow but alive","Start/restart the naming server and retry the console operation"],"exampleFix":null,"handlingStrategy":"retry","validationCode":"for (String a : addrs) { if (ping(a)) return; } throw new IllegalStateException(\"all naming servers unreachable\");","typeGuard":null,"tryCatchPattern":"try { call(); } catch (ServiceCallException e) { if (e.getCause() == null || !hasStatus(e)) backoffAndRetryOnce(); else throw e; }","preventionTips":["Health-check every addr entry in naming-server.addr","Remember getNamingServerUrl picks randomly — one bad node causes intermittent failures","Set sane connect/read timeouts and retry with backoff"],"tags":["seata","console","naming-server","network"],"backgroundTag":null,"analyzedSha":"e01f97c6db397165050caa6764020410c2c8199a","analyzedAt":"2026-08-14T10:23:53.097Z","schemaVersion":2},"datasetVersion":"2026-08-15T22:17:37.221Z"}