{"record":{"id":"954c116d1ae99946","repo":"apache/incubator-seata","slug":"no-naming-servers-addr-configured","errorCode":null,"errorMessage":"No naming servers addr configured","messagePattern":"No naming servers addr configured","errorType":"exception","errorClass":"IllegalStateException","httpStatus":null,"severity":"error","filePath":"console/src/main/java/org/apache/seata/mcp/core/props/NamingServerProperties.java","lineNumber":39,"sourceCode":"\nimport java.util.Collections;\nimport java.util.List;\nimport java.util.concurrent.ThreadLocalRandom;\n\n@ConfigurationProperties(prefix = \"console.namingserver\")\n@Component\npublic class NamingServerProperties {\n\n    /**\n     * http, https\n     */\n    private String protocol = \"http\";\n\n    private List<String> addr = Collections.singletonList(\"127.0.0.1:8081\");\n\n    public String getNamingServerUrl() {\n        if (addr == null || addr.isEmpty()) {\n            throw new IllegalStateException(\"No naming servers addr configured\");\n        }\n        int index = ThreadLocalRandom.current().nextInt(addr.size());\n        return protocol + \"://\" + addr.get(index);\n    }\n\n    public void setAddr(List<String> addr) {\n        this.addr = addr;\n    }\n\n    public void setProtocol(String protocol) {\n        this.protocol = protocol;\n    }\n}\n","sourceCodeStart":21,"sourceCodeEnd":53,"githubUrl":"https://github.com/apache/incubator-seata/blob/e01f97c6db397165050caa6764020410c2c8199a/console/src/main/java/org/apache/seata/mcp/core/props/NamingServerProperties.java#L21-L53","documentation":"NamingServerProperties.getNamingServerUrl() throws IllegalStateException when the configured naming-server address list is null or empty. The console's remote service uses this URL to reach the seata naming server for TC/namespace lookups; with no address there is no endpoint to call, so it fails fast on first remote call.","triggerScenarios":"Setting seata.console or MCP naming-server properties with an explicitly empty list (`naming-server.addr: []` / `=` with no value) — the default is 127.0.0.1:8081, so this only fires when the property is set to empty or the setter is called with an empty/null list programmatically.","commonSituations":"Template-based deployments that render an empty addr placeholder; YAML `addr:` key with a blank value binding to an empty list; disabling the naming server by clearing its address instead of removing the property.","solutions":["Set at least one address: `seata.mcp.naming-server.addr: 127.0.0.1:8081` (or your naming-server host:port)","Remove the addr key entirely to fall back to the 127.0.0.1:8081 default if that is acceptable","If deploying without a naming server, avoid code paths that call getCallNameSpace/getCallTC remote lookups","Ensure the value parses as a list — a blank string may bind to an empty list rather than null"],"exampleFix":"# before\nseata:\n  mcp:\n    naming-server:\n      addr:   # binds empty -> throws on use\n\n# after\nseata:\n  mcp:\n    naming-server:\n      addr: 10.0.0.5:8081,10.0.0.6:8081","handlingStrategy":"validation","validationCode":"if (addr == null || addr.isEmpty()) throw new IllegalStateException(\"naming-server addr must list at least one host:port\");","typeGuard":"boolean hasNamingServerAddr(List<String> addr) { return addr != null && !addr.isEmpty(); }","tryCatchPattern":"try { url = props.getNamingServerUrl(); } catch (IllegalStateException e) { url = \"http://127.0.0.1:8081\"; log.warn(\"no naming addr, using default\", e); }","preventionTips":["Never render an empty addr value from deployment templates","Default the property to 127.0.0.1:8081 rather than clearing it","Validate rendered config in CI before rollout"],"tags":["seata","naming-server","config","console"],"backgroundTag":null,"analyzedSha":"e01f97c6db397165050caa6764020410c2c8199a","analyzedAt":"2026-08-14T10:23:53.097Z","schemaVersion":2},"datasetVersion":"2026-08-15T22:17:37.221Z"}