Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- # 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: /root/mongodata/log/mongod.log
- # Where and how to store data.
- storage:
- dbPath: /root/mongodata/db1 # also have db2 and so on for rest of the instances
- journal:
- enabled: true
- # engine:
- # mmapv1:
- # wiredTiger:
- # how the process runs
- processManagement:
- fork: true # fork and run in background
- pidFilePath: /rood/mongodata/db1/mongod.pid # location of pidfile, different for 4 instances
- # network interfaces
- net:
- port: 30000 #port different for 4 different instances
- bindIp: 12.123.321.432(example ip, same for all 4 .conf files)
- # security
- security:
- KeyFile: /path to my keyfile location
- # authorization: enabled
- #operationProfiling:
- replication:
- replSetName: testReplica #have this same for all 4
- #sharding:
- ## Enterprise-Only Options
- #auditLog:
- #snmp:
- openssl rand -base64 756 > <path-to-keyfile>
- chmod 400 <path-to-keyfile>
- mongo --host 12.123.321.432 --port 30000
- 2016-12-22T20:55:38.396-0500 E QUERY [thread1] Error: couldn't add user: not authorized on test to execute command { createUser: "root", pwd: "xxx", roles: [ { role: "root", db: "admin" } ], digestPassword: false, writeConcern: { w: "majority", wtimeout: 30000.0 } } :
- _getErrorWithCode@src/mongo/shell/utils.js:23:13
- DB.prototype.createUser@src/mongo/shell/db.js:1230:11
- @(shell):1:1
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement