- JDK version : 8
- Seata version: 1.5.2
- OS : centos7 windows10
问题:can not get cluster name in registry config 'service.vgroupMapping.tenant-nft-storage-service', please make sure registry config correct .
我这边服务端以及客户端均没有采取conf的配置,全部使用的yml形式进行配置
客户端配置如下:
seata configseata:
应用idapplication-id: ${dubbo.application.name}
是否开启spring-boot自动装配enabled: true
是否开启数据源自动代理enable-auto-data-source-proxy: true
事务分组tx-service-group: tenant-nft-storage-service
事务分组映射service: vgroup-mapping: tenant-nft-storage-service: tenant-nft-cluster
注册中心registry: type: nacos nacos:
服务地址 serverAddr: sass-test.jznft.cn:8848
# 注册到nacos注册中心的服务名,客户端:应与seata-server实际注册的服务名一致
application: tenant-nft-seata-server
# 应与seata-server实际注册的命名空间一致
namespace: a2e0bcf7-7912-4fb0-b6f6-0660aae46cab
# 指定注册到nacos注册中心的分组名
# 客户端:应与seata-server实际注册的分组名一致
group: TENANT-NFT-SEATA-GROUP
# 指定注册至nacos注册中心的集群名
# 客户端:指定事务分组至集群映射关系(等号右侧的集群名需要与Seata-server注册到Nacos的cluster保持一致)
cluster: tenant-nft-cluster
# nacos账号
username: ***
# nacos密码
password: ***
配置中心
config: type: nacos nacos:
服务地址 serverAddr: sass-test.jznft.cn:8848
# 应与seata-server实际注册的命名空间一致
namespace: a2e0bcf7-7912-4fb0-b6f6-0660aae46cab
# 指定注册到nacos注册中心的分组名
# 客户端:应与seata-server实际注册的分组名一致
group: TENANT-NFT-SEATA-GROUP
# nacos配置中心的配置id
data-id: tenantNftSeataServer.properties
# nacos账号
username: ***
# nacos密码
password: ***
服务端配置如下: server: port: 7091
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:4560 kafka-appender: bootstrap-servers: 127.0.0.1:9092 topic: logback_to_logstash
console: user: username: admin password: xiaoguzi
seata: registry:
support: nacos, eureka, redis, zk, consul, etcd3, sofatype: nacos
nacos:
# 指定注册到nacos注册中心的服务名
# 客户端:应与seata-server实际注册的服务名一致
application: tenant-nft-seata-server
# nacos注册中心IP:PORT
server-addr: sass-test.jznft.cn:8848
# 指定注册到nacos注册中心的分组名
# 客户端:应与seata-server实际注册的分组名一致
group: TENANT-NFT-SEATA-GROUP
# nacos命名空间id,""为nacos保留public空间控件,用户勿配置namespace = "public"
# 客户端:应与seata-server实际注册的命名空间一致
namespace: a2e0bcf7-7912-4fb0-b6f6-0660aae46cab
# 指定注册至nacos注册中心的集群名
# 客户端:指定事务分组至集群映射关系(等号右侧的集群名需要与Seata-server注册到Nacos的cluster保持一致)
cluster: tenant-nft-cluster
# nacos账号
username: ***
# nacos密码
password: ***
##if use MSE Nacos with auth, mutex with username/password attribute
#access-key: ""
#secret-key: ""
config:
support: nacos, consul, apollo, zk, etcd3type: nacos
nacos:
# nacos配置中心IP:PORT
server-addr: sass-test.jznft.cn:8848
# nacos命名空间id,""为nacos保留public空间控件,用户勿配置namespace = "public"
namespace: a2e0bcf7-7912-4fb0-b6f6-0660aae46cab
# 指定配置到nacos配置中心的分组名
group: TENANT-NFT-SEATA-GROUP
# nacos账号
username: ***
# nacos密码
password: ***
##if use MSE Nacos with auth, mutex with username/password attribute
#access-key: ""
#secret-key: ""
# nacos配置中心的配置id
data-id: tenantNftSeataServer.properties
server:
service-port: 8091 #If not configured, the default is '${server.port} + 1000'
security: secretKey: SeataSecretKey0c382ef121d778043159209298fd40bf3850a017 tokenValidityInMilliseconds: 1800000 ignore: urls: /,//*.css,/*/.js,//*.html,//*.map,/*/.svg,//*.png,/*/.ico,/console-fe/public/**,/api/v1/auth/login
配置中心: 其中都对service.vgroupMapping.tenant-nft-storage-service配置了value为:tenant-nft-cluster 实际我尝试过:default、tenant-nft-seata-server、tenant-nft-cluster 均没有效果,还是出现下列错误: can not get cluster name in registry config 'service.vgroupMapping.tenant-nft-storage-service', please make sure registry config correct
已经有点搞不明白错在哪里了