Mongo --nodb command not runnning

good afternoon mam
I installed mongo enterprise server and created .bash_profile file exactly as mentioned in video .

I have taken care of path too.

but still command is not running .

plzz HELP.

Hi Mansha_16263,

To help you out more clearly, I need to see your command and exactly what error it is throwing.

If you have set everything in your .bash_profile. Either run source or just restart your terminal to see the effect.

Just type mongo --version to check if it is correctly set in your path.

Also, if the path is not set properly, let me know where is the mongod installed and what is your OS to better help you out!

Kanika

I have tried restarting but no improvements.

Hi Mansha,

I am able to do just fine. Please make sure you get the directory list like below. Copy the exact directory from your $PATH and make sure all mongo commands are present. Or to be safe side, use the full path. Like /Users/<your username>/mongodb---- /bin .

Kanika

thanx a ton mam .
~this symbol was not working well.
full path is working great .

1 Like

one more thing mam ,

many times I get exceptions and errors while connecting to atlas cluster via mongo shell and in comapass i get red error saying hostname is not available .

but restarting laptop solves these issues.

why does this happen ? why do I get errors at first place .

Hi Mansha_16263,

Valid Question.

– Through mongo shell, if you are using the same command and the network is same, then its unlikely to get an error while connecting. In my experience, if the above things are true, I have never seen error connecting through mongo shell. Let me know what error you are facing while connecting through shell.

–You mean Could not connect to MongoDB on the provided host and port, it can be due to many reasons which are already stated here.

Sometimes, the fields are auto-filled or cached in our system. So when we wrongly filled the first time, correct them and connect. But when you re-connect, then it might be possible those fields are auto-filled leading to white-spaces which may result in the error.

One more thing can happen is if you are connecting to our cluster on port 27017 and you are already running mongo on your system using the same port, it will throw an error. Which you can get rid of after making that port free.

But then, I hardly believe that if all the things are correct like fields names, network is allowing to connect to the cluster, port is not getting used somewhere else etc, you should be fine connecting to mongo.

Hope it helps!

Happy Learning!

Kanika

Hi,
I’m facing the similar issue. I read the whole thread and did the suggested path updation (replacing ~ with the full path). Even able to see the directory list.
I’m using MAC OS X Yosemite. Downloaded MongoDB Enterprise Server 4.1.6(development release), for macOS x64 in my home directory. (for all other releases it was showing SSL not supported).

Still, Getting below result:

$ mongo --version

                  dyld: Symbol not found: _SSLCopyRequestedPeerName

                  Referenced from: /Users/Divyanshu/mongodb-osx-x86_64-enterprise-4.0.4/bin/mongo (which was built for Mac OS X 10.11)

                  Expected in: /System/Library/Frameworks/Security.framework/Versions/A/Security in /Users/Divyanshu/mongodb-osx-x86_64-enterprise-4.0.4/bin/mongo
            Trace/BPT trap: 5

Please help.

Thanks & Regards,
Nidhi

HI Nidhi_51474,

Please download and install the “current release”. What you have downloaded is a development release. I would suggest you to uninstall that one and install 4.0.4.

Let me know if it works!

Kanika

1 Like

Hi Kanika,

Thanks for your kind response.
I downloaded the current release initially, it didn’t work. Then, I realised that it specified “without SSL support” while selecting OS. All the version were showing “without SSL support” except the development release. Therefore, I finally installed the development release(4.1.6). Still, It showed the same error.

Well, My problem is resolved now. I upgraded mac version to 10.14 from 10.10, then it worked. Found in some forum that MongoDB is supported by 10.12 or higher mac versions only.

I humbly request you to please mention this thing in the tutorial and the MongoDB download page.

Thanks & Regards,
Nidhi

1 Like

Thanks for the note @Nidhi_51474. I really appreciate that.

Kanika

1 Like