derdc
derdc

Reputation: 1101

Amazon Linux AMI with MongoDB installed - service FAILED to start

I have mongodb installed on a new Amazon Linux AMI after implementing the guide here. When running "service mongod start" though, I just get a Starting mongod FAILED message. Nothing else. Blank log file also.

service mongod stop yields a FAILED also.

service mongod status yields "mongod is stopped"

Any thoughts or next steps?

Upvotes: 1

Views: 1689

Answers (2)

Antonio Nedanoski
Antonio Nedanoski

Reputation: 191

I faced the same problem with my master mongodb instance. I have a replica set of 3 instances on EC2 and I had the same problem after one reboot that we needed for it, mongod simply failed to start.

First thing I did, was changed the ownership of the log file that is set up in the mongod.conf:

sudo chown mongod:mongod <LOG FILE>

After this I tried only sudo mongod and this will log the problem why the service won't start in the log file.

Mine appeared to be some ownership issues with the WiredTiger conf files in the dbPath directory (were set to root ownership instead to mongod user)

Upvotes: 1

Vegan Sv
Vegan Sv

Reputation: 335

What I do in that case is use

sudo killall mongod

and after that it starts ok. My suspicion is that there is a running instance and that's why it fails to start.

Upvotes: 0

Related Questions