We are trying to set up mongodb's remote access by using a config file, and are having trouble running the config file in the bin folder. When we put our script through YAML Lint it says its valid, but when we run our file in command prompt it interchanges two errors 1) Unrecognized Option: Storage and 2) Unrecognized Option: SystemLog
This is our config file
storage:
dbPath: C:\\data\\db
enabled: true
systemLog:
destination: file
logAppend: true
logpath: C:\\data\\log\\mongo.log
net:
port: 27017
bindIp: 127.0.0.1
our command in command prompt is
mongod -f mongo.config.txt
Please Help <3
You have a couple of errors in your config (for MongoDB 3.2):
storage.enabled
option, I think you meantstorage.journal.enabled
systemLog.logpath
option, this should besystemLog.path
This modified config file seems to work as expected:
You can browse for more options in the Configuration File Options page
This happened with me because I deleted a space in the configuration file.
I got this error, when the configuration file had the below state, note the gap before enabled:
This happen due to invalid yaml syntax. In my case, i missed the space between dbPath and value
Incorrect
Correct