I've installed Mongodb on Ubuntu but can not start it,I'm really stuck at this point! I've tried lots of solutions but none of them worked for me.
Any help would be appreciated
when I run start command
sudo service mongod start
It says:
Job for mongod.service failed because the control process exited with
error code. See "systemctl status mongod.service" and "journalctl -xe" for details.
And output of status command is:
sudo systemctl status mongod.service
● mongod.service Loaded: loaded (/etc/init.d/mongod; bad; vendor preset: enabled) Active: failed (Result: exit-code) since جمعه 2018-03-30 15:00:56 +0430; 2s ago Docs: man:systemd-sysv-generator(8) Process: 5500 ExecStart=/etc/init.d/mongod start (code=exited, status=1/FAILURE)
15:00:56 mahdi-HP-15-Notebook-PC mongod[5500]: Rather than invoking init scripts through /etc/init.d, use the service(8)
مارس 30 15:00:56 mahdi-HP-15-Notebook-PC mongod[5500]: utility, e.g. service mongod start مارس 30 15:00:56 mahdi-HP-15-Notebook-PC mongod[5500]: initctl: Unable to connect to Upstart: Failed to connect to socket /com/ubuntu/upstart:
مارس 30 15:00:56 mahdi-HP-15-Notebook-PC mongod[5500]: Since the script you are attempting to invoke has been converted to an
مارس 30 15:00:56 mahdi-HP-15-Notebook-PC mongod[5500]: Upstart job, you may also use the start(8) utility, e.g. start mongod
مارس 30 15:00:56 mahdi-HP-15-Notebook-PC mongod[5500]: start: Unable to connect to Upstart: Failed to connect to socket /com/ubuntu/upstart: Co
مارس 30 15:00:56 mahdi-HP-15-Notebook-PC systemd[1]: mongod.service: Control process exited, code=exited status=1
مارس 30 15:00:56 mahdi-HP-15-Notebook-PC systemd[1]: Failed to start mongod.service.
مارس 30 15:00:56 mahdi-HP-15-Notebook-PC systemd[1]: mongod.service: Unit entered failed state. مارس 30 15:00:56 mahdi-HP-15-Notebook-PC systemd[1]: mongod.service: Failed with result 'exit-code'.