Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

can not get cluster name in registry config 'service.vgroupMapping.storage_service_group', please make sure registry config correct #411

Closed
freshgeek opened this issue Dec 14, 2020 · 10 comments · Fixed by #412

Comments

@freshgeek
Copy link
Contributor

version:
seata:1.4.0
nacos:1.4.0
spring-boot:2.2.2.RELEASE
spring-cloud:Hoxton.SR1


2020-12-14 16:18:26.600 ERROR [seata-storage-service,,,] 444 --- [           main] i.s.c.r.netty.NettyClientChannelManager  : can not get cluster name in registry config 'service.vgroupMapping.storage_service_group', please make sure registry config correct

image

In the high version of Seata, if you should use the service.vgroupMapping.order-service-group=default, an underline will cause the service not to be found

Hope to be able to describe the exception clearly, without users to guess

and service.vgroupMapping.order_service_group=default also error

@804434940
Copy link

请问您解决了么 我按照这个方式还是报这个错

@huxipi
Copy link

huxipi commented Apr 25, 2021

版本1.4.1,报同样的错误:
i.s.c.r.netty.NettyClientChannelManager : can not get cluster name in registry config 'service.vgroupMapping.seata-account-service-fescar-service-group', please make sure registry config correct

尝试各种方法,未解决

@844704781
Copy link

未解决

@SignUp-StealWheel
Copy link

SignUp-StealWheel commented Jun 10, 2021

版本1.4.1,报同样的错误:
i.s.c.r.netty.NettyClientChannelManager : can not get cluster name in registry config 'service.vgroupMapping.seata-account-service-fescar-service-group', please make sure registry config correct

尝试各种方法,未解决

在application.properties中添加
spring.cloud.alibaba.seata.tx-service-group=my_test_tx_group
注意my_test_tx_group是file.conf中service中配置的vgroupMapping.my_test_tx_group = "default"

@pangchun
Copy link

不妨看看我的回答:(已解决)

版本1.4.2,配置中心为nacos
同样是控制台不停打印此错误,如下:
image

思路:仍然是事务分组名的问题;

解决办法:集成至项目时我们一般都会修改service.vgroupMapping.my_test_tx_group=default中的my_test_tx_group,然后就容易碰到上述问题,解决办法分两步:
1、yml中要配置事务分组名:
比如我的配置修改为service.vgroupMapping.seata-storage-service=default,那么yml中要配置tx-service-group: seata-storage-service;
2、nacos中需要增加一个dataId为service.vgroupMapping.seata-storage-service,内容为default的配置,如下:(一定要注意的是seata在nacos上的所有配置可以通过seata提供的脚本一键导入)
image
这样一来,问题便得到了解决。

至于为什么需要第二步,请继续看:
1、报错时,debug进入此方法,再进入lookup方法查看:
image

2、沿着空值一直找到最后:
image
image
发现最终从nacos获取配置时是从这个dataId获取的,而我们的配置中心没有此dataId的配置,再看到下图中的service.vgroupMapping.my_test_tx_group示例,添加一个service.vgroupMapping.seata-storage-service配置即可。
image

@hoxiete
Copy link

hoxiete commented Dec 10, 2021

@pangchun 感谢你的回答,我也是dataId没有指定service.vgroupMapping,问题是seata1.4.2已经支持以dataId = "seata-server.properties"形式读取键值,可能是client的seata版本低了

@hcqbuqingzhen
Copy link

为什么感觉这个seata这么难用呀.

@pangchun
Copy link

我觉得挺好用的,不知道你是指哪方面难用

@hcqbuqingzhen
Copy link

抱歉是我口嗨了,大致就是配置方面吧.就像这里出现的问题.我也是通过您这条回答解决的.虽然解决了,还是觉得官方文档没有说清楚吧.

@yearnxiao
Copy link

抱歉是我口嗨了,大致就是配置方面吧。就像这里出现的问题。我也是通过您的这条回答解决的。虽然解决了,还是觉得官方文档没有说清楚吧。

说实话seata配置这块的官方文档和demo确实不够清晰,很多资深开发都搞不明白

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging a pull request may close this issue.

9 participants