Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

客户端注册TM参数access-key问题 #5080

Closed
1 task
zhouziqian opened this issue Nov 17, 2022 · 18 comments · Fixed by #5097
Closed
1 task

客户端注册TM参数access-key问题 #5080

zhouziqian opened this issue Nov 17, 2022 · 18 comments · Fixed by #5097
Assignees
Labels
task: help-wanted Extra attention is needed

Comments

@zhouziqian
Copy link

  • I have searched the issues of this repository and believe that this is not a duplicate.

Ⅰ. Issue Description

客户端配置access-key后注册TM会在服务端io.seata.server.auth.DefaultCheckAuthHandler#doRegTransactionManagerCheck接受到,但服务端重启后客户端再次注册到服务端时access-key为空

Ⅱ. Describe what happened

服务端重启后,客户端再次注册则会出现此问题

Ⅲ. Environment:

  • JDK version : 11
  • Seata version: 1.5.2
  • OS : windows 10
@funky-eyes
Copy link
Contributor

access-key目前在开源版seata是无用的,我们会排查下这个问题,建议你把相关日志贴上来,然后想请问目前你使用这个的原因是什么?

@zhouziqian
Copy link
Author

access-key目前在开源版seata是无用的,我们会排查下这个问题,建议你把相关日志贴上来,然后想请问目前你使用这个的原因是什么?

我想用access-key传到server做认证,但客户端在未重启的情况下第二次注册服务端就不带这个参数(第二次注册的原因可能是服务端重启或客户端第一次注册未成功)

@funky-eyes
Copy link
Contributor

服务端重启肯定是丢失了的,这个需要客户端的reconnect线程去重连的时候把access-key带上,很有可能之前的设计上认为重连(不知道tc是网络抖动还是真的宕机了)只是重连,而不是一个全新的需要认证的连接,我们有相关同学已经介入排查了
@renliangyu857

@zhouziqian
Copy link
Author

服务端重启肯定是丢失了的,这个需要客户端的reconnect线程去重连的时候把access-key带上,很有可能之前的设计上认为重连(不知道tc是网络抖动还是真的宕机了)只是重连,而不是一个全新的需要认证的连接,我们有相关同学已经介入排查了 @renliangyu857

非常感谢,如果排查后能给出上线时间就好了

@funky-eyes
Copy link
Contributor

服务端重启肯定是丢失了的,这个需要客户端的reconnect线程去重连的时候把access-key带上,很有可能之前的设计上认为重连(不知道tc是网络抖动还是真的宕机了)只是重连,而不是一个全新的需要认证的连接,我们有相关同学已经介入排查了 @renliangyu857

非常感谢,如果排查后能给出上线时间就好了

这个时间上我们尽量在1.6发版前带上,你们这边做过seata的企业登记了吗? #1246

@zhouziqian
Copy link
Author

服务端重启肯定是丢失了的,这个需要客户端的reconnect线程去重连的时候把access-key带上,很有可能之前的设计上认为重连(不知道tc是网络抖动还是真的宕机了)只是重连,而不是一个全新的需要认证的连接,我们有相关同学已经介入排查了 @renliangyu857

非常感谢,如果排查后能给出上线时间就好了

这个时间上我们尽量在1.6发版前带上,你们这边做过seata的企业登记了吗? #1246

还没有登记呢,我们正在调研阶段,能否上个小的版本解决这个问题?1.6大概什么时候发版呢?

@funky-eyes
Copy link
Contributor

服务端重启肯定是丢失了的,这个需要客户端的reconnect线程去重连的时候把access-key带上,很有可能之前的设计上认为重连(不知道tc是网络抖动还是真的宕机了)只是重连,而不是一个全新的需要认证的连接,我们有相关同学已经介入排查了 @renliangyu857

非常感谢,如果排查后能给出上线时间就好了

这个时间上我们尽量在1.6发版前带上,你们这边做过seata的企业登记了吗? #1246

还没有登记呢,我们正在调研阶段,能否上个小的版本解决这个问题?1.6大概什么时候发版呢?

回归测试顺利的话 11月底前

@zhouziqian
Copy link
Author

非常感谢,我们先用其它方案解决这个问题。

@funky-eyes funky-eyes added the task: help-wanted Extra attention is needed label Nov 17, 2022
@funky-eyes
Copy link
Contributor

issue先打开吧,等问题确认存在并修复或者不存在再进行close

@funky-eyes funky-eyes reopened this Nov 17, 2022
@renliangyu857
Copy link
Contributor

please assign it to me

@funky-eyes
Copy link
Contributor

看代码就是复用第一次连接的registryrequest,rm本身就没有accesskey和secretkey的传递,方便看下重启tc后tm重新连接的日志吗?tc侧和tm侧都发一下

@zhouziqian
Copy link
Author

zhouziqian commented Nov 18, 2022

