Job for mongod.service failed because the control process exited with error code. See “systemctl status mongod.service” and “journalctl -xe” for details.
Upon investigation it turns out that it can create the run pid in /var/run/mongodb/mongodb.pid because the it can’t create the mongodb dir.
I created the dir by hand and made mongo the owner but every time I restart the system the dir will get deleted.
Well, firstly
Where did you get your mongodb?
I just ran a test on a TW using mongodb installed from the server repository. Although you can go to http://software.opensuse.org, the following would install the repo
zypper ar -f http://download.opensuse.org/repositories/server:/database/openSUSE_Factory/ http-download.opensuse.org-934d7ca7
The name of the service is “mongodb.service” so if you’re really trying to start “mongod.service” it should return non-existent.
The following successfully starts mongodb