遇到一些麻煩MongoDB的配置到Linux EC2下列指示https://docs.mongodb.com/ecosystem/platforms/amazon-ec2/爲什麼sudo服務mongod在linux ec2下啓動失敗?
[[email protected] /]# sudo service mongod start
Error starting mongod. /var/run/mongodb/mongod.pid exists.
[[email protected] /]# sudo service mongod restart
Stopping mongod: [ OK ]
Starting mongod: [FAILED]
我也試過rm -f /var/run/mongodb/mongod.pid
現在立刻失效後。
[[email protected] /]# sudo service mongod start
Starting mongod: [FAILED]
我有一種感覺,它可能是我的mongod.conf
,並試圖根據文檔編輯dbPath和sysLogPath。
# mongod.conf
# where to write logging data.
systemLog:
destination: file
logAppend: true
path: "log/mongod.log"
# Where and how to store data.
storage:
dbPath: "/data"
journal:
enabled: true
# engine:
# mmapv1:
# wiredTiger:
# how the process runs
processManagement:
fork: true # fork and run in background
pidFilePath: /var/run/mongodb/mongod.pid # location of pidfile
我是新來的AWS和部署數據庫,並會很感激的建議!
檢查文件'登錄/ mongod.log' – hjpotter92
當然!謝謝!!! – Chris
檢查日誌:/var/log/mongodb/mongodb.log – sahaj