I am trying to run a docker instance and keep coming across this server. Here is what I get after trying to setup the instance:
Starting instance ... done
Attaching to instance
instance | {"t":{"$date":"2020-12-08T14:06:42.033Z"},"s":"F", "c":"CONTROL", "id":20574, "ctx":"main","msg":"Error during global initialization","attr":{"error":{"code":38,"codeName":"FileNotOpen","errmsg":"Failed to open /var/log/mongodb/mongod.log"}}}
instance exited with code 1
The file permissions are:
$ ls -l /var/log/mongodb/mongod.log
-rwxr-xr-x 1 mongodb mongodb 0 Dec 8 19:32 /var/log/mongodb/mongod.log
What else I've tried:
- Shutting down and removing all containers and removing the build-cache
- Removing all .sock files from /var/lib/mongodb
- uninstalling and reinstalling docker.
- Checking if the ports on my .conf file are unoccupied.
- Adding user
mongodb
as owner and group to both the lib and log mongodb folders.
I am not sure anymore where this issue is coming from. Would like to have some alternate solutions to this.