Ⅰ.服务启动报错io.seata.config.exception.ConfigNotFoundException: service.vgroupMapping.default_tx_group configuration item is required
Ⅱ. 服务启动报找不到服务组
io.seata.config.exception.ConfigNotFoundException: service.vgroupMapping.default_tx_group configuration item is required
at io.seata.discovery.registry.nacos.NacosRegistryServiceImpl.lookup(NacosRegistryServiceImpl.java:151)
at io.seata.core.rpc.netty.NettyClientChannelManager.getAvailServerList(NettyClientChannelManager.java:277)
at io.seata.core.rpc.netty.NettyClientChannelManager.reconnect(NettyClientChannelManager.java:213)
at io.seata.core.rpc.netty.TmNettyRemotingClient.initConnection(TmNettyRemotingClient.java:288)
at io.seata.core.rpc.netty.TmNettyRemotingClient.init(TmNettyRemotingClient.java:196)
at io.seata.tm.TMClient.init(TMClient.java:47)
at io.seata.spring.annotation.GlobalTransactionScanner.initClient(GlobalTransactionScanner.java:224)
at io.seata.spring.annotation.GlobalTransactionScanner.afterPropertiesSet(GlobalTransactionScanner.java:470)
at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.invokeInitMethods(AbstractAutowireCapableBeanFactory.java:1853)
at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.initializeBean(AbstractAutowireCapableBeanFactory.java:1790)
at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.doCreateBean(AbstractAutowireCapableBeanFactory.java:594)
at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.createBean(AbstractAutowireCapableBeanFactory.java:516)
at org.springframework.beans.factory.support.AbstractBeanFactory.lambda$doGetBean$0(AbstractBeanFactory.java:324)
at org.springframework.beans.factory.support.DefaultSingletonBeanRegistry.getSingleton(DefaultSingletonBeanRegistry.java:234)
at org.springframework.beans.factory.support.AbstractBeanFactory.doGetBean(AbstractBeanFactory.java:322)
at org.springframework.beans.factory.support.AbstractBeanFactory.getBean(AbstractBeanFactory.java:207)
at org.springframework.context.support.PostProcessorRegistrationDelegate.registerBeanPostProcessors(PostProcessorRegistrationDelegate.java:229)
at org.springframework.context.support.AbstractApplicationContext.registerBeanPostProcessors(AbstractApplicationContext.java:723)
at org.springframework.context.support.AbstractApplicationContext.refresh(AbstractApplicationContext.java:536)
at org.springframework.boot.web.servlet.context.ServletWebServerApplicationContext.refresh(ServletWebServerApplicationContext.java:143)
at org.springframework.boot.SpringApplication.refresh(SpringApplication.java:758)
at org.springframework.boot.SpringApplication.refresh(SpringApplication.java:750)
at org.springframework.boot.SpringApplication.refreshContext(SpringApplication.java:405)
at org.springframework.boot.SpringApplication.run(SpringApplication.java:315)
at org.springframework.boot.SpringApplication.run(SpringApplication.java:1237)
at org.springframework.boot.SpringApplication.run(SpringApplication.java:1226)
at cn.com.goldwind.ercp.AppUILuncher.main(AppUILuncher.java:46)
Ⅲ. 微服务项目配置
Ⅳ. How to reproduce it (as minimally and precisely as possible)
Ⅰ.服务启动报错io.seata.config.exception.ConfigNotFoundException: service.vgroupMapping.default_tx_group configuration item is required
Ⅱ. 服务启动报找不到服务组
io.seata.config.exception.ConfigNotFoundException: service.vgroupMapping.default_tx_group configuration item is required at io.seata.discovery.registry.nacos.NacosRegistryServiceImpl.lookup(NacosRegistryServiceImpl.java:151) at io.seata.core.rpc.netty.NettyClientChannelManager.getAvailServerList(NettyClientChannelManager.java:277) at io.seata.core.rpc.netty.NettyClientChannelManager.reconnect(NettyClientChannelManager.java:213) at io.seata.core.rpc.netty.TmNettyRemotingClient.initConnection(TmNettyRemotingClient.java:288) at io.seata.core.rpc.netty.TmNettyRemotingClient.init(TmNettyRemotingClient.java:196) at io.seata.tm.TMClient.init(TMClient.java:47) at io.seata.spring.annotation.GlobalTransactionScanner.initClient(GlobalTransactionScanner.java:224) at io.seata.spring.annotation.GlobalTransactionScanner.afterPropertiesSet(GlobalTransactionScanner.java:470) at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.invokeInitMethods(AbstractAutowireCapableBeanFactory.java:1853) at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.initializeBean(AbstractAutowireCapableBeanFactory.java:1790) at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.doCreateBean(AbstractAutowireCapableBeanFactory.java:594) at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.createBean(AbstractAutowireCapableBeanFactory.java:516) at org.springframework.beans.factory.support.AbstractBeanFactory.lambda$doGetBean$0(AbstractBeanFactory.java:324) at org.springframework.beans.factory.support.DefaultSingletonBeanRegistry.getSingleton(DefaultSingletonBeanRegistry.java:234) at org.springframework.beans.factory.support.AbstractBeanFactory.doGetBean(AbstractBeanFactory.java:322) at org.springframework.beans.factory.support.AbstractBeanFactory.getBean(AbstractBeanFactory.java:207) at org.springframework.context.support.PostProcessorRegistrationDelegate.registerBeanPostProcessors(PostProcessorRegistrationDelegate.java:229) at org.springframework.context.support.AbstractApplicationContext.registerBeanPostProcessors(AbstractApplicationContext.java:723) at org.springframework.context.support.AbstractApplicationContext.refresh(AbstractApplicationContext.java:536) at org.springframework.boot.web.servlet.context.ServletWebServerApplicationContext.refresh(ServletWebServerApplicationContext.java:143) at org.springframework.boot.SpringApplication.refresh(SpringApplication.java:758) at org.springframework.boot.SpringApplication.refresh(SpringApplication.java:750) at org.springframework.boot.SpringApplication.refreshContext(SpringApplication.java:405) at org.springframework.boot.SpringApplication.run(SpringApplication.java:315) at org.springframework.boot.SpringApplication.run(SpringApplication.java:1237) at org.springframework.boot.SpringApplication.run(SpringApplication.java:1226) at cn.com.goldwind.ercp.AppUILuncher.main(AppUILuncher.java:46)
Ⅲ. 微服务项目配置
Ⅳ. How to reproduce it (as minimally and precisely as possible)
1.seata客户端 微服务项目配置 seata: enabled: true enable-auto-data-source-proxy: true tx-service-group: hrs-tx-group data-source-proxy-mode: XA service: vgroupMapping: hrs-tx-group: hrs-cluster disable-global-transaction: false
config:
type: nacos
nacos:
server-addr: 10.12.7.154:30029
namespace: c8a29ded-d91c-4828-97b0-f3eac84b9bfa
group: SEATA_GROUP
username: hrsnacos
password: 1qaz@WSX
registry: type: nacos nacos: application: seata-server server-addr: 10.12.7.154:30029 group: SEATA_GROUP namespace: c8a29ded-d91c-4828-97b0-f3eac84b9bfa username: hrsnacos password: 1qaz@WSX cluster: hrs-cluster
spring: application: name: seata-server
logging: config: classpath:logback-spring.xml file: path: /data/seata/logs
extend:
console: user: username: seata password: seata
这里是主要的配置文件
seata: config:
support: nacos 、 consul 、 apollo 、 zk 、 etcd3
registry:
support: nacos 、 eureka 、 redis 、 zk 、 consul 、 etcd3 、 sofa
security: secretKey: SeataSecretKey0c382ef121d778043159209298fd40bf3850a017 tokenValidityInMilliseconds: 1800000 ignore: urls: /,//*.css,/*/.js,//*.html,//*.map,/*/.svg,//*.png,//*.jpeg,/*/.ico,/api/v1/auth/login,/metadata/v1/
seata:
service.vgroupMapping.hrs-tx-group=hrs-cluster
数据存储方式,db代表数据库
store.mode=db store.db.datasource=druid store.db.dbType=postgresql store.db.driverClassName=org.postgresql.Driver store.db.url=jdbc:postgresql://cortest-pg.goldwind.com:5432/hrs_nacos?currentSchema=public store.db.user=hrsuser store.db.password=dzzn7Wk^ci store.db.minConn=5 store.db.maxConn=30 store.db.globalTable=global_table store.db.branchTable=branch_table store.db.queryLimit=100 store.db.lockTable=lock_table store.db.maxWait=5000
事务、日志等配置
server.recovery.committingRetryPeriod=1000 server.recovery.asynCommittingRetryPeriod=1000 server.recovery.rollbackingRetryPeriod=1000 server.recovery.timeoutRetryPeriod=1000 server.maxCommitRetryTimeout=-1 server.maxRollbackRetryTimeout=-1 server.rollbackRetryTimeoutUnlockEnable=false server.undo.logSaveDays=7 server.undo.logDeletePeriod=86400000
客户端与服务端传输方式
transport.serialization=seata transport.compressor=none
关闭metrics功能,提高性能
metrics.enabled=false metrics.registryType=compact metrics.exporterList=prometheus metrics.exporterPrometheusPort=9898
Minimal yet complete reproducer code (or URL to code):
Ⅴ. 服务端启动成功也注册成功了,服务端和客户端服务组配置明明已经一致了,seata依赖包换了很多种方式启动还是报service.vgroupMapping.default_tx_group configuration item is required,并且vgroupMapping和vgroup-mapping都试了都不行报错依旧
Ⅵ. Environment:
java -version
):1.8.0uname -a
):linux