{"record":{"id":"22d858ecd012a094","repo":"apache/incubator-seata","slug":"can-not-connect-to-invalidaddress","errorCode":null,"errorMessage":"can not connect to [{invalidAddress}]","messagePattern":"can not connect to \\[(.+?)\\]","errorType":"exception","errorClass":"FrameworkException","httpStatus":null,"severity":"critical","filePath":"core/src/main/java/org/apache/seata/core/rpc/netty/NettyClientChannelManager.java","lineNumber":275,"sourceCode":"                            FrameworkErrorCode.NetConnect.getErrCode(),\n                            failedMap.keySet(),\n                            failedMap.values().stream()\n                                    .map(Throwable::getMessage)\n                                    .collect(Collectors.toSet()));\n                } else if (LOGGER.isDebugEnabled()) {\n                    failedMap.forEach((key, value) -> {\n                        LOGGER.error(\n                                \"{} can not connect to {} cause:{} trace information:\",\n                                FrameworkErrorCode.NetConnect.getErrCode(),\n                                key,\n                                value.getMessage(),\n                                value);\n                    });\n                }\n            }\n            if (availList.size() == failedMap.size()) {\n                String invalidAddress = StringUtils.join(failedMap.keySet().iterator(), \", \");\n                throw new FrameworkException(\"can not connect to [\" + invalidAddress + \"]\");\n            }\n        } finally {\n            if (CollectionUtils.isNotEmpty(channelAddress)) {\n                List<InetSocketAddress> aliveAddress = new ArrayList<>(channelAddress.size());\n                for (String address : channelAddress) {\n                    String[] array = NetUtil.splitIPPortStr(address);\n                    aliveAddress.add(new InetSocketAddress(array[0], Integer.parseInt(array[1])));\n                }\n                RegistryFactory.getInstance().refreshAliveLookup(transactionServiceGroup, aliveAddress);\n            } else {\n                RegistryFactory.getInstance().refreshAliveLookup(transactionServiceGroup, Collections.emptyList());\n            }\n        }\n    }\n\n    void invalidateObject(final String serverAddress, final Channel channel) throws Exception {\n        nettyClientKeyPool.invalidateObject(poolKeyMap.get(serverAddress), channel);\n    }","sourceCodeStart":257,"sourceCodeEnd":293,"githubUrl":"https://github.com/apache/incubator-seata/blob/e01f97c6db397165050caa6764020410c2c8199a/core/src/main/java/org/apache/seata/core/rpc/netty/NettyClientChannelManager.java#L257-L293","documentation":"FrameworkException from NettyClientChannelManager: the client had a list of available server addresses and attempted to connect/reconnect to all of them, and every single attempt failed (availList.size() == failedMap.size()). The message enumerates each failing address; the per-address causes were just logged above the throw.","triggerScenarios":"doReconnect iterating the registry's alive addresses and every connect (getChannel/createChannel) failing: server(s) down, wrong ports, firewall, or registration succeeding at the TCP level but RM registration failing on each.","commonSituations":"All seata-server replicas unavailable (rolling restart, crashloop); registry returning wrong port (container port vs host port mapping); network policy blocking the whole cluster; servers up but rejecting registration (version/auth incompatibility).","solutions":["Check the error log lines immediately above the exception: 'can not connect to <addr> cause:...' gives the per-server root cause","Verify each listed address:port is reachable from the client (nc -zv host port)","Fix container port mappings / registry-advertised ports so the listed addresses are the real connect targets","Bring at least one seata-server instance healthy; the client auto-reconnects on the next cycle"],"exampleFix":"# docker: before - registry sees host port 8091 but container uses 8091 mapped wrong\nSEATA_PORT=8091\n# after - ensure the registered port matches the exposed/reachable port\nSEATA_PORT=8091  # and publish -p 8091:8091","handlingStrategy":"retry","validationCode":"List<String> avail = channelManager.getAvailServerList(txServiceGroup);\nif (avail.isEmpty()) { /* wait for registry; skip */ }\n// optionally pre-check reachability of each address before reconnect","typeGuard":null,"tryCatchPattern":"catch (FrameworkException e) {\n    if (e.getMessage().startsWith(\"can not connect to [\")) {\n        String addrs = e.getMessage(); // parse failing addresses\n        // backoff-retry; page ops if all replicas stay unreachable\n    }\n}","preventionTips":["Run >= 2 seata-server replicas so one failure does not exhaust the list","Make registered ports equal the real reachable ports in containerized deploys","Alarm when the client's failed-address list equals the available list"],"tags":["network","reconnect","registry","client"],"backgroundTag":null,"analyzedSha":"e01f97c6db397165050caa6764020410c2c8199a","analyzedAt":"2026-08-14T10:23:53.097Z","schemaVersion":2},"datasetVersion":"2026-08-15T22:17:37.221Z"}