[SERVER-8911] If keyFile parameter is quoted in config file, mongod will not find it on startup Created: 08/Mar/13  Updated: 31/May/17  Resolved: 15/Mar/17

Status: Closed
Project: Core Server
Component/s: Admin
Affects Version/s: 2.0.7, 2.0.8, 2.4.0-rc2
Fix Version/s: None

Type: Bug Priority: Major - P3
Reporter: Stennie Steneker (Inactive) Assignee: Spencer Jackson
Resolution: Done Votes: 0
Labels: None
Remaining Estimate: Not Specified
Time Spent: Not Specified
Original Estimate: Not Specified

Issue Links:
Related
is related to SERVER-8510 Move command line parsing into MONGO_... Closed
Backwards Compatibility: Fully Compatible
Operating System: ALL
Participants:

 Description   

There is a subtle regression in the configuration parsing between 2.0.6 and subsequent versions tested (2.0.7, 2.0.8, and 2.4.0-rc2).

If you quote your keyFile parameter in a mongodb.conf this works fine in 2.0.6:

keyFile="/etc/mongodb/keyfile"

In 2.0.7 and later versions tested, the identical config produces an error suggesting the keyfile does not exist:

error getting file "/etc/mongodb/keyfile": No such file or directory

The solution is to remove the double quotes:

keyFile=/etc/mongodb/keyfile



 Comments   
Comment by Spencer Jackson [ 15/Mar/17 ]

This issue does exist and can be reproduced on master. However, it only exists with the old "2.4 style" configuration file format. The YAML configuration format is preferred and is unaffected.

Comment by Andy Schwerin [ 08/Mar/13 ]

I think that this was actually a bug fix. If you had a literal double-quote character in your keyfile path, prior to 2.0.7, could you even describe it?

Comment by Eric Milkie [ 08/Mar/13 ]

This may get fixed or behavior changed after the config file parsing is redone; see linked ticket.

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