当前位置:网站首页>no available service ‘null‘ found, please make sure registry config correct

no available service ‘null‘ found, please make sure registry config correct

2022-06-12 18:46:00 BackgroundHero

Error screenshots

 Insert picture description here

Error description

Here it is spring Integrate seata Error when starting

The reason for the error

The configuration address set here is stored in nacos Upper
 Insert picture description here
And in the nacos There is no upload configuration on
 Insert picture description here

Problem solving

Go first Gihub download seata The source file
Download address
After downloading, add it to the following folder
 Insert picture description here

There is a config.txt Text
Make a copy
modify confit.txt The following content

service.vgroupMapping.my_test_tx_group=default
service.disableGlobalTransaction=false
store.mode=db
store.db.datasource=druid
store.db.dbType=mysql
store.db.driverClassName=com.mysql.cj.jdbc.Driver
store.db.url=jdbc:mysql://xxxxx:3306/seata?useUnicode=true&characterEncoding=utf8&serverTimezone=GMT%2B8&useSSL=false&allowPublicKeyRetrieval=true
store.db.user=root
store.db.password=root
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

My modification here is based on my seata Configured , my seata It is stored in a database , The database version is 8
Configure your own part of the configuration stored in other ways
What needs to be noted here is
service.vgroupMapping The following values need and seata In the configuration tx-service-group Have the same value
 Insert picture description here

After modification, enter nacos File directory
There's a nacos-config.sh file
 Insert picture description here

Right click on this page
 Insert picture description here
Open a black window
This option installs git Usually there will be
If you haven't read this article
No, Git Bahs

Enter the code

sh nacos-config.sh -h nacos Address  -g SEATA-GROUP

The other parameters
-h Need to inject nacos host ip
-p nacos Run port number
-g Specifies the grouping of the profile ( optional )
-u nacos Account
-w nacos password
-t Appoint nacos Namespace ( optional )
 Insert picture description here
Be careful : there nacos-config.sh and config.txt Not in the same folder , Never be smart enough to move file locations , Run directly by command nacos-config.sh that will do

View after execution nacos
 Insert picture description here

Import complete
Restart again
 Insert picture description here

perfect !

原网站

版权声明
本文为[BackgroundHero]所创,转载请带上原文链接,感谢
https://yzsam.com/2022/163/202206121839558209.html