Mongodb error on starting
First of all, look for other instances of mongod running on the system using the age-old command:
ps ax | grep mongod
If you see a line like -
98555 ?? S 4:40.89 mongod --dbpath /Volumes/ComputerName/data/db
-PID- -name- -------------path------------
then there is a mongod process running already. If so kill it and then start mongod again.
To kill a process with PID = 0000, in Unix like environment use -
kill -9 0000
If your console returns something like, -bash: kill: (98555) - Operation not permitted
, use
sudo !!
to repeat the command as super user. This should get you going.
PS: If you haven't stored any data in your db yet, delete /data
and then create the /data/db
directory again. Do a sudo mongod
and it should work.