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

Monger does not support Atlas Serverless #27385

Closed
MohamedMohsenX2 opened this issue Dec 22, 2022 · 12 comments
Closed

Monger does not support Atlas Serverless #27385

MohamedMohsenX2 opened this issue Dec 22, 2022 · 12 comments

Comments

@MohamedMohsenX2
Copy link

MohamedMohsenX2 commented Dec 22, 2022

Metabase cannot connect to Atlas Serverless since the driver Monger provides will return an error:

Error log

[0beb7cee-43c6-473a-b0a8-57133f8920ee] 2022-12-22T19:40:37+02:00 ERROR metabase.api.database Cannot connect to Database
clojure.lang.ExceptionInfo: A TXT record is only permitted to contain the keys [authsource, replicaset], but the TXT record for 'xxxxxxxx-pe-0.3jmfx.mongodb.net' contains the keys [loadbalanced, authsource] {:message "A TXT record is only permitted to contain the keys [authsource, replicaset], but the TXT record for 'xxxxxxx-pe-0.3jmfx.mongodb.net' contains the keys [loadbalanced, authsource]"}
at metabase.driver.util$can_connect_with_details_QMARK_.invokeStatic(util.clj:153)
at metabase.driver.util$can_connect_with_details_QMARK_.doInvoke(util.clj:126)
at clojure.lang.RestFn.invoke(RestFn.java:442)
at metabase.api.database$test_database_connection.invokeStatic(database.clj:598)
at metabase.api.database$test_database_connection.doInvoke(database.clj:588)
at clojure.lang.RestFn.invoke(RestFn.java:425)
at metabase.api.database$fn__78606$test_connection_details__78611$fn__78612.invoke(database.clj:651)
at metabase.api.database$fn__78606$test_connection_details__78611.invoke(database.clj:632)
at metabase.api.database$fn__78639.invokeStatic(database.clj:669)
at metabase.api.database$fn__78639.invoke(database.clj:655)
at compojure.core$wrap_response$fn__29287.invoke(core.clj:160)
at compojure.core$wrap_route_middleware$fn__29271.invoke(core.clj:132)
at compojure.core$wrap_route_info$fn__29276.invoke(core.clj:139)
at compojure.core$wrap_route_matches$fn__29280.invoke(core.clj:151)
at compojure.core$routes$fn__29299$f__29300.invoke(core.clj:198)
at compojure.core$routes$fn__29299$f__29300$respond_SINGLEQUOTE___29301.invoke(core.clj:197)
at compojure.core$wrap_route_matches$fn__29280.invoke(core.clj:152)
at compojure.core$routes$fn__29299$f__29300.invoke(core.clj:198)
at compojure.core$routes$fn__29299.invoke(core.clj:200)
at metabase.server.middleware.auth$enforce_authentication$fn__70471.invoke(auth.clj:14)
at compojure.core$routes$fn__29299$f__29300.invoke(core.clj:198)
at compojure.core$routes$fn__29299.invoke(core.clj:200)
at compojure.core$make_context$handler__29327.invoke(core.clj:289)
at compojure.core$make_context$fn__29331.invoke(core.clj:299)
at compojure.core$routes$fn__29299$f__29300.invoke(core.clj:198)
at compojure.core$routes$fn__29299$f__29300$respond_SINGLEQUOTE___29301.invoke(core.clj:197)
at compojure.core$make_context$fn__29331.invoke(core.clj:300)
at compojure.core$routes$fn__29299$f__29300.invoke(core.clj:198)
at compojure.core$routes$fn__29299$f__29300$respond_SINGLEQUOTE___29301.invoke(core.clj:197)
at compojure.core$make_context$fn__29331.invoke(core.clj:300)
at compojure.core$routes$fn__29299$f__29300.invoke(core.clj:198)
at compojure.core$routes$fn__29299$f__29300$respond_SINGLEQUOTE___29301.invoke(core.clj:197)
at compojure.core$make_context$fn__29331.invoke(core.clj:300)
at compojure.core$routes$fn__29299$f__29300.invoke(core.clj:198)
at compojure.core$routes$fn__29299$f__29300$respond_SINGLEQUOTE___29301.invoke(core.clj:197)
at compojure.core$make_context$fn__29331.invoke(core.clj:300)
at compojure.core$routes$fn__29299$f__29300.invoke(core.clj:198)
at compojure.core$routes$fn__29299$f__29300$respond_SINGLEQUOTE___29301.invoke(core.clj:197)
at compojure.core$make_context$fn__29331.invoke(core.clj:300)
at compojure.core$routes$fn__29299$f__29300.invoke(core.clj:198)
at compojure.core$routes$fn__29299$f__29300$respond_SINGLEQUOTE___29301.invoke(core.clj:197)
at compojure.core$make_context$fn__29331.invoke(core.clj:300)
at compojure.core$routes$fn__29299$f__29300.invoke(core.clj:198)
at compojure.core$routes$fn__29299$f__29300$respond_SINGLEQUOTE___29301.invoke(core.clj:197)
at compojure.core$make_context$fn__29331.invoke(core.clj:300)
at compojure.core$routes$fn__29299$f__29300.invoke(core.clj:198)
at compojure.core$routes$fn__29299$f__29300$respond_SINGLEQUOTE___29301.invoke(core.clj:197)
at compojure.core$make_context$fn__29331.invoke(core.clj:300)
at compojure.core$routes$fn__29299$f__29300.invoke(core.clj:198)
at compojure.core$routes$fn__29299$f__29300$respond_SINGLEQUOTE___29301.invoke(core.clj:197)
at compojure.core$make_context$fn__29331.invoke(core.clj:300)
at compojure.core$routes$fn__29299$f__29300.invoke(core.clj:198)
at compojure.core$routes$fn__29299$f__29300$respond_SINGLEQUOTE___29301.invoke(core.clj:197)
at metabase.api.routes$fn__82423$fn__82426.invoke(routes.clj:64)
at compojure.core$routes$fn__29299$f__29300.invoke(core.clj:198)
at compojure.core$routes$fn__29299.invoke(core.clj:200)
at clojure.lang.AFn.applyToHelper(AFn.java:160)
at clojure.lang.AFn.applyTo(AFn.java:144)
at clojure.core$apply.invokeStatic(core.clj:667)
at clojure.core$apply.invoke(core.clj:662)
at metabase.server.routes$fn__82586$fn__82587.doInvoke(routes.clj:67)
at clojure.lang.RestFn.invoke(RestFn.java:436)
at compojure.core$routes$fn__29299$f__29300.invoke(core.clj:198)
at compojure.core$routes$fn__29299.invoke(core.clj:200)
at compojure.core$make_context$handler__29327.invoke(core.clj:289)
at compojure.core$make_context$fn__29331.invoke(core.clj:299)
at compojure.core$routes$fn__29299$f__29300.invoke(core.clj:198)
at compojure.core$routes$fn__29299$f__29300$respond_SINGLEQUOTE___29301.invoke(core.clj:197)
at compojure.core$wrap_route_matches$fn__29280.invoke(core.clj:153)
at compojure.core$routes$fn__29299$f__29300.invoke(core.clj:198)
at compojure.core$routes$fn__29299$f__29300$respond_SINGLEQUOTE___29301.invoke(core.clj:197)
at compojure.core$wrap_route_matches$fn__29280.invoke(core.clj:153)
at compojure.core$routes$fn__29299$f__29300.invoke(core.clj:198)
at compojure.core$routes$fn__29299$f__29300$respond_SINGLEQUOTE___29301.invoke(core.clj:197)
at compojure.core$wrap_route_matches$fn__29280.invoke(core.clj:153)
at compojure.core$routes$fn__29299$f__29300.invoke(core.clj:198)
at compojure.core$routes$fn__29299$f__29300$respond_SINGLEQUOTE___29301.invoke(core.clj:197)
at metabase.server.routes$fn__82572$fn__82574.invoke(routes.clj:45)
at compojure.core$routes$fn__29299$f__29300.invoke(core.clj:198)
at compojure.core$routes$fn__29299.invoke(core.clj:200)
at metabase.server.middleware.exceptions$catch_uncaught_exceptions$fn__78945.invoke(exceptions.clj:98)
at metabase.server.middleware.exceptions$catch_api_exceptions$fn__78942.invoke(exceptions.clj:86)
at metabase.server.middleware.log$log_api_call$fn__83998$fn__83999$fn__84000.invoke(log.clj:211)
at metabase.driver.sql_jdbc.execute.diagnostic$do_with_diagnostic_info.invokeStatic(diagnostic.clj:15)
at metabase.driver.sql_jdbc.execute.diagnostic$do_with_diagnostic_info.invoke(diagnostic.clj:9)
at metabase.server.middleware.log$log_api_call$fn__83998$fn__83999.invoke(log.clj:203)
at toucan.db$_do_with_call_counting.invokeStatic(db.clj:236)
at toucan.db$do_with_call_counting.invoke(db.clj:229)
at metabase.server.middleware.log$log_api_call$fn__83998.invoke(log.clj:202)
at metabase.server.middleware.browser_cookie$ensure_browser_id_cookie$fn__86895.invoke(browser_cookie.clj:38)
at metabase.server.middleware.security$add_security_headers$fn__63843.invoke(security.clj:149)
at metabase.server.middleware.json$wrap_json_body$fn__86026.invoke(json.clj:63)
at metabase.server.middleware.json$wrap_streamed_json_response$fn__86044.invoke(json.clj:99)
at metabase.server.middleware.offset_paging$handle_paging$fn__63867.invoke(offset_paging.clj:42)
at ring.middleware.keyword_params$wrap_keyword_params$fn__87162.invoke(keyword_params.clj:55)
at ring.middleware.params$wrap_params$fn__87181.invoke(params.clj:77)
at metabase.server.middleware.misc$maybe_set_site_url$fn__36664.invoke(misc.clj:59)
at metabase.server.middleware.session$reset_session_timeout$fn__48310.invoke(session.clj:394)
at metabase.server.middleware.session$bind_current_user$fn__48293$fn__48294.invoke(session.clj:331)
at metabase.server.middleware.session$do_with_current_user.invokeStatic(session.clj:310)
at metabase.server.middleware.session$do_with_current_user.invoke(session.clj:299)
at metabase.server.middleware.session$bind_current_user$fn__48293.invoke(session.clj:330)
at metabase.server.middleware.session$wrap_current_user_info$fn__48275.invoke(session.clj:280)
at metabase.server.middleware.session$wrap_session_id$fn__48259.invoke(session.clj:213)
at metabase.server.middleware.auth$wrap_api_key$fn__70479.invoke(auth.clj:27)
at ring.middleware.cookies$wrap_cookies$fn__87082.invoke(cookies.clj:216)
at metabase.server.middleware.misc$add_content_type$fn__36647.invoke(misc.clj:27)
at metabase.server.middleware.misc$disable_streaming_buffering$fn__36672.invoke(misc.clj:76)
at ring.middleware.gzip$wrap_gzip$fn__87124.invoke(gzip.clj:86)
at metabase.server.middleware.misc$bind_request$fn__36675.invoke(misc.clj:93)
at metabase.server.middleware.ssl$redirect_to_https_middleware$fn__86911.invoke(ssl.clj:38)
at metabase.server$async_proxy_handler$fn__82794.invoke(server.clj:73)
at metabase.server.proxy$org.eclipse.jetty.server.handler.AbstractHandler$ff19274a.handle(Unknown Source)
at org.eclipse.jetty.server.handler.StatisticsHandler.handle(StatisticsHandler.java:181)
at org.eclipse.jetty.server.handler.HandlerWrapper.handle(HandlerWrapper.java:127)
at org.eclipse.jetty.server.Server.handle(Server.java:516)
at org.eclipse.jetty.server.HttpChannel.lambda$handle$1(HttpChannel.java:487)
at org.eclipse.jetty.server.HttpChannel.dispatch(HttpChannel.java:732)
at org.eclipse.jetty.server.HttpChannel.handle(HttpChannel.java:479)
at org.eclipse.jetty.server.HttpConnection.onFillable(HttpConnection.java:277)
at org.eclipse.jetty.io.AbstractConnection$ReadCallback.succeeded(AbstractConnection.java:311)
at org.eclipse.jetty.io.FillInterest.fillable(FillInterest.java:105)
at org.eclipse.jetty.io.ChannelEndPoint$1.run(ChannelEndPoint.java:104)
at org.eclipse.jetty.util.thread.strategy.EatWhatYouKill.runTask(EatWhatYouKill.java:338)
at org.eclipse.jetty.util.thread.strategy.EatWhatYouKill.doProduce(EatWhatYouKill.java:315)
at org.eclipse.jetty.util.thread.strategy.EatWhatYouKill.tryProduce(EatWhatYouKill.java:173)
at org.eclipse.jetty.util.thread.strategy.EatWhatYouKill.run(EatWhatYouKill.java:131)
at org.eclipse.jetty.util.thread.ReservedThreadExecutor$ReservedThread.run(ReservedThreadExecutor.java:409)
at org.eclipse.jetty.util.thread.QueuedThreadPool.runJob(QueuedThreadPool.java:883)
at org.eclipse.jetty.util.thread.QueuedThreadPool$Runner.run(QueuedThreadPool.java:1034)
at java.base/java.lang.Thread.run(Thread.java:829)
Caused by: com.mongodb.MongoConfigurationException: A TXT record is only permitted to contain the keys [authsource, replicaset], but the TXT record for 'xxxxxxxxxxxx-pe-0.3jmfx.mongodb.net' contains the keys [loadbalanced, authsource]
at com.mongodb.ConnectionString.(ConnectionString.java:359)
at com.mongodb.MongoClientURI.(MongoClientURI.java:238)
at metabase.driver.mongo.util$srv_connection_info.invokeStatic(util.clj:149)
at metabase.driver.mongo.util$srv_connection_info.invoke(util.clj:137)
at metabase.driver.mongo.util$details__GT_mongo_connection_info.invokeStatic(util.clj:176)
at metabase.driver.mongo.util$details__GT_mongo_connection_info.invoke(util.clj:174)
at metabase.driver.mongo.util$do_with_mongo_connection$fn__97055.invoke(util.clj:221)
at metabase.util.ssh$do_with_ssh_tunnel.invokeStatic(ssh.clj:139)
at metabase.util.ssh$do_with_ssh_tunnel.invoke(ssh.clj:128)
at metabase.driver.mongo.util$do_with_mongo_connection.invokeStatic(util.clj:220)
at metabase.driver.mongo.util$do_with_mongo_connection.invoke(util.clj:215)
at metabase.driver.mongo$fn__98622.invokeStatic(mongo.clj:50)
at metabase.driver.mongo$fn__98622.invoke(mongo.clj:48)
at clojure.lang.MultiFn.invoke(MultiFn.java:234)
at metabase.driver.util$can_connect_with_details_QMARK
$fn__33762.invoke(util.clj:138)
at clojure.core$binding_conveyor_fn$fn__5823.invoke(core.clj:2047)
at clojure.lang.AFn.call(AFn.java:18)
at java.base/java.util.concurrent.FutureTask.run(FutureTask.java:264)
at java.base/java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1128)
at java.base/java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:628)
... 1 more

