can not get cluster name in registry config ‘service.vgroupMapping.walle-frame-seata-service-group’

集成seata启动后,控制台每十秒报一次这个错误

 logger:io.seata.core.rpc.netty.NettyClientChannelManager 
 thread:[timeoutChecker_1_1]  
msg:can not get cluster name in registry config 'service.vgroupMapping.walle-frame-seata-service-group', 
please make sure registry config correct

个人使用的seata依赖是1.4.2的,然后cloud alibaba是2021.0.1.0版本的

1:这个问题就是事务分组的问题,讲道理,应该是个小问题,但是就是找不到问题在哪,问题就在于官方有些坑的

2:最后发现还是版本对应的问题,如果使用spring-cloud-starter-alibaba-seata,那么里面的版本不一定是1.4.2的。你需要指定一下

所以在依赖中你需要指定seata-all版本,按照我的这个试一下

<seata.version>1.4.2</seata.version>



<dependencies>
        <!--seata starter 采用1.4.2版本-->
        <dependency>
            <groupId>io.seata</groupId>
            <artifactId>seata-spring-boot-starter</artifactId>
            <version>${seata.version}</version>
        </dependency>
        <dependency>
            <groupId>com.alibaba.cloud</groupId>
            <artifactId>spring-cloud-starter-alibaba-seata</artifactId>
            <version>2021.0.1.0</version>
            <exclusions>
                <exclusion>
                    <groupId>io.seata</groupId>
                    <artifactId>seata-spring-boot-starter</artifactId>
                </exclusion>
                <exclusion>
                    <groupId>io.seata</groupId>
                    <artifactId>seata-all</artifactId>
                </exclusion>
            </exclusions>
        </dependency>
        <dependency>
            <groupId>io.seata</groupId>
            <artifactId>seata-all</artifactId>
            <version>${seata.version}</version>
        </dependency>

 3:application.yml里面写一下,讲原先的都注释掉

seata:
  data-source-proxy-mode: AT
  service:
    grouplist:
        #这个IP是你seata服务的ip不是nacos的
      default: xxx:8091
    vgroup-mapping:
      walle-frame-seata-service-group: default
  tx-service-group: walle-frame-seata-service-group

4:ok重启一下项目,差不多就解决了
 


版权声明:本文为zbh1957282580原创文章,遵循 CC 4.0 BY-SA 版权协议,转载请附上原文出处链接和本声明。
原文链接:https://blog.csdn.net/zbh1957282580/article/details/125058591