apache / incubator-seata

:fire: Seata is an easy-to-use, high-performance, open source distributed transaction solution.
https://seata.apache.org/
Apache License 2.0
25.33k stars 8.78k forks source link

no available service 'null' found, please make sure registry config correct #2406

Closed huc003 closed 4 years ago

huc003 commented 4 years ago

seata 调试springcloud-nacos-seata demo的时候,启动服务报错i.s.c.r.netty.NettyClientChannelManager : no available service 'null' found, please make sure registry config correct,请问这个是什么问题,nacos注册中心serverAddr 、storage-service、order-service这三个服务都是有的

slievrly commented 4 years ago

@huc003 Check the business side configuration item vgroupMapping. * ,it is recommended to read the Seata website https://seata.io/zh-cn/docs/ops/deploy-guide-beginner.htmldocument.

huc003 commented 4 years ago

seata-server nacos-config.txt ~~ service.vgroup_mapping.storage-service-group=default service.vgroup_mapping.order-service-group=default ~~

storage-service application.properties ~~ spring.cloud.alibaba.seata.tx-service-group=storage-service-group ~~

order-service application.properties ~~ spring.cloud.alibaba.seata.tx-service-group=order-service-group ~~

registry.conf ~~ registry {

type = "nacos" nacos { serverAddr = "localhost" namespace = "public" cluster = "default" } }

config {

type = "nacos" nacos { serverAddr = "localhost" namespace = "public" group = "SEATA_GROUP" } }

Starting service error order-service、storage-service no available service 'null' found, please make sure registry config correct

zjinlei commented 4 years ago

namespace = "public"

huc003 commented 4 years ago

namespace = "public" 什么意思?去掉?

huc003 commented 4 years ago

没有人遇到这个问题?

qihaooo commented 4 years ago

application.properties中配置 spring.cloud.alibaba.seata.tx-service-group=${spring.application.name}-fescar-service-group

file.conf中配置 vgroupMapping.${spring.application.name}-fescar-service-group = "default"

同时需要启动服务端,服务端如果使用docker启动需要网络共享 --network=host,同时需要更改里面的注册中心地址,和业务配置的注册中心保持一致,同时在业务的file.conf中加入seata服务端地址: default.grouplist = "192.168.xx.xx:8091"

qihaooo commented 4 years ago

没有人遇到这个问题? application.properties中配置 spring.cloud.alibaba.seata.tx-service-group=${spring.application.name}-fescar-service-group

file.conf中配置 vgroupMapping.${spring.application.name}-fescar-service-group = "default"

同时需要启动服务端,服务端如果使用docker启动需要网络共享 --network=host,同时需要更改里面的注册中心地址,和业务配置的注册中心保持一致,同时在业务的file.conf中加入seata服务端地址: default.grouplist = "192.168.xx.xx:8091"

fade-away commented 4 years ago

这个问题是怎么解决?能否提供下方案

pearl88 commented 4 years ago

这个问题是怎么解决?能否提供下方案

测试的时候经常遇到这个问题, 配置完全正确,临时解决方案:1.重启seata 2.重新发布service.vgroupMapping这个配置

BoGeManger commented 4 years ago

怎么解决的,好几天了,哪个好心人提供下方法

kongfanyu commented 4 years ago

no available service 'null' found, please make sure registry config correct seata 1.20 同样这个问题

huangwenyi10 commented 4 years ago

seata 调试springcloud-nacos-seata demo的时候,启动服务报错i.s.c.r.netty.NettyClientChannelManager : no available service 'null' found, please make sure registry config correct,请问这个是什么问题,nacos注册中心serverAddr 、storage-service、order-service这三个服务都是有的

vgroup_mapping.fsp_tx_group = "default"

换成 vgroupMapping.fsp_tx_group = "default" 可能问题就解决了,不行的话,升级seata的版本

Scalaaaaaa commented 3 years ago

1,要确保 pom里的seata-stater的版本和 单独启动的seata-server 的版本要一致.1.4.x和1.3.0 不兼容

2,项目的配置文件里,seata.registry.nacos.group/application/cluster/namespace 要和 seata服务器的registry.conf配置文件里的nacos{}里的group/application/cluster/namespace 一致 看nacos上的注册信息,发现 seata-server这个服务的ip是172.xx.xx.1 , 而这个地址是docker的虚拟ip,别的机器上访问不到, 然后网上查询怎么设置seata绑定的ip, 就是seata-server.sh -h ip地址,然后绑定192.168的ip地址就可以了.因为172的ip地址 在别的机器上是ping不通的,172的地址是docker的虚拟地址,只能这个虚拟地址所在机器上才可以ping通.

316189693 commented 3 years ago

问题出在service.vgroupMapping.order-service-seata-service-group=default 这个 ‘vgroupMapping’, 以及绑定的group要对, 亲测有效

image

image

image

image

image

image

image

wangjing0716 commented 2 years ago

遇到类似的问题,本地ok,开发环境就是 no available service 'seata-server' found, please make sure registry config correct client用的1.3.0,seata-server是1.5.0,注册中心是 eureka,seata-server的配置中心是file模式。 DiscoveryClient_UNKNOWN/127.0.0.1 - was unable to refresh its cache! status = Cannot execute request on any known server

wangjing0716 commented 2 years ago

开发环境是同一个服务器,docker部署

ChengxiangA commented 2 years ago

我遇到了类似的问题,我是通过以下方式解决的:

  1. 添加映射规则(如果application.yaml里没有声明tx-service-group事物分组名,默认为{spring-application-name}-seata-service-group,只要在seata的配置文件中添加分组对应集群的映射即可,如果没有集群映射到default即可) image

2.seata服务端和客户端的版本一定要一致 image