MongoD Config File Not Found

RE: Chapter 1, Lab 2

I’m trying to establish mongod via config file but can’t seem to point the command to the right folder. My command is:

mongod --config “/shared/mongod.config”
image

I know it has access to the shared folder because it’s reading and writing log files to it. What am I missing?

For reference, the config file contents are:

storage:
dbPath: “/data/db”
systemLog:
path: “/shared/log/mongod.log”
destination: “file”
replication:
replSetName: M103
net:
bindIp : “127.0.0.1,192.168.103.100”
port: 27000
ssl:
mode: “requireSSL”
PEMKeyFile: “/etc/ssl/ssl.pem”
CAFile: “/etc/ssl/SSLCA.pem”
security:
keyFile: “/data/keyfile”
processManagement:
fork : true

Usually for this course the shared directory is /home/vagrant/shared rather than /shared. So try the following:

  1. use –config /home/vagrant/shared/mongod.conf on the command line
  2. and path: /home/vagrant/shared/mongod.log in your config file.

@Adam_22721 I didn’t have one in that folder by default, I did in /etc/mongod.conf (in the Vagrant VM) which I just copied into the /home/vagrant folder to modify for class purposes.

HTH,
Mike