{"record":{"id":"667887490d9d7bba","repo":"apache/incubator-seata","slug":"can-not-register-rm-err-s","errorCode":null,"errorMessage":"can not register RM,err:%s","messagePattern":"can not register RM,err:(.+?)","errorType":"exception","errorClass":"FrameworkException","httpStatus":null,"severity":"error","filePath":"core/src/main/java/org/apache/seata/core/rpc/netty/NettyClientChannelManager.java","lineNumber":353,"sourceCode":"        if (removed && LOGGER.isInfoEnabled()) {\n            LOGGER.info(\"Cleaned up channel metadata for disconnected address: {}\", serverAddress);\n        }\n    }\n\n    private Channel doConnect(String serverAddress) {\n        Channel channelToServer = channels.get(serverAddress);\n        if (channelToServer != null && channelToServer.isActive()) {\n            return channelToServer;\n        }\n        Channel channelFromPool;\n        try {\n            NettyPoolKey currentPoolKey = poolKeyFunction.apply(serverAddress);\n            poolKeyMap.put(serverAddress, currentPoolKey);\n            channelFromPool = nettyClientKeyPool.borrowObject(currentPoolKey);\n            channels.put(serverAddress, channelFromPool);\n        } catch (Exception exx) {\n            LOGGER.error(\"{} register RM failed.\", FrameworkErrorCode.RegisterRM.getErrCode(), exx);\n            throw new FrameworkException(\"can not register RM,err:\" + exx.getMessage());\n        }\n        return channelFromPool;\n    }\n\n    private List<String> getAvailServerList(String transactionServiceGroup) throws Exception {\n        List<InetSocketAddress> availInetSocketAddressList =\n                RegistryFactory.getInstance().lookup(transactionServiceGroup);\n        if (CollectionUtils.isEmpty(availInetSocketAddressList)) {\n            return Collections.emptyList();\n        }\n\n        return availInetSocketAddressList.stream().map(NetUtil::toStringAddress).collect(Collectors.toList());\n    }\n\n    private Channel getExistAliveChannel(Channel rmChannel, String serverAddress) {\n        if (rmChannel.isActive()) {\n            return rmChannel;\n        } else {","sourceCodeStart":335,"sourceCodeEnd":371,"githubUrl":"https://github.com/apache/incubator-seata/blob/e01f97c6db397165050caa6764020410c2c8199a/core/src/main/java/org/apache/seata/core/rpc/netty/NettyClientChannelManager.java#L335-L371","documentation":"FrameworkException from NettyClientChannelManager.acquireChannel: borrowing a channel from the Netty channel pool failed, which in Seata means the connect plus TM/RM register handshake inside NettyPoolableFactory.makeObject threw. The message appends the underlying cause's message; the code above also logs it with the RegisterRM error code.","triggerScenarios":"Calling an RM API (branch register, lock queries, SQL undo operations) that needs a server channel while pool.borrowObject fails: server unreachable, register request rejected/timed out, or the pool's register validation (isRegisterSuccess) failed and onRegisterMsgFail threw.","commonSituations":"seata-server restarted and the client's cached pool keys are stale; registration rejected due to authentication (server enabled auth, client missing username/password); version-incompatible register responses; brief outage during the first business SQL after startup.","solutions":["Check the preceding 'register RM failed' log entry and its cause — it names the real failure","Confirm seata-server is running and accepting registrations; test with a fresh client start","Align auth config: if the server requires username/password, set them on the client","Align client/server versions and retry the business operation after the client reconnects"],"exampleFix":"# application.yml — server has auth enabled\nseata:\n  client:\n    tm:\n      username: seata\n      password: seata\n    rm:\n      username: seata\n      password: seata","handlingStrategy":"retry","validationCode":"// before RM operations, confirm a live channel exists\nChannel ch = channelManager.acquireChannel(serverAddress); // throws with cause if register fails\n","typeGuard":null,"tryCatchPattern":"catch (FrameworkException e) {\n    if (e.getMessage().startsWith(\"can not register RM\")) {\n        // inspect cause: auth/timeout/unreachable; fix and let background reconnect re-register\n    }\n}","preventionTips":["Keep client credentials in sync with server auth config","Retain server availability through RM-heavy traffic windows","Retry business operations once after re-registration succeeds"],"tags":["registration","rm","pool","client"],"backgroundTag":null,"analyzedSha":"e01f97c6db397165050caa6764020410c2c8199a","analyzedAt":"2026-08-14T10:23:53.097Z","schemaVersion":2},"datasetVersion":"2026-08-15T17:31:12.345Z"}