I've just completed upgrading my DigitalOcean droplet from Ubuntu 14.04 to 16.04, but now I'm having trouble starting mongodb. This is the error I receive when trying to start the service:
# systemctl status mongod.service
● mongod.service
Loaded: loaded (/etc/init.d/mongod; bad; vendor preset: enabled)
Active: failed (Result: exit-code) since Sat 2019-02-16 12:49:28 EST; 17s ago
Docs: man:systemd-sysv-generator(8)
Process: 3800 ExecStart=/etc/init.d/mongod start (code=exited, status=1/FAILURE)
Feb 16 12:49:28 anthony-calandra mongod[3800]: Rather than invoking init scripts through /etc/init.d, use the service(8)
Feb 16 12:49:28 anthony-calandra mongod[3800]: utility, e.g. service mongod start
Feb 16 12:49:28 anthony-calandra mongod[3800]: initctl: Unable to connect to Upstart: Failed to connect to socket /com/ubuntu/upstart: Connec
Feb 16 12:49:28 anthony-calandra mongod[3800]: Since the script you are attempting to invoke has been converted to an
Feb 16 12:49:28 anthony-calandra mongod[3800]: Upstart job, you may also use the start(8) utility, e.g. start mongod
Feb 16 12:49:28 anthony-calandra mongod[3800]: start: Unable to connect to Upstart: Failed to connect to socket /com/ubuntu/upstart: Connecti
Feb 16 12:49:28 anthony-calandra systemd[1]: mongod.service: Control process exited, code=exited status=1
Feb 16 12:49:28 anthony-calandra systemd[1]: Failed to start mongod.service.
Feb 16 12:49:28 anthony-calandra systemd[1]: mongod.service: Unit entered failed state.
Feb 16 12:49:28 anthony-calandra systemd[1]: mongod.service: Failed with result 'exit-code'.
If you need any more information please let me know.