Discussion:
[mongodb-user] Error with Mongodb config file for replication in YAML on Windows
Yaroslav Kyrpych
2014-12-22 03:26:04 UTC
Permalink
Hello,

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"
--
You received this message because you are subscribed to the Google Groups "mongodb-user"
group.

For other MongoDB technical support options, see: http://www.mongodb.org/about/support/.
---
You received this message because you are subscribed to the Google Groups "mongodb-user" group.
To unsubscribe from this group and stop receiving emails from it, send an email to mongodb-user+***@googlegroups.com.
To post to this group, send email to mongodb-***@googlegroups.com.
Visit this group at http://groups.google.com/group/mongodb-user.
To view this discussion on the web visit https://groups.google.com/d/msgid/mongodb-user/CABSeBizW1azxj9u4P-pV_f2A0bd4o14s1qxiEXheRgeuzMM1Zg%40mail.gmail.com.
For more options, visit https://groups.google.com/d/optout.
Yaroslav Kyrpych
2014-12-22 21:18:43 UTC
Permalink
Any takers at MongoDB?

On Sun, Dec 21, 2014 at 9:26 PM, Yaroslav Kyrpych <
Post by Yaroslav Kyrpych
Hello,
I created conf file for mongodb on Windows, however, when I try to run it
unrecognized option: replication.
destination:file
path:"C:\data\log\mongodb.log"
logAppend:true
fork:true
bindIp:127.0.0.1
port:27017
dbPath:"C:\data"
replSetName:"data"
--
You received this message because you are subscribed to the Google Groups "mongodb-user"
group.

For other MongoDB technical support options, see: http://www.mongodb.org/about/support/.
---
You received this message because you are subscribed to the Google Groups "mongodb-user" group.
To unsubscribe from this group and stop receiving emails from it, send an email to mongodb-user+***@googlegroups.com.
To post to this group, send email to mongodb-***@googlegroups.com.
Visit this group at http://groups.google.com/group/mongodb-user.
To view this discussion on the web visit https://groups.google.com/d/msgid/mongodb-user/CABSeBiyDM1LpYxj2%3D%2B7zfEg7b20B4knRt6QMKHcr%2B7bGe0d58w%40mail.gmail.com.
For more options, visit https://groups.google.com/d/optout.
Tyler Brock
2014-12-23 19:25:47 UTC
Permalink
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?

-Tyler

On Mon, Dec 22, 2014 at 4:18 PM, Yaroslav Kyrpych <
Post by Yaroslav Kyrpych
Any takers at MongoDB?
On Sun, Dec 21, 2014 at 9:26 PM, Yaroslav Kyrpych <
Post by Yaroslav Kyrpych
Hello,
I created conf file for mongodb on Windows, however, when I try to run it
unrecognized option: replication.
destination:file
path:"C:\data\log\mongodb.log"
logAppend:true
fork:true
bindIp:127.0.0.1
port:27017
dbPath:"C:\data"
replSetName:"data"
--
You received this message because you are subscribed to the Google Groups "mongodb-user"
group.
http://www.mongodb.org/about/support/.
---
You received this message because you are subscribed to the Google Groups
"mongodb-user" group.
To unsubscribe from this group and stop receiving emails from it, send an
Visit this group at http://groups.google.com/group/mongodb-user.
To view this discussion on the web visit
https://groups.google.com/d/msgid/mongodb-user/CABSeBiyDM1LpYxj2%3D%2B7zfEg7b20B4knRt6QMKHcr%2B7bGe0d58w%40mail.gmail.com
<https://groups.google.com/d/msgid/mongodb-user/CABSeBiyDM1LpYxj2%3D%2B7zfEg7b20B4knRt6QMKHcr%2B7bGe0d58w%40mail.gmail.com?utm_medium=email&utm_source=footer>
.
For more options, visit https://groups.google.com/d/optout.
--
You received this message because you are subscribed to the Google Groups "mongodb-user"
group.

For other MongoDB technical support options, see: http://www.mongodb.org/about/support/.
---
You received this message because you are subscribed to the Google Groups "mongodb-user" group.
To unsubscribe from this group and stop receiving emails from it, send an email to mongodb-user+***@googlegroups.com.
To post to this group, send email to mongodb-***@googlegroups.com.
Visit this group at http://groups.google.com/group/mongodb-user.
To view this discussion on the web visit https://groups.google.com/d/msgid/mongodb-user/CAGFxsbLBPcf0Ng7rqTP8VhKycFtALBitNr8CfUX1bkS-8mXtvg%40mail.gmail.com.
For more options, visit https://groups.google.com/d/optout.
Doug
2014-12-24 23:06:09 UTC
Permalink
Hi Yaroslav,

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.

Doug
--
You received this message because you are subscribed to the Google Groups "mongodb-user"
group.

For other MongoDB technical support options, see: http://www.mongodb.org/about/support/.
---
You received this message because you are subscribed to the Google Groups "mongodb-user" group.
To unsubscribe from this group and stop receiving emails from it, send an email to mongodb-user+***@googlegroups.com.
To post to this group, send email to mongodb-***@googlegroups.com.
Visit this group at http://groups.google.com/group/mongodb-user.
To view this discussion on the web visit https://groups.google.com/d/msgid/mongodb-user/4c373bc8-9247-41aa-baee-42b04291cbd8%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.
Francis West
2015-04-09 20:00:05 UTC
Permalink
That worked for me, plus ANSI encoding, and using 1 space, no tabs -- this
was a ridiculous experience. Terrible format for 2015.
Post by Doug
Hi Yaroslav,
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.
destination: file
path: "C:\data\log\mongodb.log"
logAppend: true
fork: true
bindIp: 127.0.0.1
port: 27017
dbPath: "C:\data"
replSetName: "data"
Give that a try and see if your error disappears.
Doug
--
You received this message because you are subscribed to the Google Groups "mongodb-user"
group.

For other MongoDB technical support options, see: http://www.mongodb.org/about/support/.
---
You received this message because you are subscribed to the Google Groups "mongodb-user" group.
To unsubscribe from this group and stop receiving emails from it, send an email to mongodb-user+***@googlegroups.com.
To post to this group, send email to mongodb-***@googlegroups.com.
Visit this group at http://groups.google.com/group/mongodb-user.
To view this discussion on the web visit https://groups.google.com/d/msgid/mongodb-user/86af350b-e5e8-4e3b-876f-5cd085ab7771%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.
Loading...