开发者社区 > 云原生 > 中间件 > 正文

no available service found in cluster 'xxx', pleas

no available service found in cluster 'xxx', please make sure registry config correct and keep your seata server running

展开
收起
cuicuicuic 2023-03-01 18:40:08 893 0
2 条回答
写回答
取消 提交回答
  • no available service found in cluster 'xxx', please make sure registry config correct and keep your seata server running 事务分组名没有配置正确,入门可以先看公告教程。 事务分组与高可用:http://seata.io/zh-cn/docs/user/txgroup/transaction-group-and-ha.html 事务分组介绍:http://seata.io/zh-cn/docs/user/txgroup/transaction-group.html,此回答整理自钉群“3群-Seata 开源讨论群”

    2023-03-02 21:35:50
    赞同 展开评论 打赏
  • seata客户端和服务端配置不一致导致的,对照着服务端,在代码中把客户端的配置一一修改之后重启项目问题消失了。

    客户端配置

    #seata配置
    seata:
      enabled: true
      #Seata 应用编号,默认为 ${spring.application.name}
      application-id: ${spring.application.name}
      #Seata 事务组编号,用于 TC 集群名
      tx-service-group: ${spring.application.name}-group
      #关闭自动代理
      enable-auto-data-source-proxy: false
      #服务配置项
      service:
        #虚拟组和分组的映射
        vgroup-mapping:
          paas-protocol-group: default
      config:
        type: nacos
        nacos:
          server-addr: 127.0.0.1:8848
          namespace:
          #可选
          username: nacos
          #可选
          password: nacos
          # 这是默认值
          # data-id: seata.properties
          # 这是默认值
          group: SEATA_GROUP
    
      registry:
        type: nacos
        nacos:
          server-addr: 127.0.0.1:8848
          namespace:
          #可选
          username: nacos
          #可选
          password: nacos
          #可选
          application: seata-server
          #默认值和 config 的 SEATA_GROUP 不一样 
          group: SEATA_GROUP
          # 可选  默认
          cluster: default 
    
    

    服务端配置

    registry {
      type = "nacos"
      nacos {
        application = "seata-server"
        serverAddr = "127.0.0.1:8848"
        group = "SEATA_GROUP"
        namespace = ""
        cluster = "default"
        username = "nacos"
        password = "nacos"
      }
    }
    
    config {
      type = "nacos"
      nacos {
        serverAddr = "127.0.0.1:8848"
        namespace = ""
        group = "SEATA_GROUP"
        username = "nacos"
        password = "nacos"
      }
    }
    
    
    2023-03-02 14:37:12
    赞同 展开评论 打赏
问答地址:

为企业提供高效、稳定、易扩展的中间件产品。

相关电子书

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