The error message is

Error reading config file: No such file or directory

Usually the configuration file is /etc/mongodb.conf but since it could be different you can verify the actual name used by the service using:

systemctl cat mongodb | grep ExecStart

What ever is the file specified by -f or –config, that file needs to exist and be readable by the user specified in the service file. You may find the user with:

systemctl cat mongodb | grep User

Next time you publish logs, screens output or code, please doing using the formatting specified in Formatting code and log snippets in posts. This way we can cut-n-paste in our reply or experimentation rather than typing over.

3 Likes