seata报错no available service found in cluster 'default', please make sure registry config correct and keep your seata server running解决思路

client端报错

[timeoutChecker_2_1] ERROR i.s.c.r.n.NettyClientChannelManager:188 --> no available service found in cluster 'default', please make sure registry config correct and keep your seata server running

解决思路

1.看了很多教程让新建空间----这里先不建

2.教程让application.yaml的namespace填ID —不填

3.总结:保证配置和服务在同一空间内

首先上传全部nacos配置,config.txt ,然后访问nacos

保证所有配置都在public里面,分组是SEATA_GROUP

保证所有服务都在public里面,分组是SEATA_GROUP

seata/config/application.yaml

server:
  port: 8080
spring:
  application:
    name: seata-server
logging:
  config: classpath:logback-spring.xml
  file:
    path: ${user.home}/logs/seata
#  extend:
#    logstash-appender:
#      destination: 127.0.0.1:8089
#    kafka-appender:
#      bootstrap-servers: 127.0.0.1:8090
#      topic: logback_to_logstash
console:
  user:
    username: seata
    password: seata
seata:
  config:
    # support: nacos, consul, apollo, zk, etcd3
    type: nacos
    nacos:
        serverAddr: 127.0.0.1:8848
        namespace:  #别填
        group: SEATA_GROUP #需要与前面创建的配置文件相对应
        username: nacos
        password: nacos
        file-extension: yml
        shared-configs:
          - dataId: seata-server.yml #需要与前面创建的配置文件相对应
            namespace: #别填
            group: SEATA_GROUP
  registry:
    # support: nacos, eureka, redis, zk, consul, etcd3, sofa
    type: nacos
    nacos:
        serverAddr: 127.0.0.1:8848
        namespace:  #别填
        group: SEATA_GROUP
        username: nacos
        password: nacos
        file-extension: yml
        shared-configs:
          - dataId: seata-server.yml #需要与前面创建的配置文件相对应
            namespace:  #需要与前面创建的配置文件相对应
            group: SEATA_GROUP #需要与前面创建的配置文件相对应
  #store:
    # support: file 、 db 、 redis
    #mode: file
#  server:
#    service-port: 8091 #If not configured, the default is '${server.port} + 1000'
  security:
    secretKey: xxx
    tokenValidityInMilliseconds: 1800000
    ignore:
      urls: /,/**/*.css,/**/*.js,/**/*.html,/**/*.map,/**/*.svg,/**/*.png,/**/*.ico,/console-fe/public/**,/api/v1/auth/login

每个人的配置不同,上面仅供参考。


 您阅读本篇文章共花了: