Replies: 1 comment 2 replies
-
可以看下 config service 的日志是否有异常,看日志 http://172.21.23.140:8080/configs/quartz-center/default/TEST1.conet.common?ip=172.21.23.140 这个返回了 404,应该是服务端从数据库没有读取到数据 |
Beta Was this translation helpful? Give feedback.
2 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
-
配置介绍:common是所有服务的公共依赖,有单独的apollo配置,namespeace为:TEST1.conet.common。
apollo版本:用docker安装的apollo1.7.1版本。
问题场景:在测试环境下前一天刚装好环境,并且部署了多个服务,今天下午在部署新的服务时启动报错,日志发现公共依赖项目common读取不到apollo配置,查看启动日志,apollo加载日志如下:
2021-06-23 11:17:00.205 INFO 4612 --- [ main] .s.d.r.c.RepositoryConfigurationDelegate : Multiple Spring Data modules found, entering strict repository configuration mode!
2021-06-23 11:17:00.797 INFO 4612 --- [ main] c.c.f.f.i.p.DefaultApplicationProvider : App ID is set to quartz-center by app.id property from /META-INF/app.properties
2021-06-23 11:17:00.811 INFO 4612 --- [ main] c.c.f.f.i.p.DefaultServerProvider : Environment is set to null. Because it is not available in either (1) JVM system property 'env', (2) OS env variable 'ENV' nor (3) property 'env' from the properties InputStream.
2021-06-23 11:17:01.375 INFO 4612 --- [ main] o.s.cloud.context.scope.GenericScope : BeanFactory id=d977572d-8c7a-324c-b1e0-d41c1cf40ddd
2021-06-23 11:17:01.615 INFO 4612 --- [ main] c.c.f.a.i.DefaultMetaServerProvider : Located meta services from apollo.meta configuration: http://apolloconfig.conet.com:8080!
2021-06-23 11:17:01.630 INFO 4612 --- [ main] c.c.f.apollo.core.MetaDomainConsts : Located meta server address http://apolloconfig.conet.com:8080 for env UNKNOWN from com.ctrip.framework.apollo.internals.DefaultMetaServerProvider
2021-06-23 11:17:01.807 WARN 4612 --- [ main] c.c.f.a.i.RemoteConfigRepository : Load config failed, will retry in 1 SECONDS. appId: quartz-center, cluster: default, namespaces: TEST1.conet.common
2021-06-23 11:17:02.821 WARN 4612 --- [ main] c.c.f.a.i.AbstractConfigRepository : Sync config failed, will retry. Repository class com.ctrip.framework.apollo.internals.RemoteConfigRepository, reason: Load Apollo Config failed - appId: quartz-center, cluster: default, namespace: TEST1.conet.common, url: http://172.21.23.140:8080/configs/quartz-center/default/TEST1.conet.common?ip=172.21.23.140 [Cause: [status code: 404] Could not find config for namespace - appId: quartz-center, cluster: default, namespace: TEST1.conet.common,
please check whether the configs are released in Apollo!]
2021-06-23 11:17:02.839 WARN 4612 --- [ main] c.c.f.a.i.RemoteConfigRepository : Load config failed, will retry in 1 SECONDS. appId: quartz-center, cluster: default, namespaces: TEST1.conet.common
2021-06-23 11:17:03.851 WARN 4612 --- [ 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: quartz-center, cluster: default, namespace: TEST1.conet.common, url: http://172.21.23.140:8080/configs/quartz-center/default/TEST1.conet.common?ip=172.21.23.140 [Cause: [status code: 404] Could not find config for namespace - appId: quartz-center, cluster: default, namespace: TEST1.conet.common, please check whether the configs are released in Apollo!]
2021-06-23 11:17:03.860 WARN 4612 --- [ main] c.c.f.a.i.RemoteConfigRepository : Load config failed, will retry in 1 SECONDS. appId: quartz-center, cluster: default, namespaces: TEST1.conet.common
2021-06-23 11:17:04.871 WARN 4612 --- [ 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: quartz-center, cluster: default, namespace: TEST1.conet.common, url: http://172.21.23.140:8080/configs/quartz-center/default/TEST1.conet.common?ip=172.21.23.140 [Cause: [status code: 404] Could not find config for namespace - appId: quartz-center, cluster: default, namespace: TEST1.conet.common, please check whether the configs are released in Apollo!]
2021-06-23 11:17:04.872 WARN 4612 --- [ main] c.c.f.a.i.AbstractConfigRepository : Sync config failed, will retry. Repository class com.ctrip.framework.apollo.internals.LocalFileConfigRepository, reason: Load config from local config failed! [Cause: Cannot read from local cache file /opt/data/quartz-center/config-cache/quartz-center+default+TEST1.conet.common.properties]
2021-06-23 11:17:04.883 WARN 4612 --- [ main] c.c.f.a.i.RemoteConfigRepository : Load config failed, will retry in 1 SECONDS. appId: quartz-center, cluster: default, namespaces: TEST1.conet.common
2021-06-23 11:17:05.895 WARN 4612 --- [ 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: quartz-center, cluster: default, namespace: TEST1.conet.common, url: http://172.21.23.140:8080/configs/quartz-center/default/TEST1.conet.common?ip=172.21.23.140 [Cause: [status code: 404] Could not find config for namespace - appId: quartz-center, cluster: default, namespace: TEST1.conet.common, please check whether the configs are released in Apollo!]
2021-06-23 11:17:05.896 WARN 4612 --- [ main] c.c.f.apollo.internals.DefaultConfig : Init Apollo Local Config failed - namespace: TEST1.conet.common, reason: Load config from local config failed! [Cause: Cannot read from local cache file /opt/data/quartz-center/config-cache/quartz-center+default+TEST1.conet.common.properties].
2021-06-23 11:17:05.968 INFO 4612 --- [ main] f.a.AutowiredAnnotationBeanPostProcessor : JSR-330 'javax.inject.Inject' annotation found and supported for autowiring
2021-06-23 11:17:06.231 WARN 4612 --- [ main] c.c.f.apollo.internals.DefaultConfig : Could not load config for namespace TEST1.conet.common from Apollo, please check whether the configs are released in Apollo! Return default value now!
问题补充:服务器没人动过,控制台中里看到common的实例列表为0,其他服务实例正常,将昨天部署成功的服务对应的data缓存文件删了,重启启动同样拉取不到remote的common配置,docker重启了下apollo又好了,有点疑惑可能是什么原因造成的
Beta Was this translation helpful? Give feedback.
All reactions