Problem
Since the v0.25.2 deploy, the newschart container reports unhealthy and /actuator/health returns 503 on live — while the app itself serves fine (all /api/news/* endpoints return 200; data queries against Atlas work normally).
Two things intersected:
- v0.25.2 added a Docker healthcheck polling
/actuator/health — this made a pre-existing 503 visible for the first time.
- Spring Boot 4.0 rewrote
MongoHealthIndicator (spring-boot#47051): instead of one hello command against the configured database (Boot 3.x behaviour), it now iterates listDatabaseNames() and runs {hello: 1} against every database. On Atlas, that list includes system DBs (local, admin) that the app user can list but not run commands on:
com.mongodb.MongoCommandException: Command execution failed on MongoDB server with error 8000
(AtlasError): '(Unauthorized) not authorized on local to execute command { hello: 1, ... }'
The whole health check throws → DOWN → 503 → Docker marks the container unhealthy.
This is a confirmed upstream regression: spring-boot#50727 (same failure mode, plus a connection-count explosion for fleets). Fixed upstream in PR #50734, milestone 4.0.8 — the indicator will run hello once against admin, which any authenticated Atlas user is allowed to do. Not yet released (latest is 4.0.7; even 4.1.0 GA still has the broken loop).
Workaround in place
management.health.mongodb.enabled=false in application.properties — disables the Mongo health indicator so /actuator/health returns 200 and the container healthcheck passes. Trade-off: no Mongo connectivity signal in health output until the upstream fix arrives.
On hold until Spring Boot 4.0.8 is released
Problem
Since the v0.25.2 deploy, the newschart container reports unhealthy and
/actuator/healthreturns 503 on live — while the app itself serves fine (all/api/news/*endpoints return 200; data queries against Atlas work normally).Two things intersected:
/actuator/health— this made a pre-existing 503 visible for the first time.MongoHealthIndicator(spring-boot#47051): instead of onehellocommand against the configured database (Boot 3.x behaviour), it now iterateslistDatabaseNames()and runs{hello: 1}against every database. On Atlas, that list includes system DBs (local,admin) that the app user can list but not run commands on:The whole health check throws →
DOWN→ 503 → Docker marks the container unhealthy.This is a confirmed upstream regression: spring-boot#50727 (same failure mode, plus a connection-count explosion for fleets). Fixed upstream in PR #50734, milestone 4.0.8 — the indicator will run
helloonce againstadmin, which any authenticated Atlas user is allowed to do. Not yet released (latest is 4.0.7; even 4.1.0 GA still has the broken loop).Workaround in place
management.health.mongodb.enabled=falseinapplication.properties— disables the Mongo health indicator so/actuator/healthreturns 200 and the container healthcheck passes. Trade-off: no Mongo connectivity signal in health output until the upstream fix arrives.On hold until Spring Boot 4.0.8 is released
management.health.mongodb.enabled=falsefromapplication.properties, restoring the (now Atlas-safe) built-in Mongo health check/actuator/healthreturns 200 with a Mongo component reported UP, and the container shows healthy