Shutdown mongod from our second shell -- doesn't happen

mongo admin --eval ‘db.shutdownServer()’ – that’s the command I am trying to run in my vagrant ssh. And the error I am getting is:
[thread1] SyntaxError: missing ; before statement @(shell):1:6

thoughts, suggestions? I can halt the second shell with brutal force (ctrl+xc) but I’d rather do graceful exit as instructed.

Hey @Victoria_91811

You are getting that error because you are connected to a mongo shell. If you wish to run the command you have shown, exit out of the mongo shell, but still inside the VM and try your command.

I re-ran carefully 2 commands from previous lectures, and I am in business now :slight_smile:
Thanks

1 Like