Skip to content

JDBC Config Server is unhealthy if accept-empty: false #3190

@ilia1243

Description

@ilia1243

Describe the bug
Healthy Spring Cloud Config Server with JDBC backend is considered DOWN, if spring.cloud.config.server.accept-empty=false.

The server still responds properly with 404 or 200 according to the documentation: https://docs.spring.io/spring-cloud-config/reference/server/environment-repository.html and so can be considered healthy.

You can set spring.cloud.config.server.accept-empty to false so that Server would return a HTTP 404 status, if the application is not found.

For example, if there is only one record

INSERT INTO properties (application, profile, label, "KEY", "VALUE")
VALUES ('app1', 'default', 'master', 'key', 'value');

for application that is found the server returns:

curl http://localhost:8080/app1/default

{"name":"app1","profiles":["default"],"label":null,"version":null,"state":null,"propertySources":[{"name":"app1-default","source":{"key":"value"}}]}

and for application that is not found the server returns:

curl http://localhost:8080/app2/default

{"timestamp":"2026-02-12T22:48:26.533Z","status":404,"error":"Not Found","path":"/app2/default"}

This started to reproduce after issue #2749

Sample
https://github.com/ilia1243/spring-cloud-config-allow-empty-unhealthy

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    Status

    Done

    Milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions