MongoDB.live, free & fully virtual. June 9th - 10th. Register Now MongoDB.live, free & fully virtual. June 9th - 10th. Register Now

Running on Manjaro Linux

I am running manjaro Linux - not my usual flavour of linux, but I’m having real trouble getting the service working on this distribution. I have mongo 4 installed as follows

> MongoDB shell version v4.0.3
> git version: 7ea530946fa7880364d88c8d8b6026bbc9ffa48c
> OpenSSL version: OpenSSL 1.1.1d  10 Sep 2019
> allocator: tcmalloc
> modules: none
> build environment:
>     distarch: x86_64
>     target_arch: x86_64

I have created the mongo /data folder and given permission and mongod (daemon runs). I can then use the mongo command which all works. But I cannot get the service running using systemctrl. For example:

sudo systemctl start mongod

gives

Failed to start mongod.service: Unit mongod.service is masked.

But I cannot unmask this using sudo systemctl unmask mongod.service. This makes no difference. How can I reliably get the service running?

What error you get while unmask

Please try this

sudo systemctl unmask mongod

Tried this and the one you above. Makes no difference

So command runs but makes no difference to
sudo systemctl start mongod and you are getting same error?

Can you check below
systemctl list-unit-files | grep mongod
sudo systemctl status mongod

May be this file /etc/systemd/system/mongod.service.d needs to be edited and service enabled