0

I'm using MongoDB in my server and developed BI tool using cube-js & mongosqld, which worked when mongo was running locally, however after I moved to Atlas using M0 tier I could not connect to it anymore using mongosqld, this is the error I get:

unable to load MongoDB information: failed to create admin session for loading server cluster information: unable to execute command: server selection error: server selection timeout

Checking the documentation again I realized BI Connector is not supported in M0:

https://docs.atlas.mongodb.com/bi-connection/#bi-connection

So I guess this error is expected ?

In that case, what other options I have to develop a visualisation tool while keep using M0 tier ? Of course the preferred way for me is to keep using cube-js app which I already developed.

This is the documentation I used originally and it does mention limitation for free tier but doesn't say it's not supported at all so I'm confused what's the root cause for this error message and if it should work or not:

https://docs.mongodb.com/bi-connector/v2.1/tutorial/connecting-to-atlas/

I also verified I CAN connect using mongo:

mongo mongodb+srv://<my-user>:<my-password>@<my-domain>/<my-db>

however when I try the same uri in mongosqld:

mongosqld --mongo-ssl --sslMode allowSSL --auth --sslPEMKeyFile test.pem --schema <my-schema>.drdl --mongo-uri mongodb+srv://<my-user>:<my-password>@<my-domain>/<my-db>

I get the following error:

when authentication is enabled, admin credentials must be provided with --mongo-username and --mongo-password or in a config file at 'mongodb.net.auth'

I then tried to connect using the following command:

mongosqld --mongo-ssl --sslMode allowSSL --auth --sslPEMKeyFile test.pem --schema <my-schema>.drdl --mongo-uri mongodb+srv://<my-domain>/<my-db> --mongo-username <my-yser> --mongo-password <my-password>

and got this error:

error parsing uri: authsource without username is invalid

then I tried without "srv":

mongosqld --mongo-ssl --sslMode allowSSL --auth --sslPEMKeyFile test.pem --schema <my-schema>.drdl --mongo-uri mongodb://<my-domain>/<my-db> --mongo-username <my-yser> --mongo-password <my-password>

and got the error mentioned originally - "failed to create admin session"

  • What version of mongosqld are you using? SRV URI support requires 2.12.0 or newer. – Stennie Dec 12 '19 at 11:49
  • mongosqld starting: version=v2.13.0 pid=28987 – Tamir Dec 12 '19 at 13:22
0

Your BI Connector links are from different documentation contexts (Atlas vs On-Prem). For an overview of deployment variations, see About the MongoDB Connector for BI.

Checking the documentation again I realized BI Connector is not supported in M0: https://docs.atlas.mongodb.com/bi-connection/#bi-connection

The MongoDB Atlas documentation is referring to "BI Connector for Atlas", which is an integrated feature allowing you to add a managed instance of BI Connector to an M10+ Atlas deployment. Since BI Connector operations may be CPU and memory intensive, adding a managed BI Connector is only supported for dedicated Atlas clusters.

This is the documentation I used originally and it does mention limitation for free tier but doesn't say it's not supported at all so I'm confused what's the root cause for this error message and if it should work or not: https://docs.mongodb.com/bi-connector/v2.1/tutorial/connecting-to-atlas/

This is the product documentation for the On-Prem MongoDB Connector for BI. If you install this in your own environment, you can connect to a supported MongoDB deployment (including the Atlas free tier) subject to any caveats for your deployment environment.

For example, the Atlas free tier cannot run aggregation pipelines using the allowDiskUse option. This means aggregation stages will be limited to using 100MB of RAM per stage, so queries might fail if one of the intermediate result sets is too large.

See Atlas Free Tier Limitations for other considerations.

unable to load MongoDB information: failed to create admin session for loading server cluster information: unable to execute command: server selection error: server selection timeout

This error message indicates inability to connect to your Atlas deployment. Make sure the source IP for your BI Connector instance is whitelisted in Atlas and check the connection string details.

|improve this answer|||||
  • Thanks for the detailed explanation. I actually can connect using "mongo" command but not using "mongosqld", I added some more information with additional tests I did – Tamir Dec 12 '19 at 6:59

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.