Starting mongod daemon with a config file for a shard
So, you created mongod.service file, did you remember tell to systemd that you are forking that pid to background? If not, systemd will kill that process soon after start.

Then there is that what @stennie wrote, if you start even once mongod as root user, some of the files are created as root:root and after that, nobody else (like user mongod) can not start mongod-process. So, what are those files and directories, which ownership must be set to mongod (or what ever user you use to start mongod-process)


mongod.log /var/log/mongod/-directory (or what you wrote at config file)
/var/run/mongodb/mongod.pid (or what ever is set at config-file)
directory (and files) where your data is.


Log file is important, because after mongod-process can write to it, it will tell what went wrong if something went wrong...