Unable to start MongoDB 3.0.2 service on CentOS 7


We are setting up a MongoDB server for the production environment on Amazon EC2 instance, but could not able to start the service. I’ve followed this documentation for setup. Here are the steps, I’ve taken for setting up the server:

Added following to /etc/yum.repos.d/mongodb-org-3.0.repo

And installed MongoDB 3.0.2 using sudo yum install -y mongodb-org-3.0.2

Created three partitions for data, journal & log:

Created file system for three separate partitions:

Created entry in fstab for reboot:

And mounted the partitions:

Given the permissions and created link

Configured ulimit & read ahead settings as given in the documentation link above. Verified permissions and partitions:


Inside /mongo

After changing the configurations inside /etc/mongodb.conf

and when I’m doing: sudo service mongod start, I’m getting this error:

Further logging:

I’ve followed various articles and blog posts and StackExchange answers but didn’t get any solution. Am I missing something?

Update: If I’m directly running the mongodb service from the normal user something like this: sudo mongod --logpath ~/mongod.log --dbpath ~/mongodata, then this service is starting properly.

We tried changing the path of the pid file to another directory, that didn’t help either.


In case, anyone encountered the same issue with MongoDB startup, here is the thread of comments https://jira.mongodb.org/browse/SERVER-18439. This is scheduled to be fixed in 3.1.

Leave a Reply