I am getting this error when I run command sudo forever start mongod
[root@ip-1**-3*-**-5* ec2-user]# sudo forever mongod start
warn: --minUptime not set. Defaulting to: 1000ms
warn: --spinSleepTime not set. Your script will exit if it does not stay up for at least 1000ms
error: Cannot start forever
error: script /home/ec2-user/mongod does not exist.
but normally when I run mongod
or sudo mongod
it just works fine. help me whats the issue.
You should specify OS Name, OS version, MongoDB version so that we can easy help you. I hope you are using Amazon Linux so you need to use systemctl
start/stop mongodb
, following command to enable and start
sudo su
chkconfig mongod on
sudo service mongod start
and to stop
sudo service mongod stop
Please have a look MongoDB Amazon Linux Doc
The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.