我从官网下载了MongoDB,并编写了一个systemd脚本在Ubuntu 15.10上运行它。直到今天,一切都很顺利。但是今天,如果我尝试启动MongoDB,它会工作约30秒钟,然后关闭。在日志文件中,我看到以下内容:
"[signalProcessingThread] got signal 15 (Terminated), will terminate after current cmd ends"
这是我的systemd脚本:
[Unit]
Description= MongoDB Server
After=network.target
[Service]
Type=forking
RemainAfterExit=yes
User=mongodb
Group=mongodb
PIDFile=/server/mongodb-server/mongod.pid
ExecStart=/server/mongodb-server/bin/mongod -f /server/mongodb-server/mongodb.conf
[Install]
WantedBy=multi-user.target
我尝试删除“mongod.lock”,但结果相同。今天,如果我尝试启动Mongodb“sudo service mogodb start”,它只会挂起约30秒钟,然后回复:
Job for mongodb.service failed because a timeout was exceeded.
可能出了什么问题?
mongod
服务是否具有足够的权限来读写这些位置。 - Alex