You are viewing a plain text version of this content. The canonical link for it is here.
Posted to notifications@seata.apache.org by "lu1235353884 (via GitHub)" <gi...@apache.org> on 2024/04/30 03:30:30 UTC

[I] [pc.netty.AbstractNettyRemoting]: 0104 ==> java.lang.RuntimeException: channel is error. [incubator-seata]

lu1235353884 opened a new issue, #6515:
URL: https://github.com/apache/incubator-seata/issues/6515

   <!-- Please do not use this issue template to report security vulnerabilities but refer to our [security policy](https://github.com/seata/seata/security/policy). -->
   
   - [ ] I have searched the [issues](https://github.com/seata/seata/issues) of this repository and believe that this is not a duplicate.
   
   ### Ⅰ. Issue Description
   项目中使用seataAT模式解决分布式事务,在全局事务开始时就出现RPC timeout 30000,导致全局事务开启失败;
   项目中使用restful实现分布式服务间服务调用,nacos做注册中心,seata解决分布式事务;
   ### Ⅱ. Describe what happened
   项目中使用seata解决分布式事务,使用过程中偶现该问题,在全局事务开始时就出现RPC timeout 30000;
   
   seata client 报错如下:wait response error:cost 30000,导致全局事务开启失败。
   Seata server报错如下:
     
   00:20:21.830  INFO --- [     batchLoggerPrint_1_1] [ocessor.server.BatchLogHandler] [                 run]  [] : receive msg[single]: GlobalBeginRequest{transactionName=XXXXXX', timeout=6000000}, clientIp: XXXXXX, vgroup: default_tx_group
   00:20:28.930  INFO --- [ettyServerNIOWorker_1_4_8] [ty.AbstractNettyRemotingServer] [    handleDisconnect]  [] : xxxxx:xx to server channel inactive.
   00:20:28.930  INFO --- [ettyServerNIOWorker_1_4_8] [ty.AbstractNettyRemotingServer] [    handleDisconnect]  [] : remove channel:[id: 0x06609bc3, L:/10.192.19.108:8091 ! R:/10.192.23.34:48020]context:RpcContext{applicationId='APC', transactionServiceGroup='default_tx_group', clientId='APC:XXXXX:XX', channel=[id: 0x06609bc3, L:/10.192.19.108:8091 ! R:/10.192.23.34:48020], resourceSets=null}
   00:20:30.354  INFO --- [verHandlerThread_1_42_500] [coordinator.DefaultCoordinator] [       doGlobalBegin]  [XXXXXX:XX:6296547817037284291] : Begin new global transaction applicationId: APC,transactionServiceGroup: default_tx_group, transactionName: wo.op.report.picking.return.create,timeout:6000000,xid:XXXXXXX:XX:6296547817037284291
   00:20:30.355 ERROR --- [verHandlerThread_1_42_500] [pc.netty.AbstractNettyRemoting] [bda$processMessage$2]  [XXXXXXX:XX:6296547817037284291] : 0104
   ==>
   java.lang.RuntimeException: channel is error.
   	at io.seata.core.rpc.netty.AbstractNettyRemotingServer.sendAsyncResponse(AbstractNettyRemotingServer.java:106) ~[seata-core-1.7.0.jar:1.7.0]
   	at io.seata.core.rpc.processor.server.ServerOnRequestProcessor.onRequestMessage(ServerOnRequestProcessor.java:207) ~[seata-core-1.7.0.jar:1.7.0]
   	at io.seata.core.rpc.processor.server.ServerOnRequestProcessor.process(ServerOnRequestProcessor.java:122) ~[seata-core-1.7.0.jar:1.7.0]
   	at io.seata.core.rpc.netty.AbstractNettyRemoting.lambda$processMessage$2(AbstractNettyRemoting.java:281) ~[seata-core-1.7.0.jar:1.7.0]
   	at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1149) ~[na:1.8.0_342]
   	at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:624) ~[na:1.8.0_342]
   	at io.netty.util.concurrent.FastThreadLocalRunnable.run(FastThreadLocalRunnable.java:30) ~[netty-common-4.1.76.Final.jar:4.1.76.Final]
   	at java.lang.Thread.run(Thread.java:750) ~[na:1.8.0_342]
   <==
   Just paste your stack trace here!
   ```
   
   
   ### Ⅲ. Describe what you expected to happen
   
   
   ### Ⅳ. How to reproduce it (as minimally and precisely as possible)
   
   1. xxx
   2. xxx
   3. xxx
   
   Minimal yet complete reproducer code (or URL to code):
   
   
   
   ### Ⅴ. Anything else we need to know?
   
   
   ### Ⅵ. Environment:
   
   JDK version 1.8:
   Seata version 1.7.0:
   OS微软云平台:
   mysql 5.7
   


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: notifications-unsubscribe@seata.apache.org.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


---------------------------------------------------------------------
To unsubscribe, e-mail: notifications-unsubscribe@seata.apache.org
For additional commands, e-mail: notifications-help@seata.apache.org


Re: [I] [pc.netty.AbstractNettyRemoting]: 0104 ==> java.lang.RuntimeException: channel is error. [incubator-seata]

Posted by "slievrly (via GitHub)" <gi...@apache.org>.
slievrly commented on issue #6515:
URL: https://github.com/apache/incubator-seata/issues/6515#issuecomment-2084489368

   Check whether the application is restarting and publishing.


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: notifications-unsubscribe@seata.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


---------------------------------------------------------------------
To unsubscribe, e-mail: notifications-unsubscribe@seata.apache.org
For additional commands, e-mail: notifications-help@seata.apache.org


Re: [I] [pc.netty.AbstractNettyRemoting]: 0104 ==> java.lang.RuntimeException: channel is error. [incubator-seata]

Posted by "xingfudeshi (via GitHub)" <gi...@apache.org>.
xingfudeshi closed issue #6515: [pc.netty.AbstractNettyRemoting]: 0104 ==> java.lang.RuntimeException: channel is error.
URL: https://github.com/apache/incubator-seata/issues/6515


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: notifications-unsubscribe@seata.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


---------------------------------------------------------------------
To unsubscribe, e-mail: notifications-unsubscribe@seata.apache.org
For additional commands, e-mail: notifications-help@seata.apache.org


Re: [I] [pc.netty.AbstractNettyRemoting]: 0104 ==> java.lang.RuntimeException: channel is error. [incubator-seata]

Posted by "erenboss (via GitHub)" <gi...@apache.org>.
erenboss commented on issue #6515:
URL: https://github.com/apache/incubator-seata/issues/6515#issuecomment-2350776186

   @funky-eyes @slievrly 我们也出现这个问题,我们担心升级2.x版本会有更多的问题,在低版本里面会存在这个问题吗
   原来我们是1.4.2版本,由于其他的一些bug升级到1.7.1,在其中的版本可以选择吗


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: notifications-unsubscribe@seata.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


---------------------------------------------------------------------
To unsubscribe, e-mail: notifications-unsubscribe@seata.apache.org
For additional commands, e-mail: notifications-help@seata.apache.org


Re: [I] [pc.netty.AbstractNettyRemoting]: 0104 ==> java.lang.RuntimeException: channel is error. [incubator-seata]

Posted by "YeonCheolGit (via GitHub)" <gi...@apache.org>.
YeonCheolGit commented on issue #6515:
URL: https://github.com/apache/incubator-seata/issues/6515#issuecomment-2094862144

   @funky-eyes @slievrly 
   
   I guess that error message from this [line](https://github.com/apache/incubator-seata/blob/37e7746ee6412d1f33e315ce1abd961413fb8fb4/core/src/main/java/org/apache/seata/core/rpc/netty/AbstractNettyRemotingServer.java#L95)
   
   What about fix two minor things?
   
   1. Chagne error message from "channel is error." to "Unable to find the client's channel for response | responseBody: " + msg". I guess this issue is about cannot find channel context when response due to channel context from local context is deleted. So i think message that i suggest is more clear 😅 
   
   2. For clarity, refactor code using return early pattern
   ```
   if (channel == null) { RuntimeException("") }
   RpcMessage rpcMsg = buildResponseMessage(rpcMessage, msg, msg instanceof HeartbeatMessage
   ...
   ```
   
   If these looks okay then I would create a PR.
   


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: notifications-unsubscribe@seata.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


---------------------------------------------------------------------
To unsubscribe, e-mail: notifications-unsubscribe@seata.apache.org
For additional commands, e-mail: notifications-help@seata.apache.org


Re: [I] [pc.netty.AbstractNettyRemoting]: 0104 ==> java.lang.RuntimeException: channel is error. [incubator-seata]

Posted by "funky-eyes (via GitHub)" <gi...@apache.org>.
funky-eyes commented on issue #6515:
URL: https://github.com/apache/incubator-seata/issues/6515#issuecomment-2084314346

   客户端连接断开了,找不到channel可以下发请求
   The client end connection is disconnected, and the channel cannot be found to issue a request.


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: notifications-unsubscribe@seata.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


---------------------------------------------------------------------
To unsubscribe, e-mail: notifications-unsubscribe@seata.apache.org
For additional commands, e-mail: notifications-help@seata.apache.org