Sudo systemctl start mongod not working

Hello,

I installed mongodb according to https://www.mongodb.com/docs/manual/tutorial/install-mongodb-on-ubuntu/ on ubuntu 20.04. I adhered the guide and did not change any configuration files or anything else. Now, when I run “sudo systemctl start mongod” the terminal just executes the command but no output is produced. Running “sudo systemctl status mongod” gives:

mongod.service - MongoDB Database Server
     Loaded: loaded (/lib/systemd/system/mongod.service; disabled; vendor preset: enabled)
     Active: failed (Result: exit-code) since Sun 2022-03-27 15:18:13 CEST; 19s ago
       Docs: https://docs.mongodb.org/manual
    Process: 54971 ExecStart=/usr/bin/mongod --config /etc/mongod.conf (code=exited, status=14)
   Main PID: 54971 (code=exited, status=14)

Can somebody tell me what I have done wrong? Many thanks!

@peter_parker We may not be able to tell you what’s wrong but the system logs should be able to tell you!

cd /var/log and check the syslog and any mongo* logs.

Thanks for your answer, it turns out that I had to change the write permission to the /var/lib/mongodb folder

2 Likes

Excellent, have fun with MongoDB1

┌──(root💀kali)-[/home/stark]
└─# systemctl start mongod.service 3 ⨯

┌──(root💀kali)-[/home/stark]
└─# systemctl status mongod.service
× mongod.service - MongoDB Database Server
Loaded: loaded (/lib/systemd/system/mongod.service; enabled; vendor preset: disabled)
Active: failed (Result: signal) since Mon 2022-05-02 15:57:15 IST; 1s ago
Docs: https://docs.mongodb.org/manual
Process: 2351 ExecStart=/usr/bin/mongod --config /etc/mongod.conf (code=killed, signal=ILL)
Main PID: 2351 (code=killed, signal=ILL)
CPU: 17ms

May 02 15:57:15 kali systemd[1]: Started MongoDB Database Server.
May 02 15:57:15 kali systemd[1]: mongod.service: Main process exited, code=killed, status=4/ILL
May 02 15:57:15 kali systemd[1]: mongod.service: Failed with result ‘signal’.

please help me this error show my laptop when i put these command
i used hp8440p laptopi5 i have linux os debian
and i have win10 in my laptop here is work mongo but
not working in my linux os thro me this error please resolve this

It terminated with SIGILL it means your CPU is INcompatible with the version of mongod you are trying to use.

Search the forum with signal=ILL for potential solution.

Thanks @Ramachandra_Tummala for the correction.

1 Like

steevej i think you meant incompatible

1 Like

I don’t understand what want to say
Please answer me in docs type

The CPU in your laptop is probably an i5-520M.
That CPU does not support the AVX instruction.
Therefore, it will not run the latest versions of MongoDB.

1 Like