[SERVER-29964] Better recognition of invalid options Created: 03/Jul/17  Updated: 27/Oct/23  Resolved: 12/Jul/17

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

Type: Bug Priority: Major - P3
Reporter: Lorne Schachter Assignee: Unassigned
Resolution: Gone away Votes: 0
Labels: None
Remaining Estimate: Not Specified
Time Spent: Not Specified
Original Estimate: Not Specified

Issue Links:
Related
is related to SERVER-29975 Better reporting of configuration errors Closed
Operating System: ALL
Participants:

 Description   

When starting mongod, --dbpath is a path to a directory and --logpath is a path to a file. If --logpath is a directory, mongod fails but really doesn't tell you why. If an argument should be a file and isn't we should report it more explicitlyu



 Comments   
Comment by Kyle Suarez [ 03/Jul/17 ]

Ah, I'm not sure about other options. If you could post the exact output from the logs, perhaps the triage team will have a better idea of where to send this ticket next for evaluation.

Comment by Lorne Schachter [ 03/Jul/17 ]

Kyle,

Does this also happen for other arguments? We had a client trying to set up auditing and specified a directory for auditLogPath instead of a file and it failed with a very unclear message. They were using OpsManager and the dump from automation logs was very unclear.

Lorne

Comment by Kyle Suarez [ 03/Jul/17 ]

I think this has been fixed in a recent version of MongoDB – using a 3.5.x development version, I get this output:

ksuarz@seiji:~/code/mongo $ ./mongod --logpath ~
2017-07-03T15:57:22.688-0400 F CONTROL  [main] Failed global initialization: FileNotOpen: logpath "/Users/ksuarz" should name a file, not a directory.

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