开发者社区> 问答> 正文

seata RegisterRMRequest获取 ResourceIds 错误

我在Dubbo项目中使用了Seata。有三个项目,其中两个使用sharding-jdbc。我配置并测试了可以回滚这两个项目中的错误,并且在回滚成功之后在undo_log表中生成了数据,并且删除了表数据。但是,当我在以前的方法中添加新的项目方法时,数据无法成功回滚,并且undo_log表中没有生成任何数据。 仔细比较了这三个项目的配置文件和seata-server的日志启动。唯一的区别是,第三个项目在启动时首先提醒RegisterRMRequest {resourceIds ='null',但是第二个项目成功打印了数据库资源的链接地址 报错日志如下:

019-09-21 14:40:32.716 [configOperate_1_2] WARN  io.seata.config.FileConfiguration-Could not found property service.disableGlobalTransaction, try to use default value instead.
2019-09-21 14:40:32.718 [main] INFO  i.seata.spring.annotation.GlobalTransactionScanner-Initializing Global Transaction Clients ...  
2019-09-21 14:40:33.498 [main] INFO  io.seata.core.rpc.netty.AbstractRpcRemotingClient-RpcClientBootstrap has started
2019-09-21 14:40:33.503 [main] INFO  i.seata.spring.annotation.GlobalTransactionScanner-Transaction Manager Client is initialized. applicationId[my_test_tx_group] txServiceGroup[my_test_tx_group]
2019-09-21 14:40:33.541 [main] INFO  io.seata.rm.datasource.AsyncWorker-Async Commit Buffer Limit: 10000
2019-09-21 14:40:33.672 [main] INFO  io.seata.core.rpc.netty.AbstractRpcRemotingClient-RpcClientBootstrap has started
2019-09-21 14:40:33.674 [main] INFO  i.seata.spring.annotation.GlobalTransactionScanner-Resource Manager is initialized. applicationId[my_test_tx_group] txServiceGroup[my_test_tx_group]
2019-09-21 14:40:33.674 [main] INFO  i.seata.spring.annotation.GlobalTransactionScanner-Global Transaction Clients are initialized.  
2019-09-21 14:40:38.509 [timeoutChecker_1] INFO  io.seata.core.rpc.netty.NettyClientChannelManager-will connect to 10.33.250.239:8091
2019-09-21 14:40:38.515 [timeoutChecker_1] INFO  io.seata.core.rpc.netty.NettyPoolableFactory-NettyPool create channel to transactionRole:TMROLE,address:10.33.250.239:8091,msg:< RegisterTMRequest{applicationId='my_test_tx_group', transactionServiceGroup='my_test_tx_group'} >
2019-09-21 14:40:38.673 [timeoutChecker_1] INFO  io.seata.core.rpc.netty.NettyClientChannelManager-will connect to 10.33.250.239:8091
2019-09-21 14:40:38.674 [timeoutChecker_1] INFO  io.seata.core.rpc.netty.RmRpcClient-RM will register :null
2019-09-21 14:40:38.675 [timeoutChecker_1] INFO  io.seata.core.rpc.netty.NettyPoolableFactory-NettyPool create channel to transactionRole:RMROLE,address:10.33.250.239:8091,msg:< RegisterRMRequest{resourceIds='null', applicationId='my_test_tx_group', transactionServiceGroup='my_test_tx_group'} >
2019-09-21 14:40:39.283 [configOperate_1_2] WARN  io.seata.config.FileConfiguration-Could not found property transport.serialization, try to use default value instead.
2019-09-21 14:40:39.286 [configOperate_1_2] WARN  io.seata.config.FileConfiguration-Could not found property transport.compressor, try to use default value instead.
2019-09-21 14:40:39.374 [NettyClientSelector_RMROLE_1] INFO  io.seata.common.loader.EnhancedServiceLoader-load Codec[SEATA] extension by class[io.seata.codec.seata.SeataCodec]
2019-09-21 14:40:39.498 [timeoutChecker_1] INFO  io.seata.core.rpc.netty.NettyPoolableFactory-register success, cost 185 ms, version:0.8.0,role:TMROLE,channel:[id: 0x48fcb77f, L:/10.33.250.207:58936 - R:/10.33.250.239:8091]
2019-09-21 14:40:39.498 [timeoutChecker_1] INFO  io.seata.core.rpc.netty.RmRpcClient-register RM success. server version:0.8.0,channel:[id: 0x642dea8f, L:/10.33.250.207:58937 - R:/10.33.250.239:8091]
2019-09-21 14:40:39.501 [timeoutChecker_1] INFO  io.seata.core.rpc.netty.NettyPoolableFactory-register success, cost 222 ms, version:0.8.0,role:RMROLE,channel:[id: 0x642dea8f, L:/10.33.250.207:58937 - R:/10.33.250.239:8091]
2019-09-21 14:40:41.134 [main] INFO  com.alibaba.druid.pool.DruidDataSource-{dataSource-1} inited
2019-09-21 14:40:41.514 [main] INFO  io.seata.core.rpc.netty.RmRpcClient-register to RM resourceId:jdbc:mysql://10.33.250.20:3306/shby_db_agma
2019-09-21 14:40:41.516 [main] INFO  io.seata.core.rpc.netty.RmRpcClient-register resource, resourceId:jdbc:mysql://10.33.250.20:3306/shby_db_agma

展开
收起
一人吃饱,全家不饿 2021-02-02 10:50:51 5448 0
来自:阿里开源
1 条回答
写回答
取消 提交回答
  • 我遇到了同样的错误,在添加jackson-databind依赖项之后,错误消失了。

    2021-02-02 11:27:27
    赞同 展开评论 打赏
来源圈子
更多
收录在圈子:
+ 订阅
阿里巴巴相信开源的世界里人人贡献代码,人人获得收益,共同创造一个互帮互利的社区,促进技术进步和发展。
问答排行榜
最热
最新

相关电子书

更多
低代码开发师(初级)实战教程 立即下载
冬季实战营第三期:MySQL数据库进阶实战 立即下载
阿里巴巴DevOps 最佳实践手册 立即下载