看代码就是复用第一次连接的registryrequest,rm本身就没有accesskey和secretkey的传递,方便看下重启tc后tm重新连接的日志吗?tc侧和tm侧都发一下

rm确实没有accessKey和secretKey。我下面给出tm和tc的日志(TC重启一次后的)。
TM

2022-11-18 10:45:39.978  INFO 2900 --- [eoutChecker_1_1] i.s.c.r.netty.NettyClientChannelManager  : will connect to 192.168.56.1:8091
2022-11-18 10:45:39.978  INFO 2900 --- [eoutChecker_1_1] i.s.core.rpc.netty.NettyPoolableFactory  : NettyPool create channel to transactionRole:TMROLE,address:192.168.56.1:8091,msg:< RegisterTMRequest{applicationId='account', transactionServiceGroup='default_tx_group'} >
2022-11-18 10:45:40.178  INFO 2900 --- [eoutChecker_1_1] i.s.c.rpc.netty.TmNettyRemotingClient    : register TM success. client version:1.5.2, server version:1.5.2,channel:[id: 0x11178f21, L:/192.168.56.1:51203 - R:/192.168.56.1:8091]
2022-11-18 10:45:40.178  INFO 2900 --- [eoutChecker_1_1] i.s.core.rpc.netty.NettyPoolableFactory  : register success, cost 198 ms, version:1.5.2,role:TMROLE,channel:[id: 0x11178f21, L:/192.168.56.1:51203 - R:/192.168.56.1:8091]
2022-11-18 10:45:41.784  INFO 2900 --- [eoutChecker_2_1] i.s.c.r.netty.NettyClientChannelManager  : will connect to 192.168.56.1:8091
2022-11-18 10:45:41.784  INFO 2900 --- [eoutChecker_2_1] i.s.c.rpc.netty.RmNettyRemotingClient    : RM will register :jdbc:mysql://10.122.23.138:3306/account
2022-11-18 10:45:41.784  INFO 2900 --- [eoutChecker_2_1] i.s.core.rpc.netty.NettyPoolableFactory  : NettyPool create channel to transactionRole:RMROLE,address:192.168.56.1:8091,msg:< RegisterRMRequest{resourceIds='jdbc:mysql://url:3306/account', applicationId='account', transactionServiceGroup='default_tx_group'} >
2022-11-18 10:45:41.805  INFO 2900 --- [eoutChecker_2_1] i.s.c.rpc.netty.RmNettyRemotingClient    : register RM success. client version:1.5.2, server version:1.5.2,channel:[id: 0x35d6626f, L:/192.168.56.1:51204 - R:/192.168.56.1:8091]
2022-11-18 10:45:41.805  INFO 2900 --- [eoutChecker_2_1] i.s.core.rpc.netty.NettyPoolableFactory  : register success, cost 19 ms, version:1.5.2,role:RMROLE,channel:[id: 0x35d6626f, L:/192.168.56.1:51204 - R:/192.168.56.1:8091]

TC

10:45:26.985  INFO --- [                     main] com.alibaba.nacos.client.naming          : [BEAT] adding beat: BeatInfo{port=8091, ip='192.168.56.1', weight=1.0, serviceName='SEATA_GROUP@@lmp-seata', cluster='default', metadata={}, scheduled=false, period=5000, stopped=false} to beat map.
10:45:26.987  INFO --- [                     main] com.alibaba.nacos.client.naming          : [REGISTER-SERVICE] 22cb73e9-6967-4b6c-af91-a238e7cc3f94 registering service SEATA_GROUP@@lmp-seata with instance: Instance{instanceId='null', ip='192.168.56.1', port=8091, weight=1.0, healthy=true, enabled=true, ephemeral=true, clusterName='default', serviceName='null', metadata={}}
10:45:26.995  INFO --- [                     main] io.seata.server.ServerRunner             : seata server started in 4765 millSeconds
10:45:40.184  INFO --- [ttyServerNIOWorker_1_1_16] i.s.c.r.processor.server.RegTmProcessor  : TM register success,message:RegisterTMRequest{applicationId='account', transactionServiceGroup='default_tx_group'},channel:[id: 0x1f55dc6d, L:/192.168.56.1:8091 - R:/192.168.56.1:51203],client version:1.5.2
10:45:41.799  INFO --- [rverHandlerThread_1_1_500] i.s.c.r.processor.server.RegRmProcessor  : RM register success,message:RegisterRMRequest{resourceIds='jdbc:mysql://url:3306/account', applicationId='account', transactionServiceGroup='default_tx_group'},channel:[id: 0xd2937d06, L:/192.168.56.1:8091 - R:/192.168.56.1:51204],client version:1.5.2

@renliangyu857
Copy link
Contributor

看代码就是复用第一次连接的registryrequest,rm本身就没有accesskey和secretkey的传递,方便看下重启tc后tm重新连接的日志吗?tc侧和tm侧都发一下

rm确实没有accessKey和secretKey。我下面给出tm和tc的日志(TC重启一次后的)。 TM 2022-11-18 10:45:39.978 INFO 2900 --- [eoutChecker_1_1] i.s.c.r.netty.NettyClientChannelManager : will connect to 192.168.56.1:8091 2022-11-18 10:45:39.978 INFO 2900 --- [eoutChecker_1_1] i.s.core.rpc.netty.NettyPoolableFactory : NettyPool create channel to transactionRole:TMROLE,address:192.168.56.1:8091,msg:< RegisterTMRequest{applicationId='account', transactionServiceGroup='default_tx_group'} > 2022-11-18 10:45:40.178 INFO 2900 --- [eoutChecker_1_1] i.s.c.rpc.netty.TmNettyRemotingClient : register TM success. client version:1.5.2, server version:1.5.2,channel:[id: 0x11178f21, L:/192.168.56.1:51203 - R:/192.168.56.1:8091] 2022-11-18 10:45:40.178 INFO 2900 --- [eoutChecker_1_1] i.s.core.rpc.netty.NettyPoolableFactory : register success, cost 198 ms, version:1.5.2,role:TMROLE,channel:[id: 0x11178f21, L:/192.168.56.1:51203 - R:/192.168.56.1:8091] 2022-11-18 10:45:41.784 INFO 2900 --- [eoutChecker_2_1] i.s.c.r.netty.NettyClientChannelManager : will connect to 192.168.56.1:8091 2022-11-18 10:45:41.784 INFO 2900 --- [eoutChecker_2_1] i.s.c.rpc.netty.RmNettyRemotingClient : RM will register :jdbc:mysql://10.122.23.138:3306/account 2022-11-18 10:45:41.784 INFO 2900 --- [eoutChecker_2_1] i.s.core.rpc.netty.NettyPoolableFactory : NettyPool create channel to transactionRole:RMROLE,address:192.168.56.1:8091,msg:< RegisterRMRequest{resourceIds='jdbc:mysql://url:3306/account', applicationId='account', transactionServiceGroup='default_tx_group'} > 2022-11-18 10:45:41.805 INFO 2900 --- [eoutChecker_2_1] i.s.c.rpc.netty.RmNettyRemotingClient : register RM success. client version:1.5.2, server version:1.5.2,channel:[id: 0x35d6626f, L:/192.168.56.1:51204 - R:/192.168.56.1:8091] 2022-11-18 10:45:41.805 INFO 2900 --- [eoutChecker_2_1] i.s.core.rpc.netty.NettyPoolableFactory : register success, cost 19 ms, version:1.5.2,role:RMROLE,channel:[id: 0x35d6626f, L:/192.168.56.1:51204 - R:/192.168.56.1:8091]

TC 10:45:26.985 INFO --- [ main] com.alibaba.nacos.client.naming : [BEAT] adding beat: BeatInfo{port=8091, ip='192.168.56.1', weight=1.0, serviceName='SEATA_GROUP@@lmp-seata', cluster='default', metadata={}, scheduled=false, period=5000, stopped=false} to beat map. 10:45:26.987 INFO --- [ main] com.alibaba.nacos.client.naming : [REGISTER-SERVICE] 22cb73e9-6967-4b6c-af91-a238e7cc3f94 registering service SEATA_GROUP@@lmp-seata with instance: Instance{instanceId='null', ip='192.168.56.1', port=8091, weight=1.0, healthy=true, enabled=true, ephemeral=true, clusterName='default', serviceName='null', metadata={}} 10:45:26.995 INFO --- [ main] io.seata.server.ServerRunner : seata server started in 4765 millSeconds 10:45:40.184 INFO --- [ttyServerNIOWorker_1_1_16] i.s.c.r.processor.server.RegTmProcessor : TM register success,message:RegisterTMRequest{applicationId='account', transactionServiceGroup='default_tx_group'},channel:[id: 0x1f55dc6d, L:/192.168.56.1:8091 - R:/192.168.56.1:51203],client version:1.5.2 10:45:41.799 INFO --- [rverHandlerThread_1_1_500] i.s.c.r.processor.server.RegRmProcessor : RM register success,message:RegisterRMRequest{resourceIds='jdbc:mysql://url:3306/account', applicationId='account', transactionServiceGroup='default_tx_group'},channel:[id: 0xd2937d06, L:/192.168.56.1:8091 - R:/192.168.56.1:51204],client version:1.5.2

image
你是通过这里的日志发现没有带上access-key吗,这个只是日志打印的问题。
image
gudi固定的只会取这两个字段,你的第一次请求这里日志应该是一样的没带上

@renliangyu857
Copy link
Contributor

看代码就是复用第一次连接的registryrequest,rm本身就没有accesskey和secretkey的传递,方便看下重启tc后tm重新连接的日志吗?tc侧和tm侧都发一下

