Change the Default DB Path - cant find log file

Im having a problem with the new DB path.

I made a change to the config file but I got this error:

ERROR: child process failed, exited with error number 100
To see additional information in this output, start without the “–fork” option.

I removed the fork option and received this message:

2019-05-19T20:49:58.908+0000 I CONTROL [main] log file “/data/logs” exists; moved to “/data/logs.2019-05-19T20-49-58”.

Where can I find that? I searched my hard drive and do not see that log file anywhere.

There is a portion of the lab that says:

  • create a new folder /var/mongodb/db/ and allow mongod to write files to this directory
    • create this directory with sudo, because /var is owned by root
    • use chown to change the owner of this directory to vagrant:vagrant
  • edit your config file to use this new directory as the dbpath

I think this is my problem. Where do I create the new folder? I don’t have Linux.

Where do I find the log file?

Please help.

Thanks,

Sean

Is this course for Linux or vagrant users only?

Hi @Sean_79071,

You can complete the course if you do not have previous experience with Linux or Vagrant!!

Here, Vagrant is just a virtual environment, so that you can isolate the local machine from the virtual environment.

This error means that since the log file already exist, so a new log file has been created. To resolve this you can delete the existing log files and re launch the mongod.

This /var/mongodb/db/ is the directory structure you create to store db path as well as your log files.

Please follow this link to create directory using sudo: https://askubuntu.com/questions/716599/how-to-create-a-new-folder-from-a-terminal-with-administrative-permissions

Please follow this link to change ownership of a directory: https://askubuntu.com/questions/6723/change-folder-permissions-and-ownership

After this, please follow the exact requirements mentioned in the lab.

Please let me know, if you have any doubts in the above mentioned steps.

Thanks,
Sonali

Thank you for your replay. Ive unregistered from the course at this point.

Im not familiar with Linux and we do not use Linux at our company. We were trying to evaluate MongoDB for windows and learning Linux doesn’t make any sense.

I was spending more time figuring out Linux commands than I was learning MongoDB.

The first course was excellent by the way. It was strictly MongoDB.

Thank you again for your reply.

Sean