I can't connect to Node1 Lab - Initiate a Replica Set Locally

Hi, I can’t connect to Node1 in the Lab - Initiate a Replica Set Locally. First one error is:
image

If I comment the fork option I get:


I was finding in the forum and I read this solution:

I applied the solution but I get the same error:
image

image

What can I do?

Thx in advance

Is your mongod up and running?
In your first snapshot it failed to start
You commented/removed --fork from config file.
So what was the result after running?
You did not paste second run output
Did it give any error on your terminal?
Please check by ps -ef|grep mongo
If it is up then connect using mongo

Hi, if I have understood your command mongo is running, but it doesn’t accept connections. The fork option is commented in the config file.

If I try to connect to other standalone instance (not the node 1) I can connect:

image

Hi @luisjmlky,

The mongo --port 27001 command wouldn’t work until you have a mongod instance running on the port 27001.

As I can see in the first screenshot, your mongod instance (mongod -f mongod-repl-1.conf) failed to start. I suspect, you are getting an error because of a non-existent directories or due to permission issues.

Can you please run this command and share the last 50-60 lines of the output ?

cat /var/mongodb/db/mongod1.log

Thanks,
Shubham Ranjan
Curriculum Support Engineer

Hi @Shubham_Ranjan, of course:

Hi @luisjmlky,

Please run this command and let me know if you are able to start the mongod instance or not.

chmod 400 /var/mongodb/pki/m103-keyfile 

Thanks,
Shubham Ranjan
Curriculum Support Engineer

Hi @Shubham_Ranjan, it runs, thank you very much.

image