-
Notifications
You must be signed in to change notification settings - Fork 41.5k
Closed
Labels
type: bugA general bugA general bug
Milestone
Description
MongoHealtIndicator
uses command { serverStatus: 1 }
to check MongoDB connection status. This command fails in case user has insufficient privileges in database.
For example if MongoDB user account has only built in roles read and/or readWrite assigned. As result misleading message is shown in /health
output:
"mongo":{"status":"DOWN","error":"java.lang.IllegalArgumentException: Data must not be null"}
Proposed solution: use MongoDB command { buildInfo: 1 }
to get server version. This command is working with built in roles read, readWrite, userAdmin.
MongoDB version used: 2.6.3.
Not tested with other versions.
Not tested with all built in roles.
Metadata
Metadata
Assignees
Labels
type: bugA general bugA general bug