Sync config from upstream repository class com.ctrip.framework.apollo.internals.RemoteConfigRepository failed

1 问题分析

Sync config from upstream repository class com.ctrip.framework.apollo.internals.RemoteConfigRepository failed

dev 环境配的是192.168.56.12

而且 拉取配置 的地址是 172.17.0.3

Sync config from upstream repository class com.ctrip.framework.apollo.internals.RemoteConfigRepository failed

 

eureke 的ip 也是 172.17.0.3 开头的

 Sync config from upstream repository class com.ctrip.framework.apollo.internals.RemoteConfigRepository failed

2 解决方案

docker 容器启动时配置地址

EUREKA_INSTANCE_IP_ADDRESS=192.168.56.12

停掉容器 并删除

Sync config from upstream repository class com.ctrip.framework.apollo.internals.RemoteConfigRepository failed

 重启

docker run  --restart=always -p 8080:8080     -e SPRING_DATASOURCE_URL="jdbc:mysql://192.168.56.12:3306/ApolloConfigDB?characterEncoding=utf8"     -e SPRING_DATASOURCE_USERNAME=root -e SPRING_DATASOURCE_PASSWORD=root     -e EUREKA_INSTANCE_IP_ADDRESS=192.168.56.12     -d -v /tmp/logs:/opt/logs --name apollo-configservice apolloconfig/apollo-configservice:1.8.0


docker run  --restart=always -p 8090:8090     -e SPRING_DATASOURCE_URL="jdbc:mysql://192.168.56.12:3306/ApolloConfigDB?characterEncoding=utf8"     -e SPRING_DATASOURCE_USERNAME=root -e SPRING_DATASOURCE_PASSWORD=root     -e EUREKA_INSTANCE_IP_ADDRESS=192.168.56.12     -d -v /tmp/logs:/opt/logs --name apollo-adminservice apolloconfig/apollo-adminservice:1.8.0


docker run --restart=always -p 8070:8070     -e SPRING_DATASOURCE_URL="jdbc:mysql://192.168.56.12:3306/ApolloPortalDB?characterEncoding=utf8"     -e SPRING_DATASOURCE_USERNAME=root -e SPRING_DATASOURCE_PASSWORD=root     -e APOLLO_PORTAL_ENVS=dev     -e DEV_META=http://192.168.56.12:8080 \
    -e EUREKA_INSTANCE_IP_ADDRESS=192.168.56.12     -d -v /tmp/logs:/opt/logs --name apollo-portal apolloconfig/apollo-portal:1.8.0

Sync config from upstream repository class com.ctrip.framework.apollo.internals.RemoteConfigRepository failed

3 验证

再次查看 eureke 的ip,地址 一致

Sync config from upstream repository class com.ctrip.framework.apollo.internals.RemoteConfigRepository failed

项目正常启动 

Sync config from upstream repository class com.ctrip.framework.apollo.internals.RemoteConfigRepository failed

成功在 Apollo上拉取 本地 eureke 的地址 并将服务注册到 本地的注册中心 上

Sync config from upstream repository class com.ctrip.framework.apollo.internals.RemoteConfigRepository failed

Sync config from upstream repository class com.ctrip.framework.apollo.internals.RemoteConfigRepository failed

 

 SUCCESS !!!!!!!!!!!!!!!!!!!!!!!!!

Sync config from upstream repository class com.ctrip.framework.apollo.internals.RemoteConfigRepository failed

上一篇:Oracle常规SQL练习


下一篇:PS鼠绘非常漂亮质感的色轮图标