4

I'm getting an error while trying to use the mongodb for bi connector. I am in the generation stage of the schema of difinição of the file utliznaod the executable mongodrdl. At the moment I'm getting the error below.

I've already made sure that the connection data to my base mongo is correct and I can access my base with other connection tools.

If someone has already had this problem, I would be grateful if they share the solution to the problem.

cmd command executed: "C:\Arquivos de Programas\MongoDB\Connector for BI\2.3\bin\mongodrdl.exe" --host {localhost} --db store --collection avalaible --out schema.drdl

cmd command executed: "C:\Arquivos de Programas\MongoDB\Connector for BI\2.3\bin\mongodrdl.exe" --host {127.0.0.1} --db store --collection avalaible --out schema.drdl

error: Failed: can't create session: no servers available: server selection failed: context deadline exceeded

installation tutorial I'm following: https://docs.mongodb.com/bi-connector/master/tutorial/install-bi-connector/

Michel Pureza
  • 41
  • 1
  • 2

4 Answers4

4

If you run into this issue with mongosqld itself try adding "/?connect=direct" to the URI, i.e. "mongosqld --mongo-uri "mongodb://192.168.0.28/?connect=direct". I have a replica set of 1 and ran into that error.

Robert Walters
  • 1,021
  • 10
  • 10
1

Michel, that error is a typical indication that you either don't have mongod running, or if you do, mongodrdl is unable to reach it. Check that you indeed have mongod running and reachable from the machine where you're running mongodrdl.

Also note that mongodrdl isn't required to use the BI Connector - there is a feature called 'sampling' that removes the need to first run mongodrdl. See https://docs.mongodb.com/bi-connector/master/schema-configuration/#cached-sampling for more.

deafgoat
  • 51
  • 5
1

In my case similar thing has happened when I'm trying to connect to mongoDB Atlas cluster via mongodrdl command provided by mongo documentation : https://docs.mongodb.com/bi-connector/master/reference/mongodrdl/ .

So make sure you give -ssl in the command if your cluster has ssl enabled otherwise you'll run into same issue. If you don't get any error in console then you should probably got connected.

whoami - fakeFaceTrueSoul
  • 13,846
  • 4
  • 23
  • 39
1

it's quite weird for the error message . on my case, it was cause by a wrong username & password for specific database.

no7dw
  • 417
  • 2
  • 13