I created conf file for mongodb on Windows, however, when I try to run it I am getting error message:
unrecognized option: replication.
The file looks as follows:
systemLog:
destination:file
path:"C:\data\log\mongodb.log"
logAppend:true
processManagement:
fork:true
net:
bindIp:127.0.0.1
port:27017
storage:
dbPath:"C:\data"
replication:
replSetName:"data"
destination:file
path:"C:\data\log\mongodb.log"
logAppend:true
processManagement:
fork:true
net:
bindIp:127.0.0.1
port:27017
storage:
dbPath:"C:\data"
replication:
replSetName:"data"
Any takers at MongoDB?
Can you ensure that you are not using tabs to indent the file and that spaces are the only whitespace being used in the entire configuration?
I ran into a similar problem with a YAML file. If you add a space after the colon (: ) in your key value pairs things should work fine for you. Your updated file should look as follows:
systemLog:
destination: file
path: "C:\data\log\mongodb.log"
logAppend: true
processManagement:
fork: true
net:
bindIp: 127.0.0.1
port: 27017
storage:
dbPath: "C:\data"
replication:
replSetName: "data"
Give that a try and see if your error disappears.
댓글 없음:
댓글 쓰기