[SERVER-21984] MongoDB does not start with authorization enabled Created: 22/Dec/15  Updated: 16/Nov/21  Resolved: 29/Dec/15

Status: Closed
Project: Core Server
Component/s: Security, WiredTiger
Affects Version/s: 3.2.0
Fix Version/s: None

Type: Bug Priority: Major - P3
Reporter: Rafael Reuber Assignee: Kelsey Schubert
Resolution: Done Votes: 0
Labels: None
Remaining Estimate: Not Specified
Time Spent: Not Specified
Original Estimate: Not Specified

Attachments: File mongod.conf    
Operating System: ALL
Steps To Reproduce:

Add the following lines on the file /etc/mongod.conf

security:
authorization: enable

Restart the mongodb service:

  1. systemctl start mongod
Participants:

 Description   

I'm using Red Hat Enterprise Linux 7 and I'm facing problems when try to enable security authorization on my MongoDB 3.2 configuration.

When I start the service system shows following error:

# systemctl start mongod
Job for mongod.service failed. See 'systemctl status mongod.service' and 'journalctl -xn' for details.

# cat mongod.conf
systemLog:
  destination: file
  logAppend: true
  path: /var/log/mongodb/mongod.log
 
 
storage:
  dbPath: /var/lib/mongo
  journal:
    enabled: true
  engine: wiredTiger
 
processManagement:
  fork: true  # fork and run in background
  pidFilePath: /var/run/mongodb/mongod.pid  # location of pidfile
 
net:
  port: 27017
 
security:
  authorization: enable



 Comments   
Comment by Kelsey Schubert [ 29/Dec/15 ]

Thank you for confirming this issue has been resolved - I am closing the ticket.

Kind regards,
Thomas

Comment by Rafael Reuber [ 27/Dec/15 ]

Yes, are you pretty sure, it was a typo in the securty config!

Comment by Kamran K. [ 27/Dec/15 ]

I believe the issue is that there's a typo in the config file. Try using 'authorization: enabled' (with a 'd' at the end) instead of 'authorization: enable'.

See: https://docs.mongodb.org/manual/reference/configuration-options/#security.authorization

Comment by Kelsey Schubert [ 23/Dec/15 ]

Hi rafaelreuber,

Can you please execute mongod --config /etc/mongod.conf and confirm that the log file is written, or copy the output into the ticket?

For debugging, you may want to modify the port in the config file for testing purposes.

Thank you,
Thomas

Comment by Rafael Reuber [ 23/Dec/15 ]

When I start mongod it write nothing on the log file.

Comment by Ramon Fernandez Marina [ 22/Dec/15 ]

rafaelreuber, can you please send the contents of /var/log/mongodb/mongod.log when you try to start mongod?

Comment by Rafael Reuber [ 22/Dec/15 ]

I just attached my mongod.conf

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