HW3.1Enable auditing on replica set

When i try to start mongod server it is giving me following error
mongod --dbpath “~/M310-HW-3.1/r0” --logpath “~/M310-HW-3.1/r0/mongodb.log” --port 31310 --fork
about to fork child process, waiting until server is ready for connections.
forked process: 2033
ERROR: child process failed, exited with error number 1

When i try to enable auditing, it is not giving error but hanged in >
vagrant@database:~$ mongod --dbpath “~/M310-HW-3.1/r0” --logpath “~/M310-HW-3.1/r0/mongodb.log” --port 31310 --fork --replSet HW-3.1 --auditDestination file --auditFormat JSON --auditPath "~/M310-HW-3.1/r0/auditLog.json
>

Please let me know where am i doing wrong

In this you forgot to close the double quotes, so it is not taking the command to run. Try after closing the double quotes:

vagrant@database:~$ mongod --dbpath “~/M310-HW-3.1/r0” --logpath “~/M310-HW-3.1/r0/mongodb.log” --port 31310 --fork --replSet HW-3.1 --auditDestination file --auditFormat JSON --auditPath "~/M310-HW-3.1/r0/auditLog.json"

Please try running it again after removing --fork option to check why it is not running successfully.

Kanika

1 Like