{"record":{"id":"413647715b3deaf9","repo":"quarkusio/quarkus","slug":"unable-to-obtain-configuration-from-spring-cloud-c","errorCode":null,"errorMessage":"Unable to obtain configuration from Spring Cloud Config Server at ${config.url()}","messagePattern":"Unable to obtain configuration from Spring Cloud Config Server at (.+?)","errorType":"exception","errorClass":"RuntimeException","httpStatus":null,"severity":"critical","filePath":"extensions/spring-cloud-config-client/runtime/src/main/java/io/quarkus/spring/cloud/config/client/runtime/SpringCloudConfigClientConfigSourceFactory.java","lineNumber":84,"sourceCode":"            Collections.reverse(propertySources);\n\n            for (int i = 0, propertySourcesSize = propertySources.size(); i < propertySourcesSize; i++) {\n                int ordinal = config.ordinal() + i;\n                PropertySource propertySource = propertySources.get(i);\n                if (log.isDebugEnabled()) {\n                    log.debug(\"Adding PropertySource named '\" + propertySource.getName() + \"', with and ordinal of '\" + ordinal\n                            + \"' that contains the following keys: \" + join(\",\", propertySource.getSource().keySet()));\n                }\n                sources.add(new MapBackedConfigSource(propertySource.getName(), propertySource.getSource(), ordinal) {\n                });\n            }\n\n            return sources;\n\n        } catch (Exception e) {\n            final String errorMessage = \"Unable to obtain configuration from Spring Cloud Config Server at \" + config.url();\n            if (config.failFast()) {\n                throw new RuntimeException(errorMessage, e);\n            } else {\n                log.error(errorMessage, e);\n                return emptyList();\n            }\n        } finally {\n            client.close();\n        }\n    }\n\n    private static String determineProfiles(ConfigSourceContext context, SpringCloudConfigClientConfig config) {\n        if (config.profiles().isPresent()) {\n            return join(\",\", config.profiles().get());\n        }\n        // The profile list starts with the profile overrides, but setting the property is done backwards\n        List<String> profiles = new ArrayList<>(context.getProfiles());\n        Collections.reverse(profiles);\n        return join(\",\", profiles);\n    }","sourceCodeStart":66,"sourceCodeEnd":102,"githubUrl":"https://github.com/quarkusio/quarkus/blob/e1c734241f34c7919086ceb4c9262b4a58f6de44/extensions/spring-cloud-config-client/runtime/src/main/java/io/quarkus/spring/cloud/config/client/runtime/SpringCloudConfigClientConfigSourceFactory.java#L66-L102","documentation":"SpringCloudConfigClientConfigSourceFactory.getConfigSources() contacts the Spring Cloud Config Server during static init to fetch configuration. If any step (DNS, connect, HTTP, parsing) fails, it either throws a RuntimeException wrapping the cause when quarkus.spring-cloud-config.fail-fast=true, or logs the error and returns an empty source list. The message includes the configured server URL for diagnosis.","triggerScenarios":"Config Server unreachable (wrong host/port, network down, DNS failure), server returning non-200 (e.g. 401/404), TLS errors, or response parsing problems while loading config at application startup with fail-fast enabled.","commonSituations":"Container started before the Config Server was ready; wrong quarkus.spring-cloud-config.url; missing credentials when the server requires auth; corporate proxy blocking the request.","solutions":["Verify the Config Server is reachable at the configured URL (curl it from the same network)","Set quarkus.spring-cloud-config.fail-fast=false if config should be optional and the app can start without it","Add credentials/proxy settings if the server requires them; fix DNS or connection-wait using quarkus.http or startup ordering (e.g. wait-for services)"],"exampleFix":"// before\nquarkus.spring-cloud-config.fail-fast=true\nquarkus.spring-cloud-config.url=http://wrong-host:8888\n\n// after\nquarkus.spring-cloud-config.fail-fast=true\nquarkus.spring-cloud-config.url=http://config-server:8888","handlingStrategy":"try-catch","validationCode":"// preflight check before startup (script/CI)\ncurl -fsS \"$CONFIG_URL/<app>/<profile>\" > /dev/null || echo \"Config Server unreachable\"","typeGuard":null,"tryCatchPattern":"try {\n    quarkus.run();\n} catch (RuntimeException e) {\n    if (e.getMessage().startsWith(\"Unable to obtain configuration from Spring Cloud Config Server\")) {\n        log.error(\"Config Server unreachable; check url/network/credentials\", e);\n    }\n}","preventionTips":["Health-check the Config Server before starting apps (init containers, wait-for)","Set fail-fast=false only when the app tolerates missing remote config","Monitor network/DNS from the deployment environment"],"tags":["quarkus","spring-cloud-config","network","startup","config-server"],"backgroundTag":"config-server-unreachable","analyzedSha":"e1c734241f34c7919086ceb4c9262b4a58f6de44","analyzedAt":"2026-09-05T17:01:29.979Z","contentChangedAt":"2026-09-05T17:01:29.979Z","schemaVersion":2},"datasetVersion":"2026-09-12T22:17:10.623Z"}