nacos seata 微服务seata注册报错

nacos版本 1.4.1
seata版本 1.4.1
具体报错日志:

...
no available service found in cluster 'default', please make sure registry cluster
...

配置文件:

registry.yml

#nacos seata都装在docker里,这里可以直接通过docker服务名访问
registry {
  # file 、nacos 、eureka、redis、zk、consul、etcd3、sofa
  type = "nacos"

  nacos {
    application = "seata-server"
    serverAddr = "dev-nacos-server" 
    group = "SEATA_GROUP"
    namespace = ""
  }
}

config {
  type = "nacos"

  nacos {
    serverAddr = "dev-nacos-server"
    namespace = ""
    group = "SEATA_GROUP"
    username = "nacos"
    password = "nacos"
  }
}

file.conf

## transaction log store, only used in seata-server
store {
  ## store mode: file、db、redis
  mode = "db"
  ## rsa decryption public key
  publicKey = ""
  ## file store property


  ## database store property
  db {
    ## the implement of javax.sql.DataSource, such as DruidDataSource(druid)/BasicDataSource(dbcp)/HikariDataSource(hikari) etc.
    datasource = "druid"
    ## mysql/oracle/postgresql/h2/oceanbase etc.
    dbType = "mysql"
    driverClassName = "com.mysql.jdbc.Driver"
    ## if using mysql to store the data, recommend add rewriteBatchedStatements=true in jdbc connection param
    url = "jdbc:mysql://**/seata?rewriteBatchedStatements=true"
    user = "**"
    password = "**"
    minConn = 5
    maxConn = 100
    globalTable = "global_table"
    branchTable = "branch_table"
    lockTable = "lock_table"
    queryLimit = 100
    maxWait = 5000
  }
}

application.yml

*其中主要问题就在这里:

可以看到默认的Group为SEATA_GROUP,需要与nacos中注册上去的seata服务的group一致才能访问到;

seata:
  tx-service-group: ${spring.application.name}-group
  registry:
    type: nacos
    nacos:
      server-addr: ${spring.profiles.active}-nacos-server:8848
      #      server-addr: localhost
      namespace:
  config:
    type: nacos
    nacos:
      server-addr: ${spring.profiles.active}-nacos-server:8848
      #      server-addr: localhost
      namespace:
原文地址:https://www.cnblogs.com/liaoweiming/p/14893954.html