@MohamedMohsenX2 MohamedMohsenX2 added .Needs Triage Type:Question Please use the forum: https://discourse.metabase.com/ labels Dec 22, 2022
@paoliniluis

This comment was marked as off-topic.

@paoliniluis
Copy link
Contributor

See michaelklishin/monger#221, we have a problem on the upstream

@paoliniluis paoliniluis reopened this Dec 22, 2022
@paoliniluis paoliniluis changed the title Atlas Serverless connect issue Monger does not support Atlas Serverless Dec 22, 2022
@paoliniluis paoliniluis added Type:Tech Debt or Refactoring Database/Mongo .Backend and removed Type:Question Please use the forum: https://discourse.metabase.com/ .Needs Triage labels Dec 22, 2022
@Newtoniano
Copy link

You might wanna consider dropping Monger in favor of some other solution, because as mentioned here Monger support for the more recent MongoDB drivers and features doesn't seem that likely

@yoanndefay

This comment was marked as off-topic.

@leobiscassi
Copy link

FYI: I tried to connect with Metabase v0.46.6 yesterday and was getting the same error, it worked with an atlas dedicated cluster (M10)

@hbselcuk
Copy link

hbselcuk commented Aug 8, 2023

i tried to connect to MongoDB Serverless today and had the same issue.

