欢迎使用普元产品知识库,本知识库包含普元应用开发平台EOSPlatform,流程平台BPS,企业服务总线ESB,微服务平台Microservice,运维管理平台Devops,数据集成平台DI
欢迎使用普元文档库
EOS Microservices 5.0 业务应用部署在虚拟机上,使用配置中心,配置中心部署在容器内,业务应用启动时提示,配置中心无法正常连接,提示信息如下:
2020-01-20 10:49:56.819 WARN [ORDER-MANAGE,ORDER-MANAGE,default,xx.xx.xx.xx:ORDER-MANAGE:8881,,,,] 99100
--- [main] c.c.f.a.i.LocalFileConfigRepository : Sync config from upstream repository class com.ctrip.framework.apollo.internals.RemoteConfigRepository failed, reason:
Load Apollo Config failed - appId: ORDER-MANAGE, cluster: default, namespace: application, url: http://xx.xx.xx.xx18081/configs/ORDER-MANAGE/default/application?ip=xx.xx.xx.xx
[Cause: Could not complete get operation [Cause: connect timed out]]
问题原因:项目中配置中心的的adminservice和configservice无法正常通信导致
解决方法:配置中心向注册中心注册时使用宿主机IP注册,配置方式:
将配置中心的docker-compose.yml里network_mode的值设置为host