Cant validate_lab_launch_mongod

19%20PM

Care to elaborate…?

Sorry I thought I took a bigger picture of the window. I have created the user but when I leave mongo shell and go back to the vagrant environment and run the validate_lab_launch_mongod command I get “Client experienced a timeout when connecting to the database - check that mongod is running on the correct port, and that your user was created with the correct settings.”

It helps if the poster adds a little blurb :wink:

Let’s see what processes are running: ps -ef | grep "[m]ongo"

vagrant@m103:~$ ps -ef | grep “[m]ongo”
vagrant 6800 6781 0 19:27 pts/0 00:00:28 mongod

That shows that you have a mongod server instance running and also shows exactly how you started the instance.

Is this the right instance for this lab?

No I dont think so, I will start over with the right instance

That’s how you check what is running. Quite a useful command!

Remember to kill or shutdown that instance if you don’t need it running.

Hi @Ryan_Courtney_8612,

Please start the lab and re-launch all your processes again after killing the already running instances as mentioned by @007_jb.

Also, please follow the instructions mentioned in the lab notes carefully so as to make sure you are running the right commands with right arguments required for that particular lab.

Thanks,
Muskan
Curriculum Support Engineer

Hi

When attempting to run “validate_lab_launch_mongod” from vagrant env I got the following message:

“You need to specify db path /data/db”

Hope you can help

Thanks

@Salvador_20710, have you followed what was mentioned above? Plus, the error states you must include --dbpath when running mongod

Hello @MongoDB Staff,
I ran through the same issue where I am not able to run mongod -f without being root user.
I then failed the test to reviews the steps that I was doing right and I could not still run the mongod on the vagrant user.
please help on this I spent the entire night doing this …

Francis.

once running as a root everything was smooth. At the validation step I got a message about running not running the mongod with sudo to get the root privilege …
is the vagrant user on the VM has all the permissions to proceed ?

@Francis_52202
In the absence of @MongoDB Staff, you probably put the dbpath and/or logpath in a directory that requires root permissions.

Hi @Francis_52202,

Can you please share which directory you are running the command in and it’s owner and permission details?

Basically, you need to share the output of ls -lrt command in your current directory.

Yes, the vagrant user has all the required permissions - the probable reason why it’s not working iin your case might be that you haven’t changed the owner of your directory from root.

Thanks,
Muskan
Curriculum Support Engineer

I did everything right still it’s showing above error.
I connected with mongo --port 27000 it’s got connected

Hi @Milind_19368,

Are you getting the same error as “You need to specify db path /data/db”?

Can you please share the commands that you are using to launch mongod and to connect to mongo shell?

Please share the output of below command as well:

ps -ef | grep mongod

Also, just to confirm, please run the validation script outside mongo shell but in vagrant.

Thanks,
Muskan

1 Like

I got the answer I used --bind_ip 198…,127.0.0.1 while launching mongod and problem solved

1 Like

but now my assignment is overdue and lab is disabled how to submit my old assignment

Hi @Milind_19368,

It’s good that you were able to solve the issue.

But I’m afraid you can’t submit the labs once the date for the same has passed.
However, you may resume your course and continue learning .

Please let us know if you face any issues in future :slight_smile:

Thanks,
Muskan