Setting Up a Replica Set

vagrant@m103:~$ mongod -f node1.conf
2020-02-28T15:31:51.536+0000 F CONTROL [main] Failed global initialization: FileNotOpen: Failed to open “/var/mongodb/db/node1/mongod.log”

… most likely doesn’t exist.

Check with:
ls -l /var/mongodb/db/

vagrant@m103:~$ ls -l /var/mongodb/db/

total 12

drwxr-xr-x 2 root root 4096 Feb 28 15:37 node1

drwxr-xr-x 2 root root 4096 Feb 28 15:10 node2

drwxr-xr-x 2 root root 4096 Feb 28 15:10 node3

Change ownership to vagrant:
sudo chown -R vagrant:vagrant /var/mongodb/

2 Likes

It worked.
Thank you so much.

Closing this thread as the issue has been resolved.