[SERVER-23361] CentOS 7: sudo service mongod start fails with error Created: 26/Mar/16  Updated: 09/Jan/17  Resolved: 27/Mar/16

Status: Closed
Project: Core Server
Component/s: Replication, Security
Affects Version/s: 3.0.10
Fix Version/s: None

Type: Question Priority: Major - P3
Reporter: Krishnan Kannan Assignee: Unassigned
Resolution: Done Votes: 0
Labels: None
Remaining Estimate: Not Specified
Time Spent: Not Specified
Original Estimate: Not Specified

Participants:

 Description   

I have setup my primary server for replication and then when I stop and restart mongod it just fails.

Here is the error

[mongoadmin@europa ~]$ sudo service mongod start

Starting mongod (via systemctl): Job for mongod.service failed because the control process exited with error code. See "systemctl status mongod.service" and "journalctl -xe" for details.
[FAILED]

[mongoadmin@europa ~]$ 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 Sat 2016-03-26 15:18:04 UTC; 6s ago
Docs: man:systemd-sysv-generator(8)
Process: 1727 ExecStart=/etc/rc.d/init.d/mongod start (code=exited, status=1/FAILURE)



 Comments   
Comment by Bobby Dyol [ 09/Jan/17 ]

I used service command "sudo service mongod stop" to stop running standalone mongod. After that I am getting similar error with standalone mongod also
[ec2-user@ip-172-31-43-153 ~]$ sudo service mongod start
Starting mongod (via systemctl): Job for mongod.service failed because the control process exited with error code. See "systemctl status mongod.service" and "journalctl -xe" for details.
[FAILED]

Comment by Ramon Fernandez Marina [ 27/Mar/16 ]

kxkannan, please note that the SERVER project is for reporting bugs or feature suggestions for the MongoDB server. For MongoDB-related support discussion please post on the mongodb-user group or Stack Overflow with the mongodb tag, where your question will reach a larger audience. Questions like this one involving more discussion would be best posted on the mongodb-user group. See also our Technical Support page for additional support resources.

Regards,
Ramón.

Comment by Krishnan Kannan [ 26/Mar/16 ]

The issue seems to that the replicaSetName value was not in double-quotes.

I had it like

replication:
replSetName: rs_0

instead of

replication:
replSetName: "rs_0"

Changing the replica set name to quoted string seems to have fixed this issue.

Generated at Thu Feb 08 04:03:09 UTC 2024 using Jira 9.7.1#970001-sha1:2222b88b221c4928ef0de3161136cc90c8356a66.