apolloconfig / apollo-java

Apollo Java Clients
Apache License 2.0
40 stars 72 forks source link

An inexistent namespace leads to repeated requests. #72

Closed wang-qijia closed 3 months ago

wang-qijia commented 3 months ago

Describe the bug When requesting a non-existent namespace, the logs show three repeated attempts, ultimately affecting the service startup time.

To Reproduce Steps to reproduce the behavior:

  1. configure a non-existent namespace

Expected behavior request a non-existent namespace only once to avoid duplicate requests Screenshots Request logs

0731 10:20:35,949:AbstractConfigRepository:46 Sync config failed, will retry. Repository class com.ctrip.framework.apollo.internals.RemoteConfigRepository, reason: Load Apollo Config failed - appId: test, cluster: default, namespace: application.SandBox, url: http://10.x.x.xxx:8080/configs/test/default/application.SandBox?ip=10.2.3.32 [Cause: ApolloConfigStatusCodeException([status code: 404] Could not find config for namespace - appId: test, cluster: default, namespace: application.SandBox, please check whether the configs are released in Apollo!)]
0731 10:20:36,432:LocalFileConfigRepository:342 Sync config from upstream repository class com.ctrip.framework.apollo.internals.RemoteConfigRepository failed, reason: Load Apollo Config failed - appId: test, cluster: default, namespace: application.SandBox, url: http://10.x.x.xxx:8080/configs/test/default/application.SandBox?ip=10.2.3.32 [Cause: ApolloConfigStatusCodeException([status code: 404] Could not find config for namespace - appId: test, cluster: default, namespace: application.SandBox, please check whether the configs are released in Apollo!)]
0731 10:20:36,433:AbstractConfigRepository:46 Sync config failed, will retry. Repository class com.ctrip.framework.apollo.internals.LocalFileConfigRepository, reason: Load config from local config failed! [Cause: ApolloConfigException(Cannot read from local cache file /opt/data/test/config-cache/test+default+application.SandBox.properties)]
0731 10:20:36,932:LocalFileConfigRepository:342 Sync config from upstream repository class com.ctrip.framework.apollo.internals.RemoteConfigRepository failed, reason: Load Apollo Config failed - appId: test, cluster: default, namespace: application.SandBox, url: http://10.x.x.xxx:8080/configs/test/default/application.SandBox?ip=10.2.3.32 [Cause: ApolloConfigStatusCodeException([status code: 404] Could not find config for namespace - appId: test, cluster: default, namespace: application.SandBox, please check whether the configs are released in Apollo!)]
0731 10:20:36,932:DefaultConfig:342 Init Apollo Local Config failed - namespace: application.SandBox, reason: Load config from local config failed! [Cause: ApolloConfigException(Cannot read from local cache file /opt/data/test/config-cache/test+default+application.SandBox.properties)].

Additional Details & Logs