79102857

Date: 2024-10-18 16:18:01
Score: 1
Natty:
Report link

For anyone facing the same problem:

<dependency>
    <groupId>de.bwaldvogel</groupId>
    <artifactId>mongo-java-server</artifactId>
    <version>1.45.0</version>
</dependency>

is not compatible yet with MongoDB hello command.

MONGODB isMaster command

since MongoDB 4.0 spring-boot-actuator 3.2.3 Deprecated since version MongoDB 4.4.2 driver-mongodb-sync 4.11.1

org.springframework.boot.actuate.data.mongo.MongoHealthIndicator

Document result = this.mongoTemplate.executeCommand("{ isMaster: 1 }");  // in doHealthCheck

totally removed in spring-boot-actuator 3.3.3

MONGODB hello command

Is now used in spring-boot-actuator >= 3.3.3 driver-mongodb-sync 5.0.1

org.springframework.boot.actuate.data.mongo.MongoHealthIndicator

Document result = this.mongoTemplate.executeCommand("{ hello: 1 }");  // in doHealthCheck

Hop this will help you.

Reasons:
  • Whitelisted phrase (-2): For anyone facing
  • Long answer (-0.5):
  • Has code block (-0.5):
  • Me too answer (2.5): facing the same problem
  • Self-answer (0.5):
  • Low reputation (1):
Posted by: Wilfried