{"record":{"id":"20652522d51ecd37","repo":"apache/incubator-seata","slug":"register-s-error-errmsg-s","errorCode":null,"errorMessage":"register %s error, errMsg:%s","messagePattern":"register (.+?) error, errMsg:(.+?)","errorType":"exception","errorClass":"FrameworkException","httpStatus":null,"severity":"error","filePath":"core/src/main/java/org/apache/seata/core/rpc/netty/NettyPoolableFactory.java","lineNumber":78,"sourceCode":"        Object response;\n        Channel channelToServer = null;\n        if (key.getMessage() == null) {\n            throw new FrameworkException(\n                    \"register msg is null, role:\" + key.getTransactionRole().name());\n        }\n        try {\n            response = rpcRemotingClient.sendSyncRequest(tmpChannel, key.getMessage());\n            if (!isRegisterSuccess(response, key.getTransactionRole())) {\n                rpcRemotingClient.onRegisterMsgFail(key.getAddress(), tmpChannel, response, key.getMessage());\n            } else {\n                channelToServer = tmpChannel;\n                rpcRemotingClient.onRegisterMsgSuccess(key.getAddress(), tmpChannel, response, key.getMessage());\n            }\n        } catch (Exception exx) {\n            if (tmpChannel != null) {\n                tmpChannel.close();\n            }\n            throw new FrameworkException(\n                    \"register \" + key.getTransactionRole().name() + \" error, errMsg:\" + exx.getMessage());\n        }\n        if (LOGGER.isInfoEnabled()) {\n            LOGGER.info(\"register success, cost \" + (System.currentTimeMillis() - start) + \" ms, version:\"\n                    + getVersion(response, key.getTransactionRole()) + \",role:\"\n                    + key.getTransactionRole().name() + \",channel:\"\n                    + channelToServer);\n        }\n        return channelToServer;\n    }\n\n    private boolean isRegisterSuccess(Object response, NettyPoolKey.TransactionRole transactionRole) {\n        if (response == null) {\n            return false;\n        }\n        if (transactionRole.equals(NettyPoolKey.TransactionRole.TMROLE)) {\n            if (!(response instanceof RegisterTMResponse)) {\n                return false;","sourceCodeStart":60,"sourceCodeEnd":96,"githubUrl":"https://github.com/apache/incubator-seata/blob/e01f97c6db397165050caa6764020410c2c8199a/core/src/main/java/org/apache/seata/core/rpc/netty/NettyPoolableFactory.java#L60-L96","documentation":"FrameworkException from NettyPoolableFactory.makeObject: the channel was created and the register request sent, but sending/processing it threw (sendSyncRequest failure or the register-fail callback itself), so the temp channel is closed and this exception wraps the original cause's message. Role in the message (TM/RM) tells you which register failed.","triggerScenarios":"During pool object creation: rpcRemotingClient.sendSyncRequest(tmpChannel, registerRequest) throws (timeout, connection reset), or isRegisterSuccess is false and onRegisterMsgFail throws (server rejected registration).","commonSituations":"Server rejects registration (auth enabled without matching client credentials, version-incompatible register response); connect succeeded at TCP level but server closed the connection mid-handshake; high load making the sync register exceed rpcRequestTimeout; server still initializing when client registers.","solutions":["Read the nested errMsg: timeouts -> raise rpc request timeout; rejected -> fix auth/credentials; reset -> check server logs for the close reason","Align username/password between seata-server security config and the client","Align client and server versions so the register response parses and validates","Delay client traffic until the server is fully up, or rely on the client's background reconnect"],"exampleFix":"# before: server requires auth, client sends none\n# client application.yml — add:\nseata:\n  client:\n    tm: { username: seata, password: seata }\n    rm: { username: seata, password: seata }","handlingStrategy":"retry","validationCode":"// ensure credentials present before first borrow\nif (serverAuthEnabled && clientUsername == null) {\n    throw new IllegalStateException(\"seata server auth is on; set client username/password\");\n}","typeGuard":null,"tryCatchPattern":"catch (FrameworkException e) {\n    if (e.getMessage().startsWith(\"register TM\") || e.getMessage().startsWith(\"register RM\")) {\n        String cause = e.getMessage(); // errMsg suffix carries root cause\n        // fix auth/version/timeout per cause; reconnect retries registration\n    }\n}","preventionTips":["Keep client auth credentials in sync with the server's security config","Set rpc request timeouts above expected register latency","Gate first business transactions on successful registration logs"],"tags":["registration","auth","timeout","client"],"backgroundTag":null,"analyzedSha":"e01f97c6db397165050caa6764020410c2c8199a","analyzedAt":"2026-08-14T10:23:53.097Z","schemaVersion":2},"datasetVersion":"2026-08-15T22:17:37.221Z"}