0

My OS is CentOS release 6.4 (Final) and my MongoDB version is 2.4.1.

I tried:

use admin;
db.shutdownServer()

and I got in output:

assert failed : unexpected error: "shutdownServer failed: exception: dbexit timed out getting lock"
Error: Printing Stack Trace
    at printStackTrace (src/mongo/shell/utils.js:37:7)
    at doassert (src/mongo/shell/assert.js:6:1)
    at assert (src/mongo/shell/assert.js:14:1)
    at DB.shutdownServer (src/mongo/shell/db.js:342:1)
    at (shell):1:4
Thu Apr  7 11:42:52.577 JavaScript execution failed: assert failed : unexpected error: "shutdownServer failed: exception: dbexit timed out getting lock" at src/mongo/shell/assert.js:L7

Then I tried to force shutdown, but the output is the same. Can anyone help me?

1

do a command like this

ps -ef | grep "MONGO" 

You will see output like

502  8066     1   0 12:23pm ??        12:25.00  /Applications/PyCharm.app/Contents/MONGO/pycharm

Now before you do the next command understand that killing a process when it may or may not be doing something is a VERY VERY DANGEROUS habit.

So if this corrupts your MongoDB Database - it is because you did this command.....

kill -9 8066  

8066 is the 2nd number you can see from the ps command.

You can tell if the process is consuming cpu/disk using other systems tools such as

  • top
  • sar
  • instat

If these processes look like the MongoDB Process is doing some work - then the chances of something bad usually increases.

Good Luck !!

Thought: Ask the server to restart ??

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy