Mongodb service won't start


I’ve installed mongodb and when I run:

systemctl start mongod

It will fail with

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/ 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.

Any idea why the dir get’s removed?

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, the following would install the repo

zypper ar -f 

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

systemctl start mongodb.service


Thanks for the reply,

I followed the instructions from here

As I said in my initial post the service actually starts using systemctl start mongodb after I add the run folder.