[SERVER-19482] Errors in configuration file leads to server crashing with no info in log Created: 19/Jul/15  Updated: 25/Aug/15  Resolved: 25/Aug/15

Status: Closed
Project: Core Server
Component/s: Admin
Affects Version/s: 2.4.9, 3.0.4
Fix Version/s: None

Type: Bug Priority: Major - P3
Reporter: Valentin Florian Assignee: Sam Kleinman (Inactive)
Resolution: Incomplete Votes: 0
Labels: None
Remaining Estimate: Not Specified
Time Spent: Not Specified
Original Estimate: Not Specified

Operating System: ALL
Steps To Reproduce:

Add this to the configuration file:
storage.smallFiles=true
then restart the server.

Participants:

 Description   

After editing the configuration file (and unintentionally adding some errors), I have restarted the service with:
sudo service mongodb restart
This results in the following message to the console:
mongodb stop/waiting
mongodb start/running, process XXXX
However, ps aux | grep mongo reports no mongo server running, and nothing it is written to the log.

If the server crashes due to a badly written configuration file, it should write to the log the cause and, even better, the lines in the configuration file that led to errors.

OS: Ubuntu 14.04, also on CentOS 7



 Comments   
Comment by Sam Kleinman (Inactive) [ 03/Aug/15 ]

I've been trying to reproduce this issue, and I always get one of the following messages. The following occurs when the format appears to be YAML and the second line occurs when the file does not appear to be YAML (this is the legacy INI format.)

Unrecognized option: <name>

and

Error parsing INI config file: unrecognized line in '<string>'

In both cases the exit code of the mongod program was 2.

Could you provide a copy of the erroneous configuration file that produced this behavior, or at least describe the kind of error in formatting that caused this error?

Regards,
sam

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