Homework 1.3 Cannot Mongo into Server

I setup my replica set as per the instructions using the following:
vagrant@database:~$

about to fork child process, waiting until server is ready for connections.

forked process: 23687

child process started successfully, parent exiting

vagrant@database:~$
about to fork child process, waiting until server is ready for connections.

forked process: 23714

child process started successfully, parent exiting

vagrant@database:~$
about to fork child process, waiting until server is ready for connections.

forked process: 23745

child process started successfully, parent exiting

But I am not able to use: mongo --port 31130 to get into the primary to create the user. I get the error:

vagrant@database:~$ mongo --port 31130
MongoDB shell version: 3.2.22
connecting to: 127.0.0.1:31130/test
2019-12-09T03:46:55.708+0000 E QUERY [thread1] Error: network error while attempting to run command ‘isMaster’ on host ‘127.0.0.1:31130’ :
connect@src/mongo/shell/mongo.js:231:14

Deleted potential answers.

I changed the --sslPEMKeyFile from client.pem to server.pem…

Deleted potential answers.

Still the same error:

vagrant@database:~$ mongo --port 31130

MongoDB shell version: 3.2.22

connecting to: 127.0.0.1:31130/test

2019-12-09T04:01:15.465+0000 E QUERY [thread1] Error: network error while attempting to run command ‘isMaster’ on host ‘127.0.0.1:31130’ :

connect@src/mongo/shell/mongo.js:231:14

@(connect):1:6

exception: connect failed

Suggest having a look at the Enabling X.509 lecture again. It explains how to properly connect via mongo.

And as it’s against forum guidelines to post potential answers, suggest that you remove those potential answers from posts #1, #3 and #4.

Hi @Babak_73387,

Please check for the following lab requirements:

  1. While launching mongod process, you have missed few command line options. Please check it again and relaunch the mongod processes.
  2. Please re-check the dbpath and logpath parameters, even a slight difference, will cause validation script to fail.
  3. You need to specify the security parameters even while connecting to the mongo shell. Otherwise, you will get the error.

Please let me know, if you have any questions.

Thanks,
Sonali

I am getting the same error. Can you please help me in solving this issue ?

Thanks

Similar but not the same error message + different problem + different answers + different lab :+1:

Please see the note that I left in your other thread.

1 Like

Gotcha !! Shared drives got accessible from different locations so bit troublesome but finally I completed by lab 1.2.

Thanks once again for timely help JB.

Cheers !!

Cheers :slightly_smiling_face: :+1:

1 Like