Skip to content
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

Improve the DNS lookup support in native mode for the Mongo connection using mongo:srv:// #23585

Merged

Conversation

cescoffier
Copy link
Member

Fix #23548

NOTE: I was unable to test against a serverless instance.

* DNS lookup. It can be useful to understand why the lookup fails.
*/
@ConfigItem(name = "native.dns.log-activity", defaultValue = "false")
public Optional<Boolean> dnsLookupLogActivityInNativeMode;
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Is this really a native mode only option?

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Yes, we had to replace the dns lookup in native (via substitutions), because it was using jndi. I replaced it with some vertx code. However, dns lookup is sometimes close to rocket science, and to understand what's going on, we may need the dns frames.

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks for the information!

So even if set in JVM mode, no logging information would be displayed?

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

No, in JVM it uses ... JNDI. Nothing we can do, the Mongo client does not allow changing this default behavior.

@cescoffier cescoffier merged commit cbf9dad into quarkusio:main Feb 13, 2022
@quarkus-bot quarkus-bot bot added this to the 2.8 - main milestone Feb 13, 2022
@gsmet gsmet modified the milestones: 2.8 - main, 2.7.2.Final Feb 21, 2022
@cescoffier cescoffier deleted the improve-mongo-dns-lookup-in-native branch March 15, 2022 07:17
@evanchooly evanchooly mentioned this pull request Jun 13, 2022
4 tasks
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

(vert.x-eventloop-thread-1) Unable to look up TXT record for host serverlessinstance0.oagmp.mongodb.net
3 participants