我安装了旧版本的mongodb(2.6.9)。当我尝试启动该服务时,使用以下命令:
sudo service mongod start
这会出现以下错误:
Job for mongod.service failed because the control process exited with error code. See "systemctl status mongod.service" and "journalctl -xe" for details.
运行systemcell命令会产生以下输出:
sudo systemctl status mongod.service
● mongod.service
Loaded: loaded (/etc/init.d/mongod; bad; vendor preset: enabled)
Active: failed (Result: exit-code) since Tue 2018-02-20 16:25:20 IST; 12s ago
Docs: man:systemd-sysv-generator(8)
Process: 4483 ExecStart=/etc/init.d/mongod start (code=exited, status=1/FAILURE)
Feb 20 16:25:20 ankit mongod[4483]: Rather than invoking init scripts through /etc/init.d, use the service(8)
Feb 20 16:25:20 ankit mongod[4483]: utility, e.g. service mongod start
Feb 20 16:25:20 ankit mongod[4483]: initctl: Unable to connect to Upstart: Failed to connect to socket /com/ubuntu/up
Feb 20 16:25:20 ankit mongod[4483]: Since the script you are attempting to invoke has been converted to an
Feb 20 16:25:20 ankit mongod[4483]: Upstart job, you may also use the start(8) utility, e.g. start mongod
Feb 20 16:25:20 ankit mongod[4483]: start: Unable to connect to Upstart: Failed to connect to socket /com/ubuntu/upst
Feb 20 16:25:20 ankit systemd[1]: mongod.service: Control process exited, code=exited status=1
Feb 20 16:25:20 ankit systemd[1]: Failed to start mongod.service.
Feb 20 16:25:20 ankit systemd[1]: mongod.service: Unit entered failed state.
Feb 20 16:25:20 ankit systemd[1]: mongod.service: Failed with result 'exit-code'.
有人可以帮助我吗?