rm确实没有accessKey和secretKey。我下面给出tm和tc的日志(TC重启一次后的)。 TM 2022-11-18 10:45:39.978 INFO 2900 --- [eoutChecker_1_1] i.s.c.r.netty.NettyClientChannelManager : will connect to 192.168.56.1:8091 2022-11-18 10:45:39.978 INFO 2900 --- [eoutChecker_1_1] i.s.core.rpc.netty.NettyPoolableFactory : NettyPool create channel to transactionRole:TMROLE,address:192.168.56.1:8091,msg:< RegisterTMRequest{applicationId='account', transactionServiceGroup='default_tx_group'} > 2022-11-18 10:45:40.178 INFO 2900 --- [eoutChecker_1_1] i.s.c.rpc.netty.TmNettyRemotingClient : register TM success. client version:1.5.2, server version:1.5.2,channel:[id: 0x11178f21, L:/192.168.56.1:51203 - R:/192.168.56.1:8091] 2022-11-18 10:45:40.178 INFO 2900 --- [eoutChecker_1_1] i.s.core.rpc.netty.NettyPoolableFactory : register success, cost 198 ms, version:1.5.2,role:TMROLE,channel:[id: 0x11178f21, L:/192.168.56.1:51203 - R:/192.168.56.1:8091] 2022-11-18 10:45:41.784 INFO 2900 --- [eoutChecker_2_1] i.s.c.r.netty.NettyClientChannelManager : will connect to 192.168.56.1:8091 2022-11-18 10:45:41.784 INFO 2900 --- [eoutChecker_2_1] i.s.c.rpc.netty.RmNettyRemotingClient : RM will register :jdbc:mysql://10.122.23.138:3306/account 2022-11-18 10:45:41.784 INFO 2900 --- [eoutChecker_2_1] i.s.core.rpc.netty.NettyPoolableFactory : NettyPool create channel to transactionRole:RMROLE,address:192.168.56.1:8091,msg:< RegisterRMRequest{resourceIds='jdbc:mysql://url:3306/account', applicationId='account', transactionServiceGroup='default_tx_group'} > 2022-11-18 10:45:41.805 INFO 2900 --- [eoutChecker_2_1] i.s.c.rpc.netty.RmNettyRemotingClient : register RM success. client version:1.5.2, server version:1.5.2,channel:[id: 0x35d6626f, L:/192.168.56.1:51204 - R:/192.168.56.1:8091] 2022-11-18 10:45:41.805 INFO 2900 --- [eoutChecker_2_1] i.s.core.rpc.netty.NettyPoolableFactory : register success, cost 19 ms, version:1.5.2,role:RMROLE,channel:[id: 0x35d6626f, L:/192.168.56.1:51204 - R:/192.168.56.1:8091]
TC 10:45:26.985 INFO --- [ main] com.alibaba.nacos.client.naming : [BEAT] adding beat: BeatInfo{port=8091, ip='192.168.56.1', weight=1.0, serviceName='SEATA_GROUP@@lmp-seata', cluster='default', metadata={}, scheduled=false, period=5000, stopped=false} to beat map. 10:45:26.987 INFO --- [ main] com.alibaba.nacos.client.naming : [REGISTER-SERVICE] 22cb73e9-6967-4b6c-af91-a238e7cc3f94 registering service SEATA_GROUP@@lmp-seata with instance: Instance{instanceId='null', ip='192.168.56.1', port=8091, weight=1.0, healthy=true, enabled=true, ephemeral=true, clusterName='default', serviceName='null', metadata={}} 10:45:26.995 INFO --- [ main] io.seata.server.ServerRunner : seata server started in 4765 millSeconds 10:45:40.184 INFO --- [ttyServerNIOWorker_1_1_16] i.s.c.r.processor.server.RegTmProcessor : TM register success,message:RegisterTMRequest{applicationId='account', transactionServiceGroup='default_tx_group'},channel:[id: 0x1f55dc6d, L:/192.168.56.1:8091 - R:/192.168.56.1:51203],client version:1.5.2 10:45:41.799 INFO --- [rverHandlerThread_1_1_500] i.s.c.r.processor.server.RegRmProcessor : RM register success,message:RegisterRMRequest{resourceIds='jdbc:mysql://url:3306/account', applicationId='account', transactionServiceGroup='default_tx_group'},channel:[id: 0xd2937d06, L:/192.168.56.1:8091 - R:/192.168.56.1:51204],client version:1.5.2

image 你是通过这里的日志发现没有带上access-key吗,这个只是日志打印的问题。 image 固定的只会取这两个字段,你的第一次请求这里日志应该是一样的没带上

@zhouziqian
Copy link
Author

看代码就是复用第一次连接的registryrequest,rm本身就没有accesskey和secretkey的传递,方便看下重启tc后tm重新连接的日志吗?tc侧和tm侧都发一下

