[SERVER-26920] Cannot start mongodb after enable authentication Created: 05/Nov/16  Updated: 04/Dec/16  Resolved: 04/Dec/16

Status: Closed
Project: Core Server
Component/s: Packaging
Affects Version/s: 3.2.10
Fix Version/s: None

Type: Question Priority: Major - P3
Reporter: Hieu Phan Trong Assignee: Kelsey Schubert
Resolution: Incomplete Votes: 0
Labels: None
Remaining Estimate: Not Specified
Time Spent: Not Specified
Original Estimate: Not Specified

Sprint: Build 2016-11-21
Participants:

 Description   

Hello all,
My mongodb version is 3.2.10, was installed on Centos 7 Minimal
When i enable security authentication by add these line to /etc/mongo.conf

security:
authorization: enabled

After that mongodb failed to startup by : service mongod start . With error code

● 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-11-05 10:48:57 ICT; 11s ago
     Docs: man:systemd-sysv-generator(8)
  Process: 7446 ExecStop=/etc/rc.d/init.d/mongod stop (code=exited, status=0/SUCCESS)
  Process: 7778 ExecStart=/etc/rc.d/init.d/mongod start (code=exited, status=1/FAILURE)
 
Nov 05 10:48:57 db1 systemd[1]: Starting SYSV: Mongo is a scalable, document-oriented database....
Nov 05 10:48:57 db1 mongod[7778]: Error starting mongod. /var/run/mongodb/mongod.pid exists.
Nov 05 10:48:57 db1 systemd[1]: mongod.service: control process exited, code=exited status=1
Nov 05 10:48:57 db1 systemd[1]: Failed to start SYSV: Mongo is a scalable, document-oriented database..
Nov 05 10:48:57 db1 systemd[1]: Unit mongod.service entered failed state.
Nov 05 10:48:57 db1 systemd[1]: mongod.service failed.

But i can startup mongodb by command: mongod -f /etc/mongod.conf
with no error

Please help
Thanks



 Comments   
Comment by Kelsey Schubert [ 04/Dec/16 ]

Hi gsphan,

We haven’t heard back from you for some time, so I’m going to mark this ticket as resolved. If this is still an issue for you, please provide additional information and we will reopen the ticket.

Regards,
Thomas

Comment by Ramon Fernandez Marina [ 12/Nov/16 ]

gsphan, can you please post the log file from mongod? Its location should be listed in the /etc/mongod.conf file.

Thanks,
Ramón.

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