I'm using MongoDB on OSX, with mongod confirmed running. I checked the mongod.conf file and the following is present and unmodified:
systemLog:
destination: file
path: /usr/local/var/log/mongodb/mongo.log
logAppend: true
So far so good. The path location exists, however the folder is empty - no mongo.log. This was a standard installation and everything has been fine so far except this. Any idea on how to troubleshoot this issue?
I deleted my mongod.log file once. Then I recreated it and ran into this exact problem. I may have deleted the /var/log/mongodb folder as well, then recreated it.
I was reading under Run Mongodb Community Edition:
https://docs.mongodb.com/manual/tutorial/install-mongodb-on-ubuntu/
The MongoDB instance stores its data files in /var/lib/mongodb and its log files in /var/log/mongodb by default, and runs using the mongodb user account.
I read into this way too much and assumed the user who starts the mongodb service is the "mongodb user account". This is incorrect. They literally mean the user: mongodb
sudo chown mongodb /var/log/mongodb
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With