首页 新闻 会员 周边

s.c.bus执行busrefresh失败

0
悬赏园豆:5 [已关闭问题] 关闭于 2021-08-19 13:45

spring boot 2.5.2、spring cloud 2020.0.3

在 客户端服务 调用 /actuator/busrefresh 时,执行失败,从配置中心获取配置失败。
此时,配置中心CONFIGSERVER 已经注册到了注册中心。

日志显示,执行 上面的URL时,现实下面的信息:
o.s.b.context.config.ConfigDataLoader : Fetching config from server at : http://CONFIGSERVER
o.s.b.context.config.ConfigDataLoader : Connect Timeout Exception on Url - http://CONFIGSERVER. Will be trying the next url if available

检查启动时的日志,在从配置中心 获取配置时,有下面的日志:
o.s.b.context.config.ConfigDataLoader : Fetching config from server at : http://192.168.184.197:10000/

显示已经将 CONFIGSERVER 转换为 IP:PORT 的方式了。

问题是:
为何后来执行 /actuator/busrefresh 却没有如 启动时 这么做呢?奇怪

问题补充:

问题发生时的配置:
spring.config.import=optional:configserver:http://CONFIGSERVER

更改为下面的配置——直接指向 配置中心——时,执行 busrefresh 是成功的:
spring.config.import=optional:configserver:http://localhost:10000/

快乐的凡人721的主页 快乐的凡人721 | 老鸟四级 | 园豆:3969
提问于:2021-08-19 12:52
< >
分享
清除回答草稿
   您需要登录以后才能回答,未注册用户请先注册