-
Notifications
You must be signed in to change notification settings - Fork 40.7k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
MongoHealthIndicator not compliant with Mongo stable API with strict setting #41101
Comments
Thank you. I've reproduced the problem. I think we should switch to the |
Thanks @wilkinsona We implemented that as a temporary workaround locally and it worked for us, but it would be nice to have that supported out of the box. |
Just FYI, the |
FYI: This is not compatible with Azure Cosmos MongoDB API: |
Thanks, @pkunk, but I'm not sure there's much we can do about that. I don't see any mention of In the meantime, anyone who's affected can work around the non-compliance by defining their own bean named |
We have the same @pkunk . Did you already raise this with Microsoft? Would be great if I can follow the progress on this item :) |
No. We just use custom mongoHealthIndicator bean. |
I created a post now, would be great if many people can vote on it 😄 : https://feedback.azure.com/d365community/idea/c7b19748-9276-ef11-a4e6-000d3a059eeb |
Hey @pkunk @SimonedeGijt @wilkinsona . I'm Gahl from the Cosmos DB Product Team. The hello command is already supported in Cosmos DB for MongoDB vCore and Cosmos DB for MongoDB RU. We're adding it to our docs now. Sorry for the confusion here and thanks for pointing this out! |
Good news! Thanks very much, @gahl-levy. |
@gahl-levy is there any setting to enable
My spring boot app is running in App Service, and everything is located in Central US data center. |
@gahl-levy looks like the way actuator does health checks is with Against a mongo shell |
MongoHealthIndicator
usesisMaster
command, which is not part of Mongo's stable API https://www.mongodb.com/docs/v5.0/reference/stable-api-changelog/If the underlying Mongo connection is configured to use the stable API and strict setting, the health indicator yields an error, as Mongo rejects the
isMaster
command.Affected versions: Tested with sprinboot 3.3.0, potentially since 3.0.0
To reproduce it, create a blank springboot project including
spring-boot-starter-data-mongodb
,spring-boot-starter-web
andspring-boot-starter-actuator
dependencies. Then, set up both Mongo stable API version andstrict
totrue
by creating the following bean:For reference, such project has been created here https://github.com/jorgelc/mongo-stable-api-springboot-health, with steps about how to reproduced the error and compare the behaviour with when
strict
is set to false.The text was updated successfully, but these errors were encountered: