升级3.3.1后出现mysql连接异常,求教

Blade 未结 2 714
jma
jma 2023-12-27 13:17


是3.3.0 升级 3.3.1后出现的问题,之前运行正常


这边是将nacos部署在局域网的k8s中,mysql在局域网的一个linux系统中,test部署在k8s中,我本机dev正常连接局域网的nacos,mysql,服务也注册成功,但是在test环境下就显示mysql连接失败

10:13:06.658 [main] DEBUG org.springframework.core.env.PropertySourcesPropertyResolver - Found key 'spring.profiles.active' in PropertySource 'commandLineArgs' with value of type String
210:13:06.719 [main] DEBUG org.springframework.core.env.StandardEnvironment - Activating profiles [test]
3----启动中,读取到的环境变量:[test],jar地址:[file:/blade/log/app.jar]----
42023-12-27 10:13:12.140 INFO 1 --- [kground-preinit] o.h.validator.internal.util.Version : HV000001: Hibernate Validator 6.2.5.Final
5______ _ _ ___ ___
6| ___ \| | | | \ \ / /
7| |_/ /| | __ _ __| | ___ \ V /
8| ___ \| | / _` | / _` | / _ \ > <
9| |_/ /| || (_| || (_| || __/ / . \
10\____/ |_| \__,_| \__,_| \___|/__/ \__\
11
12:: BladeX 3.3.1.RELEASE :: blade-log:test :: Running SpringBoot 2.7.18 ::
13
142023-12-27 10:13:18.721 WARN 1 --- [ main] c.a.c.n.c.NacosPropertySourceBuilder : Ignore the empty nacos configuration and get it based on dataId[blade.yaml] & group[DEFAULT_GROUP]
152023-12-27 10:13:19.129 WARN 1 --- [ main] c.a.c.n.c.NacosPropertySourceBuilder : Ignore the empty nacos configuration and get it based on dataId[blade-test.yaml] & group[DEFAULT_GROUP]
162023-12-27 10:13:19.536 WARN 1 --- [ main] c.a.c.n.c.NacosPropertySourceBuilder : Ignore the empty nacos configuration and get it based on dataId[blade-log] & group[DEFAULT_GROUP]
172023-12-27 10:13:19.946 WARN 1 --- [ main] c.a.c.n.c.NacosPropertySourceBuilder : Ignore the empty nacos configuration and get it based on dataId[blade-log.yaml] & group[DEFAULT_GROUP]
182023-12-27 10:13:20.354 WARN 1 --- [ main] c.a.c.n.c.NacosPropertySourceBuilder : Ignore the empty nacos configuration and get it based on dataId[blade-log-test.yaml] & group[DEFAULT_GROUP]
192023-12-27 10:13:20.358 INFO 1 --- [ main] b.c.PropertySourceBootstrapConfiguration : Located property source: [BootstrapPropertySource {name='bootstrapProperties-blade-log-test.yaml,DEFAULT_GROUP'}, BootstrapPropertySource {name='bootstrapProperties-blade-log.yaml,DEFAULT_GROUP'}, BootstrapPropertySource {name='bootstrapProperties-blade-log,DEFAULT_GROUP'}, BootstrapPropertySource {name='bootstrapProperties-blade-test.yaml,DEFAULT_GROUP'}, BootstrapPropertySource {name='bootstrapProperties-blade.yaml,DEFAULT_GROUP'}]
202023-12-27 10:13:20.598 INFO 1 --- [ main] org.springblade.core.log.LogApplication : The following 1 profile is active: "test"
212023-12-27 10:13:26.522 INFO 1 --- [ main] .s.d.r.c.RepositoryConfigurationDelegate : Multiple Spring Data modules found, entering strict repository configuration mode
222023-12-27 10:13:26.534 INFO 1 --- [ main] .s.d.r.c.RepositoryConfigurationDelegate : Bootstrapping Spring Data Redis repositories in DEFAULT mode.
232023-12-27 10:13:26.631 INFO 1 --- [ main] .s.d.r.c.RepositoryConfigurationDelegate : Finished Spring Data repository scanning in 39 ms. Found 0 Redis repository interfaces.
242023-12-27 10:13:27.308 WARN 1 --- [ main] o.m.s.mapper.ClassPathMapperScanner : No MyBatis mapper was found in '[org.springblade.core.log]' package. Please check your configuration.
252023-12-27 10:13:27.735 INFO 1 --- [ main] o.s.cloud.context.scope.GenericScope : BeanFactory id=34ffe955-b404-329f-a25d-59a9e6cdc43d
262023-12-27 10:13:27.744 INFO 1 --- [ main] s.c.l.p.BladePropertySourcePostProcessor : BladePropertySourcePostProcessor init.
272023-12-27 10:13:28.072 INFO 1 --- [ main] s.c.l.p.BladePropertySourcePostProcessor : BladePropertySourcePostProcessor process @BladePropertySource bean.
282023-12-27 10:13:32.854 WARN 1 --- [ main] io.undertow.websockets.jsr : UT026010: Buffer pool was not set on WebSocketDeploymentInfo, the default pool will be used
292023-12-27 10:13:32.949 INFO 1 --- [ main] io.undertow.servlet : Initializing Spring embedded WebApplicationContext
302023-12-27 10:13:32.950 INFO 1 --- [ main] w.s.c.ServletWebServerApplicationContext : Root WebApplicationContext: initialization completed in 12257 ms
312023-12-27 10:13:33.793 INFO 1 --- [ main] c.a.d.s.b.a.DruidDataSourceAutoConfigure : Init DruidDataSource
322023-12-27 10:13:36.225 ERROR 1 --- [ main] com.alibaba.druid.pool.DruidDataSource : init datasource error, url: ${blade.datasource.test.url}
33
34java.sql.SQLException: connect error, url ${blade.datasource.test.url}, driverClass com.mysql.cj.jdbc.Driver


connect error, url ${blade.datasource.test.url}, driverClass com.mysql.cj.jdbc.Driver

是没有获取到nacos中的url配置?麻烦给指个方向到哪去调试。


2条回答
提交回复