apollo热部署数据更新失败请教 #5052
Replies: 3 comments
-
|
🤖 Hello @yanaizhang24! 👋 I'm Dosu, a friendly bot here to lend a hand with bugs, answer questions, and help you contribute to this project while we wait for a human maintainer. Just a reminder, I'm here to assist, not replace our human teammates. Let's get started, shall we? 😊 您遇到的问题可能是由于Apollo服务器配置不正确。Apollo服务器需要知道如何连接到您之前创建的数据库。数据库连接字符串信息位于您下载的zip文件中的 您需要确保正确填写了ApolloConfigDB数据库连接字符串信息,并且用户名和密码后面不能有空格。配置应如下所示: # DataSource
spring.datasource.url = jdbc:mysql://localhost:3306/ApolloConfigDB?useSSL=false&characterEncoding=utf8
spring.datasource.username = someuser
spring.datasource.password = somepwd此外,Apollo Portal需要在不同的环境中访问不同的元服务(apollo-configservice)地址,因此您需要在配置中提供此信息。元服务的地址是配置服务的地址。您可以通过ApolloPortalDB.ServerConfig中的配置项配置Meta Service地址。 例如,如果DEV的apollo-config服务在1.1.1.1:8080上没有绑定域名,您可以按照以下格式修改每个环境元服务地址: dev.meta=http://1.1.1.1:8080请确保在您的服务器环境中正确设置了这些配置。如果问题仍然存在,可能是由于提供的上下文中未涵盖的其他因素。 关于您遇到的问题,我在Apollo的问题跟踪中找到了一些类似的已解决问题,可能对您有所帮助:
关于Apollo 2.2.0版本是否有可能解决Apollo 2.1.0中热部署数据更新失败的问题,我在仓库中没有找到答案,但答案可能在其他地方,或者我可能错过了。如果您有更多信息,或者有其他的问题,欢迎继续提问。 Sources
This response is meant to be useful and save you time. It is not meant to be a precise solution, but rather a starting point for your own research. Help me be more useful! Please leave a 👍 if this is helpful and 👎 if it is irrelevant. If you want to continue the conversation, start your reply with @dosu-bot. |
Beta Was this translation helpful? Give feedback.
-
|
看描述应该是有 -D 参数或 env 设置了配置的值,可以配置下 1.2.4.8 覆盖系统属性 |
Beta Was this translation helpful? Give feedback.
-
Beta Was this translation helpful? Give feedback.
Uh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.
-
1、目前apollo版本2.1.0(服务端、客户端)

2、当前springboot版本2.1.17.RELEASE,spring版本5.1.18
3、出现问题描述:
(1)本地启动服务,更新参数正常,会将最新发布的配置信息同步
(2)服务器上启动服务,参数永远按照初始的数据更新(等于未更新),同时观察到服务器本地/opt/data/config-cache下文件参数已更新
(3)目前跟踪日志查看:AutoUpdateConfigChangeListener 的this.placeholderHelper.resolvePropertyValue(this.beanFactory, springValue.getBeanName(), springValue.getPlaceholder());方法返回永远都是初始加载的值
4、系统日志:
2023-12-18 16:50:25.765 INFO c.c.f.a.s.p.AutoUpdateConfigChangeListener - Auto update apollo changed value successfully, new value: 2000, key: export.limit, beanName: newExportService, field: com.unicom.skyladdernj.mvc.service.newService.NewExportService.exportLimit
5、apollo更新截图
Beta Was this translation helpful? Give feedback.
All reactions