Priority: Major - P3
Affects Version/s: 3.0.2
Fix Version/s: 4.1 Desired
Environment:centos7, amazon ec2
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:
After changing the configurations inside `/etc/mongodb.conf`
Also, changed the SELinux setting to `permissive`. Now when I'm doing: `sudo service mongod start`, I'm getting this error:
Starting mongod (via systemctl): Job for mongod.service failed. See 'systemctl status mongod.service' and 'journalctl -xn' for details.
[deployer@prod-mongo ~]$ sudo systemctl status mongod.service
mongod.service - SYSV: Mongo is a scalable, document-oriented database.
Loaded: loaded (/etc/rc.d/init.d/mongod)
Active: failed (Result: exit-code) since Tue 2015-05-12 04:42:10 UTC; 42s ago
Process: 22881 ExecStart=/etc/rc.d/init.d/mongod start (code=exited, status=1/FAILURE)
May 11 04:42:10 ip-xx-xx-xx-xx.local runuser: pam_unix(runuser:session): session opened for user mongod by (uid=0)
May 11 04:42:10 ip-xx-xx-xx-xx.localdomain runuser: pam_unix(runuser:session): session closed for user mongod
May 11 04:42:10 ip-xx-xx-xx-xx.local mongod: Starting mongod: [FAILED]
May 11 04:42:10 ip-xx-xx-xx-xx.local systemd: mongod.service: control process exited, code=exited status=1
May 11 04:42:10 ip-xx-xx-xx-xx.local systemd: Failed to start SYSV: Mongo is a scalable, document-oriented database..
May 11 04:42:10 ip-xx-xx-xx-xx.local systemd: Unit mongod.service entered failed state.
Kernal version from uname -a:
If I directly run the mongodb service from the normal user something like this: sudo mongod --config /etc/mongod.conf, then this service is starting properly but not as the system service?
I've followed various articles and blog posts and stackexchange answers, but didn't get any solution.