Error: couldn't kill mongodb

This might be beyond the scope of this class, but I cannot proceed further on the first lab until I figure out how to kill my MongoDB instance. I tried selecting the PID with the kill command,

But it is giving me an “Unacceptable Integer” message.

Is there another way around this issue? How essential is it that the primary node runs on 26001?

Hey @Nate_93535

So if you are inside the vagrant VM and wish to stop all instances of mongod than try the follow.

# output any running mongod process
ps -ef | grep mongod 
# terminate all mongod
pkill mongod
# verify
ps -ef | grep mongod

However if you are outside the vagrant VM and wish to stop the virtual machine; than inside the same folder that you downloaded the vagrant file into run the follow:

# stop the VM
vagrant halt
# verify
vagrant status
# start the vm
vagrant up
1 Like

Thanks, @natac13! That worked!