rm确实没有accessKey和secretKey。我下面给出tm和tc的日志(TC重启一次后的)。 TM 2022-11-18 10:45:39.978 INFO 2900 --- [eoutChecker_1_1] i.s.c.r.netty.NettyClientChannelManager : will connect to 192.168.56.1:8091 2022-11-18 10:45:39.978 INFO 2900 --- [eoutChecker_1_1] i.s.core.rpc.netty.NettyPoolableFactory : NettyPool create channel to transactionRole:TMROLE,address:192.168.56.1:8091,msg:< RegisterTMRequest{applicationId='account', transactionServiceGroup='default_tx_group'} > 2022-11-18 10:45:40.178 INFO 2900 --- [eoutChecker_1_1] i.s.c.rpc.netty.TmNettyRemotingClient : register TM success. client version:1.5.2, server version:1.5.2,channel:[id: 0x11178f21, L:/192.168.56.1:51203 - R:/192.168.56.1:8091] 2022-11-18 10:45:40.178 INFO 2900 --- [eoutChecker_1_1] i.s.core.rpc.netty.NettyPoolableFactory : register success, cost 198 ms, version:1.5.2,role:TMROLE,channel:[id: 0x11178f21, L:/192.168.56.1:51203 - R:/192.168.56.1:8091] 2022-11-18 10:45:41.784 INFO 2900 --- [eoutChecker_2_1] i.s.c.r.netty.NettyClientChannelManager : will connect to 192.168.56.1:8091 2022-11-18 10:45:41.784 INFO 2900 --- [eoutChecker_2_1] i.s.c.rpc.netty.RmNettyRemotingClient : RM will register :jdbc:mysql://10.122.23.138:3306/account 2022-11-18 10:45:41.784 INFO 2900 --- [eoutChecker_2_1] i.s.core.rpc.netty.NettyPoolableFactory : NettyPool create channel to transactionRole:RMROLE,address:192.168.56.1:8091,msg:< RegisterRMRequest{resourceIds='jdbc:mysql://url:3306/account', applicationId='account', transactionServiceGroup='default_tx_group'} > 2022-11-18 10:45:41.805 INFO 2900 --- [eoutChecker_2_1] i.s.c.rpc.netty.RmNettyRemotingClient : register RM success. client version:1.5.2, server version:1.5.2,channel:[id: 0x35d6626f, L:/192.168.56.1:51204 - R:/192.168.56.1:8091] 2022-11-18 10:45:41.805 INFO 2900 --- [eoutChecker_2_1] i.s.core.rpc.netty.NettyPoolableFactory : register success, cost 19 ms, version:1.5.2,role:RMROLE,channel:[id: 0x35d6626f, L:/192.168.56.1:51204 - R:/192.168.56.1:8091]
TC 10:45:26.985 INFO --- [ main] com.alibaba.nacos.client.naming : [BEAT] adding beat: BeatInfo{port=8091, ip='192.168.56.1', weight=1.0, serviceName='SEATA_GROUP@@lmp-seata', cluster='default', metadata={}, scheduled=false, period=5000, stopped=false} to beat map. 10:45:26.987 INFO --- [ main] com.alibaba.nacos.client.naming : [REGISTER-SERVICE] 22cb73e9-6967-4b6c-af91-a238e7cc3f94 registering service SEATA_GROUP@@lmp-seata with instance: Instance{instanceId='null', ip='192.168.56.1', port=8091, weight=1.0, healthy=true, enabled=true, ephemeral=true, clusterName='default', serviceName='null', metadata={}} 10:45:26.995 INFO --- [ main] io.seata.server.ServerRunner : seata server started in 4765 millSeconds 10:45:40.184 INFO --- [ttyServerNIOWorker_1_1_16] i.s.c.r.processor.server.RegTmProcessor : TM register success,message:RegisterTMRequest{applicationId='account', transactionServiceGroup='default_tx_group'},channel:[id: 0x1f55dc6d, L:/192.168.56.1:8091 - R:/192.168.56.1:51203],client version:1.5.2 10:45:41.799 INFO --- [rverHandlerThread_1_1_500] i.s.c.r.processor.server.RegRmProcessor : RM register success,message:RegisterRMRequest{resourceIds='jdbc:mysql://url:3306/account', applicationId='account', transactionServiceGroup='default_tx_group'},channel:[id: 0xd2937d06, L:/192.168.56.1:8091 - R:/192.168.56.1:51204],client version:1.5.2

image 你是通过这里的日志发现没有带上access-key吗,这个只是日志打印的问题。 image 固定的只会取这两个字段,你的第一次请求这里日志应该是一样的没带上

不是通过日志判断的,是在seata服务端的io.seata.server.auth.DefaultCheckAuthHandler#doRegTransactionManagerCheck加了打印RegisterTMRequest对象

@zhouziqian
Copy link
Author

看代码就是复用第一次连接的registryrequest,rm本身就没有accesskey和secretkey的传递,方便看下重启tc后tm重新连接的日志吗?tc侧和tm侧都发一下

