1

I am trying to execute a query in IntelliShell, However when I open intellishell for a particular collection and execute a simple find query I get the following error:

Failed to retrieve documents

[null.WidgetPublished@STAGE_QA sjc-wwdl-pmp2:27017 [direct]] : An error occurred while retrieving documents!

Stacktrace: 
|_/ java.lang.Exception: [null.WidgetPublished@STAGE_QA sjc-wwdl-pmp2:27017 [direct]] : An error occurred while retrieving documents!
|____/ Illegal argument: Database must be set.

Now, I know that this is happening because there is no db set up for my mongo host. However I am unable to set the db. I'm using the following command to set it, but nothing seems to work. use dgmdetails; where dgmdetails is my db name.

Tejas Jaggi
  • 115
  • 1
  • 9

1 Answers1

0

So I was able to resolve it. in my mongo.conf file on the server. I needed to disable some authorization that was enabled which was not letting the user that I was logging in with, to connect to the db.

I'm pretty sure this was an issue faced just by me due to the configuration. However, there is a possibility that someone else might find this useful too.

Tejas Jaggi
  • 115
  • 1
  • 9