簡體   English   中英

Xenial升級后,Mongo無法啟動

[英]Mongo fails to start after Xenial upgrade

我剛剛完成了將DigitalOcean Droplet從Ubuntu 14.04升級到16.04的工作,但是現在我在啟動mongodb時遇到了麻煩。 這是嘗試啟動服務時收到的錯誤:

# 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'.

如果您需要更多信息,請告訴我。

解決了我的問題。 我安裝了奇怪的mongo,因此我將其刪除:

sudo apt-get purge mongodb-org*

然后我按照本教程安裝最新版本: https : //www.digitalocean.com/community/tutorials/how-to-install-mongodb-on-ubuntu-16-04

然后,我遇到了錯誤消息:“無法啟動mongod.service:未找到單元mongod.service”。 原來該服務已被禁用,所以我遵循了本指南: https : //stackoverflow.com/a/53553652/3229983

服務看起來不錯:

# sudo systemctl status mongod
● mongod.service - High-performance, schema-free document-oriented database
   Loaded: loaded (/lib/systemd/system/mongod.service; enabled; vendor preset: enabled)
   Active: active (running) since Sat 2019-02-16 13:08:19 EST; 7s ago
     Docs: https://docs.mongodb.org/manual
 Main PID: 5711 (mongod)
   CGroup: /system.slice/mongod.service
           └─5711 /usr/bin/mongod --quiet --config /etc/mongod.conf

Feb 16 13:08:19 anthony-calandra systemd[1]: Started High-performance, schema-free document-oriented database.

現在,我的webapp運行了。

暫無
暫無

聲明:本站的技術帖子網頁,遵循CC BY-SA 4.0協議,如果您需要轉載,請注明本站網址或者原文地址。任何問題請咨詢:yoyou2525@163.com.

 
粵ICP備18138465號  © 2020-2024 STACKOOM.COM