Mongod.exe error reading config file

420 views
Skip to first unread message

Ted Driver

unread,
Dec 4, 2014, 3:29:56 PM12/4/14
to mongod...@googlegroups.com
I'm running Windows server 2008 R2, installing 64 bit mongo as a service.
When I try to run the command:
"C:\MongoDB\bin\mongod.exe" --config="C:\MongoDB\mongod.cfg"

I get an error result:
"Error parsing INI config file: unknown option  ■d"
The black box is some unknown character. The contents of mongod.cfg
dbpath=c:\data\db
logpath=c:\data\log\mongod.log

If I switch the lines, I get the error: ..."unknown option ■l", meaning that some unknown character is getting inserted before the first character read in the config file.

I've recreated this config file multiple times, using different text editors, and using the echo method shown in the MongoDB help.  There is never an unknown character in my config file.
This is preventing me from starting Mongod as a service.  I can start mongod.exe just fine without the --config option.
Any ideas what's going on here?

Asya Kamsky

unread,
Dec 4, 2014, 3:52:33 PM12/4/14
to mongodb-user
Ted,

You say you are trying to install mongod as a service, but running:

"C:\MongoDB\bin\mongod.exe" --config="C:\MongoDB\mongod.cfg" 

does not run it as a service, it runs it as a regular program.   

Can you try running this with higher verbose level - simplest way is to add -vvv (that's level 3) to the command line...

Asya


--
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 mongod...@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/ba714be9-55a3-489c-9ed7-76680ddddbaa%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

Reply all
Reply to author
Forward
0 new messages