This is my config file:
storage:
dbPath: /var/mongodb/db/2
net:
bindIp: 192.168.103.100,localhost
port: 27002
security:
authorization: enabled
keyFile: /var/mongodb/pki/m103-keyfile
systemLog:
destination: file
path: /var/mongodb/db/mongod2.log
logAppend: true
processManagement:
fork: true
replication:
replSetName: m103-repl
I am launching mongodb with: mongo --host “m103-repl/192.168.103.100:27001” -u “m103-admin” -p “m103-pass” --authenticationDatabase “admin”
rs.status()
Are the quotes around admin a problem?
Do have to authenticate separately for replica? (Although, this is not working any better
mongo --host “m103-repl/m103:27001,192.168.103.100:27002,192.168.103.100:27003” --username “m103-admin” –password “m103-pass” --authenticationDatabase “admin