I am not able to start mongod servers with replication using config file. when issue the command
mongod --config /etc/mongod1.conf
throws an error-
Unrecognized option: replSet
Unrecognized option: oplogSizeMB
MongoDB Version: 3.0
# mongod.conf
# for documentation of all options, see:
# http://docs.mongodb.org/manual/reference/configuration-options/
# where to write logging data.
systemLog:
destination: file
logAppend: true
path: /var/log/mongodb/mongod.log
# Where and how to store data.
storage:
dbPath: /var/lib/mongo/test
journal:
enabled: true
# engine:
# mmapv1:
# wiredTiger:
# how the process runs
processManagement:
fork: true # fork and run in background
pidFilePath: /var/run/mongodb/mongod.pid # location of pidfile
# network interfaces
net:
port: 27030
# bindIp: 127.0.0.1 # Listen to local interface only, comment to listen on all interfaces.
#security:
#operationProfiling:
replication:
replSet: testrep
oplogSizeMB: 1024
#sharding:
## Enterprise-Only Options
please help me.
You can configure mongod and mongos instances at startup using a configuration file. The configuration file contains settings that are equivalent to the mongod and mongos command-line options. See Configuration File Settings and Command-Line Options Mapping.
In your case, read P:\Servers\MongoDB\logs\mongodb. log file.
Just ident replSet and oplogSizeMB lines two spaces to the right. That's the thing with yaml
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With