rm确实没有accessKey和secretKey。我下面给出tm和tc的日志(TC重启一次后的)。 TM 2022-11-18 10:45:39.978 INFO 2900 --- [eoutChecker_1_1] i.s.c.r.netty.NettyClientChannelManager : will connect to 192.168.56.1:8091 2022-11-18 10:45:39.978 INFO 2900 --- [eoutChecker_1_1] i.s.core.rpc.netty.NettyPoolableFactory : NettyPool create channel to transactionRole:TMROLE,address:192.168.56.1:8091,msg:< RegisterTMRequest{applicationId='account', transactionServiceGroup='default_tx_group'} > 2022-11-18 10:45:40.178 INFO 2900 --- [eoutChecker_1_1] i.s.c.rpc.netty.TmNettyRemotingClient : register TM success. client version:1.5.2, server version:1.5.2,channel:[id: 0x11178f21, L:/192.168.56.1:51203 - R:/192.168.56.1:8091] 2022-11-18 10:45:40.178 INFO 2900 --- [eoutChecker_1_1] i.s.core.rpc.netty.NettyPoolableFactory : register success, cost 198 ms, version:1.5.2,role:TMROLE,channel:[id: 0x11178f21, L:/192.168.56.1:51203 - R:/192.168.56.1:8091] 2022-11-18 10:45:41.784 INFO 2900 --- [eoutChecker_2_1] i.s.c.r.netty.NettyClientChannelManager : will connect to 192.168.56.1:8091 2022-11-18 10:45:41.784 INFO 2900 --- [eoutChecker_2_1] i.s.c.rpc.netty.RmNettyRemotingClient : RM will register :jdbc:mysql://10.122.23.138:3306/account 2022-11-18 10:45:41.784 INFO 2900 --- [eoutChecker_2_1] i.s.core.rpc.netty.NettyPoolableFactory : NettyPool create channel to transactionRole:RMROLE,address:192.168.56.1:8091,msg:< RegisterRMRequest{resourceIds='jdbc:mysql://url:3306/account', applicationId='account', transactionServiceGroup='default_tx_group'} > 2022-11-18 10:45:41.805 INFO 2900 --- [eoutChecker_2_1] i.s.c.rpc.netty.RmNettyRemotingClient : register RM success. client version:1.5.2, server version:1.5.2,channel:[id: 0x35d6626f, L:/192.168.56.1:51204 - R:/192.168.56.1:8091] 2022-11-18 10:45:41.805 INFO 2900 --- [eoutChecker_2_1] i.s.core.rpc.netty.NettyPoolableFactory : register success, cost 19 ms, version:1.5.2,role:RMROLE,channel:[id: 0x35d6626f, L:/192.168.56.1:51204 - R:/192.168.56.1:8091]
TC 10:45:26.985 INFO --- [ main] com.alibaba.nacos.client.naming : [BEAT] adding beat: BeatInfo{port=8091, ip='192.168.56.1', weight=1.0, serviceName='SEATA_GROUP@@lmp-seata', cluster='default', metadata={}, scheduled=false, period=5000, stopped=false} to beat map. 10:45:26.987 INFO --- [ main] com.alibaba.nacos.client.naming : [REGISTER-SERVICE] 22cb73e9-6967-4b6c-af91-a238e7cc3f94 registering service SEATA_GROUP@@lmp-seata with instance: Instance{instanceId='null', ip='192.168.56.1', port=8091, weight=1.0, healthy=true, enabled=true, ephemeral=true, clusterName='default', serviceName='null', metadata={}} 10:45:26.995 INFO --- [ main] io.seata.server.ServerRunner : seata server started in 4765 millSeconds 10:45:40.184 INFO --- [ttyServerNIOWorker_1_1_16] i.s.c.r.processor.server.RegTmProcessor : TM register success,message:RegisterTMRequest{applicationId='account', transactionServiceGroup='default_tx_group'},channel:[id: 0x1f55dc6d, L:/192.168.56.1:8091 - R:/192.168.56.1:51203],client version:1.5.2 10:45:41.799 INFO --- [rverHandlerThread_1_1_500] i.s.c.r.processor.server.RegRmProcessor : RM register success,message:RegisterRMRequest{resourceIds='jdbc:mysql://url:3306/account', applicationId='account', transactionServiceGroup='default_tx_group'},channel:[id: 0xd2937d06, L:/192.168.56.1:8091 - R:/192.168.56.1:51204],client version:1.5.2

image 你是通过这里的日志发现没有带上access-key吗,这个只是日志打印的问题。 image 固定的只会取这两个字段,你的第一次请求这里日志应该是一样的没带上

我把seata server打印的日志也截图发出来

@zhouziqian
Copy link
Author

看代码就是复用第一次连接的registryrequest,rm本身就没有accesskey和secretkey的传递,方便看下重启tc后tm重新连接的日志吗?tc侧和tm侧都发一下