A TXT record is only permitted to contain the keys [authsource, replicaset], but the TXT record for 'p***.4***.mongodb.net' contains the keys [loadbalanced, authsource]

Metabase version: 0.46.6.4

Do you have plans to fix this?

@vedavrat-patwardhan
Copy link

vedavrat-patwardhan commented Aug 30, 2023

It's working with atlas cluster but not with serverless instance getting same error message as @hbselcuk when I try to connect. Is there any work around for serverless issue?

@paoliniluis
Copy link
Contributor

No, our driver does not support Atlas Serverless and there's no current plan for it

@vedavrat-patwardhan
Copy link

@paoliniluis, thank you for the clarification. Do you anticipate any future revisions to the driver that might enable support for Atlas Serverless, or is this not on the roadmap at this time?

@paoliniluis
Copy link
Contributor

@vedavrat-patwardhan not on the roadmap for now

@bshepherdson
Copy link
Contributor

@lbrdnk I know you were looking at removing monger previously. Does that have any impact on this bug? How far are we from supporting Atlas Serverless now that Metabase doesn't use Monger?

@lbrdnk
Copy link
Contributor

lbrdnk commented Mar 4, 2024

Thanks for the notice. I can confirm successfully connecting to Mongo Atlas serverless deployment on today's master (6d34b9e; changes from the PR #38017 in place). Hence closing the issue as completed.

@lbrdnk lbrdnk closed this as completed Mar 4, 2024
@lbrdnk lbrdnk added this to the 0.49 milestone Mar 4, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

9 participants