Lab - Change the Default DB Path - Won't Start

I made a local copy of my mongod.conf and made the various updates to it. But when I try to start mongod it just hangs. No error, no output. Nothing. And of course I cannot connect to it of course.

vagrant@m103:~$ mongod --config ./example_mongod.conf

(Mongod starts fine from the original under /etc.)

The file:

-rw-rw-r-- 1 vagrant vagrant 682 Jan 10 22:00 example_mongod.conf

I also tried quoting the various values like dbPath, as I see it quoted or unquoted in different examples.

Does anyone know what’s going on here?

Please share the configuration file so that I can help better.

Here are some points that you can check:

  • The db and log directory exists or has been created
  • The port is free to use, no other mongod is running on it. You can check using ps -ef | grep mongod
  • Username/password if mentioned are correct
  • If the log file exists, please check the logFile for errors.

Kanika