rm确实没有accessKey和secretKey。我下面给出tm和tc的日志(TC重启一次后的)。 TM 2022-11-18 10:45:39.978 INFO 2900 --- [eoutChecker_1_1] i.s.c.r.netty.NettyClientChannelManager : will connect to 192.168.56.1:8091 2022-11-18 10:45:39.978 INFO 2900 --- [eoutChecker_1_1] i.s.core.rpc.netty.NettyPoolableFactory : NettyPool create channel to transactionRole:TMROLE,address:192.168.56.1:8091,msg:< RegisterTMRequest{applicationId='account', transactionServiceGroup='default_tx_group'} > 2022-11-18 10:45:40.178 INFO 2900 --- [eoutChecker_1_1] i.s.c.rpc.netty.TmNettyRemotingClient : register TM success. client version:1.5.2, server version:1.5.2,channel:[id: 0x11178f21, L:/192.168.56.1:51203 - R:/192.168.56.1:8091] 2022-11-18 10:45:40.178 INFO 2900 --- [eoutChecker_1_1] i.s.core.rpc.netty.NettyPoolableFactory : register success, cost 198 ms, version:1.5.2,role:TMROLE,channel:[id: 0x11178f21, L:/192.168.56.1:51203 - R:/192.168.56.1:8091] 2022-11-18 10:45:41.784 INFO 2900 --- [eoutChecker_2_1] i.s.c.r.netty.NettyClientChannelManager : will connect to 192.168.56.1:8091 2022-11-18 10:45:41.784 INFO 2900 --- [eoutChecker_2_1] i.s.c.rpc.netty.RmNettyRemotingClient : RM will register :jdbc:mysql://10.122.23.138:3306/account 2022-11-18 10:45:41.784 INFO 2900 --- [eoutChecker_2_1] i.s.core.rpc.netty.NettyPoolableFactory : NettyPool create channel to transactionRole:RMROLE,address:192.168.56.1:8091,msg:< RegisterRMRequest{resourceIds='jdbc:mysql://url:3306/account', applicationId='account', transactionServiceGroup='default_tx_group'} > 2022-11-18 10:45:41.805 INFO 2900 --- [eoutChecker_2_1] i.s.c.rpc.netty.RmNettyRemotingClient : register RM success. client version:1.5.2, server version:1.5.2,channel:[id: 0x35d6626f, L:/192.168.56.1:51204 - R:/192.168.56.1:8091] 2022-11-18 10:45:41.805 INFO 2900 --- [eoutChecker_2_1] i.s.core.rpc.netty.NettyPoolableFactory : register success, cost 19 ms, version:1.5.2,role:RMROLE,channel:[id: 0x35d6626f, L:/192.168.56.1:51204 - R:/192.168.56.1:8091]
TC 10:45:26.985 INFO --- [ main] com.alibaba.nacos.client.naming : [BEAT] adding beat: BeatInfo{port=8091, ip='192.168.56.1', weight=1.0, serviceName='SEATA_GROUP@@lmp-seata', cluster='default', metadata={}, scheduled=false, period=5000, stopped=false} to beat map. 10:45:26.987 INFO --- [ main] com.alibaba.nacos.client.naming : [REGISTER-SERVICE] 22cb73e9-6967-4b6c-af91-a238e7cc3f94 registering service SEATA_GROUP@@lmp-seata with instance: Instance{instanceId='null', ip='192.168.56.1', port=8091, weight=1.0, healthy=true, enabled=true, ephemeral=true, clusterName='default', serviceName='null', metadata={}} 10:45:26.995 INFO --- [ main] io.seata.server.ServerRunner : seata server started in 4765 millSeconds 10:45:40.184 INFO --- [ttyServerNIOWorker_1_1_16] i.s.c.r.processor.server.RegTmProcessor : TM register success,message:RegisterTMRequest{applicationId='account', transactionServiceGroup='default_tx_group'},channel:[id: 0x1f55dc6d, L:/192.168.56.1:8091 - R:/192.168.56.1:51203],client version:1.5.2 10:45:41.799 INFO --- [rverHandlerThread_1_1_500] i.s.c.r.processor.server.RegRmProcessor : RM register success,message:RegisterRMRequest{resourceIds='jdbc:mysql://url:3306/account', applicationId='account', transactionServiceGroup='default_tx_group'},channel:[id: 0xd2937d06, L:/192.168.56.1:8091 - R:/192.168.56.1:51204],client version:1.5.2

image 你是通过这里的日志发现没有带上access-key吗,这个只是日志打印的问题。 image 固定的只会取这两个字段,你的第一次请求这里日志应该是一样的没带上

image
image

@renliangyu857
Copy link
Contributor

看代码就是复用第一次连接的registryrequest,rm本身就没有accesskey和secretkey的传递,方便看下重启tc后tm重新连接的日志吗?tc侧和tm侧都发一下

rm确实没有accessKey和secretKey。我下面给出tm和tc的日志(TC重启一次后的)。 TM 2022-11-18 10:45:39.978 INFO 2900 --- [eoutChecker_1_1] i.s.c.r.netty.NettyClientChannelManager : will connect to 192.168.56.1:8091 2022-11-18 10:45:39.978 INFO 2900 --- [eoutChecker_1_1] i.s.core.rpc.netty.NettyPoolableFactory : NettyPool create channel to transactionRole:TMROLE,address:192.168.56.1:8091,msg:< RegisterTMRequest{applicationId='account', transactionServiceGroup='default_tx_group'} > 2022-11-18 10:45:40.178 INFO 2900 --- [eoutChecker_1_1] i.s.c.rpc.netty.TmNettyRemotingClient : register TM success. client version:1.5.2, server version:1.5.2,channel:[id: 0x11178f21, L:/192.168.56.1:51203 - R:/192.168.56.1:8091] 2022-11-18 10:45:40.178 INFO 2900 --- [eoutChecker_1_1] i.s.core.rpc.netty.NettyPoolableFactory : register success, cost 198 ms, version:1.5.2,role:TMROLE,channel:[id: 0x11178f21, L:/192.168.56.1:51203 - R:/192.168.56.1:8091] 2022-11-18 10:45:41.784 INFO 2900 --- [eoutChecker_2_1] i.s.c.r.netty.NettyClientChannelManager : will connect to 192.168.56.1:8091 2022-11-18 10:45:41.784 INFO 2900 --- [eoutChecker_2_1] i.s.c.rpc.netty.RmNettyRemotingClient : RM will register :jdbc:mysql://10.122.23.138:3306/account 2022-11-18 10:45:41.784 INFO 2900 --- [eoutChecker_2_1] i.s.core.rpc.netty.NettyPoolableFactory : NettyPool create channel to transactionRole:RMROLE,address:192.168.56.1:8091,msg:< RegisterRMRequest{resourceIds='jdbc:mysql://url:3306/account', applicationId='account', transactionServiceGroup='default_tx_group'} > 2022-11-18 10:45:41.805 INFO 2900 --- [eoutChecker_2_1] i.s.c.rpc.netty.RmNettyRemotingClient : register RM success. client version:1.5.2, server version:1.5.2,channel:[id: 0x35d6626f, L:/192.168.56.1:51204 - R:/192.168.56.1:8091] 2022-11-18 10:45:41.805 INFO 2900 --- [eoutChecker_2_1] i.s.core.rpc.netty.NettyPoolableFactory : register success, cost 19 ms, version:1.5.2,role:RMROLE,channel:[id: 0x35d6626f, L:/192.168.56.1:51204 - R:/192.168.56.1:8091]
TC 10:45:26.985 INFO --- [ main] com.alibaba.nacos.client.naming : [BEAT] adding beat: BeatInfo{port=8091, ip='192.168.56.1', weight=1.0, serviceName='SEATA_GROUP@@lmp-seata', cluster='default', metadata={}, scheduled=false, period=5000, stopped=false} to beat map. 10:45:26.987 INFO --- [ main] com.alibaba.nacos.client.naming : [REGISTER-SERVICE] 22cb73e9-6967-4b6c-af91-a238e7cc3f94 registering service SEATA_GROUP@@lmp-seata with instance: Instance{instanceId='null', ip='192.168.56.1', port=8091, weight=1.0, healthy=true, enabled=true, ephemeral=true, clusterName='default', serviceName='null', metadata={}} 10:45:26.995 INFO --- [ main] io.seata.server.ServerRunner : seata server started in 4765 millSeconds 10:45:40.184 INFO --- [ttyServerNIOWorker_1_1_16] i.s.c.r.processor.server.RegTmProcessor : TM register success,message:RegisterTMRequest{applicationId='account', transactionServiceGroup='default_tx_group'},channel:[id: 0x1f55dc6d, L:/192.168.56.1:8091 - R:/192.168.56.1:51203],client version:1.5.2 10:45:41.799 INFO --- [rverHandlerThread_1_1_500] i.s.c.r.processor.server.RegRmProcessor : RM register success,message:RegisterRMRequest{resourceIds='jdbc:mysql://url:3306/account', applicationId='account', transactionServiceGroup='default_tx_group'},channel:[id: 0xd2937d06, L:/192.168.56.1:8091 - R:/192.168.56.1:51204],client version:1.5.2

image 你是通过这里的日志发现没有带上access-key吗,这个只是日志打印的问题。 image 固定的只会取这两个字段,你的第一次请求这里日志应该是一样的没带上

image image

已确认是代码问题,感谢反馈,1.6版本会修复

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
task: help-wanted Extra attention is needed
Projects
None yet
Development

Successfully merging a pull request may close this issue.

3 participants