Connection password with m121 user

Hi everyone
Sorry for this but I cannot find the password to get connected to this :

mongo “mongodb://cluster0-shard-00-00-jxeqq.mongodb.net:27017,cluster0-shard-00-01-jxeqq.mongodb.net:27017,cluster0-shard-00-02-jxeqq.mongodb.net:27017/aggregations?replicaSet=Cluster0-shard-0” --authenticationDatabase admin --ssl -u m121 -p aggregations --norc

I just copied the link in the lesson. I have looked for some clues in other lessons but what I tried does not work. I may have missed something, and if it is written in a whole capital letters and colored in red, apologies for not seing it anyway :slight_smile:

Best regards
Sebastien

That’s the password :slight_smile:


I just tried and I can connect. What error are you getting?

Thanks James :wink:
And this is a “-p” option I missed in the string. ( as I said, capital written, colored in red )
The message is an authentication failed, first of course because the pass was wrong.
I just try retying the password in the invite prompt and it says :
2020-02-06T11:21:08.434+0100 I NETWORK [ReplicaSetMonitorWatcher] starting
2020-02-06T11:21:10.958+0100 E - [main] file [aggregations] doesn’t exist
failed to load: aggregations
I will update mongo shell, it may help
Thanks for your answer 007

:male_detective:
Which version of the mongo shell are you using? Let’s see a screenshot of the mongo command and the error message together.

My version is a 3.2 version, and this is the debian maintained package. This may be a good reason to fail.
So I will backup my dbs and uninstall 3.2 before updating my sources and install the last version first. Testing the shell and give a feed back here.
Connecting my clusters through compass to atlas works fine (no mongo shell involved indeed) .

Ok, here is the feedback.

mongo shell 3.2 does not support the given string connection.

  1. Uninstalling 3.2 debian package (after exporting dbs if backup is needed)

  2. Removing /var/lib/mongodb with :

$ su root
$ rm -rf /var/lib/mongodb
  1. Removing /var/log/mongodb with :
$ rm -rf /var/log/mongodb
  1. Install mongoDb with the following procedure :
    https://docs.mongodb.com/manual/tutorial/install-mongodb-on-debian/

  2. Check right on directory

ls -al /var/lib/mongodb
ls -al /var/log/mongodb

If your dirs show a root:root owner/group, change it with

chown -R mongodb:mongodb /var/lib/mongodb
Same for /var/log/mongodb

Then, start or restart mongodb :

systemctl start mongod
systemctl status mongod

It should have started normally and status should show an Active: active (running).

The connection string given in the lesson then works with no effort :slight_smile:

Best regards

1 Like