config-client 中eureka 配置问题
来源:6-3 Config Client
王飞0123
2019-07-12
1 配置文件已经修改 :bootstrap.yml
2 eureka的配置 也 从git中 调整到 bootstrap.yml 中
3 容器可以启动并注册成功 ,但是日志中显示,并没有拉取到git中的配置文件,而且报错
Fetching config from server at : http://a690050cb982:8888/
2019/7/11 下午6:49:402019-07-11 10:49:40.818 INFO 1 --- [ main] c.c.c.ConfigServicePropertySourceLocator : Connect Timeout Exception on Url - http://a690050cb982:8888/. Will be trying the next url if available
2019/7/11 下午6:49:402019-07-11 10:49:40.819 WARN 1 --- [ main] c.c.c.ConfigServicePropertySourceLocator : Could not locate PropertySource: I/O error on GET request for "http://a690050cb982:8888/api-feign/test": a690050cb982; nested exception is java.net.UnknownHostException: a690050cb982
2019/7/11 下午6:49:402019-07-11 10:49:40.822 INFO 1 --- [ main] com.star.ekapi.EkApiApplication : No active profile set, falling back to default profiles: default
2019/7/11 下午6:49:412019-07-11 10:49:41.940 INFO 1 --- [ main] o.s.cloud.context.scope.GenericScope : BeanFactory id=aaeb3741-cd5e-32e9-a8f2-f2a2ec6390f7
2019/7/11 下午6:49:412019-07-11 10:49:41.975 INFO 1 --- [ main] trationDelegate$BeanPostProcessorChecker : Bean 'com.star.ekapi.TestService' of type [org.springframework.cloud.openfeign.FeignClientFactoryBean] is not eligible for getting processed by all BeanPostProcessors (for example: not eligible for auto-proxying)
2019/7/11 下午6:49:422019-07-11 10:49:42.070 INFO 1 --- [ main] trationDelegate$BeanPostProcessorChecker : Bean 'org.springframework.cloud.autoconfigure.ConfigurationPropertiesRebinderAutoConfiguration' of type [org.springframework.cloud.autoconfigure.ConfigurationPropertiesRebinderAutoConfiguration$$EnhancerBySpringCGLIB$$737c6838] is not eligible for getting processed by all BeanPostProcessors (for example: not eligible for auto-proxying)
2019/7/11 下午6:49:422019-07-11 10:49:42.659 INFO 1 --- [ main] o.s.b.w.embedded.tomcat.TomcatWebServer : Tomcat initialized with port(s): 8080 (http)
写回答
2回答
-
你看到容器部署部分了?那应该看到视频里有提到,这是因为没有显示真实的ip, 如果要显示,需要加个配置
eureka: instance: prefer-ip-address: true
162019-07-15 -
精慕门9846482
2019-07-12
估计是加载顺序的问题
00
SpringCloud Finchley(M2+RELEASE+SR2)微服务实战
SpringCloud组件实现微服务,【已升级Finchley.Release】
5668 学习 · 2489 问题
相似问题