-
Type:
Bug
-
Resolution: Done
-
Priority:
Major - P3
-
Affects Version/s: 1.4.4
-
Component/s: Admin
-
None
-
Linux
-
None
-
3
-
None
-
None
-
None
-
None
-
None
-
None
When I setup replication between a master and slave where they are both using auth and run
db._adminCommand(
);
in the output i get the following
"repl" : {
"ismaster" : 0,
"msg" : "not paired",
"sources" : [
{
"host" : "10.10.0.1",
"syncedTo" :
,
"masterFirst" : "Thu Jan 01 1970 12:16:47 GMT+0000 (UTC)",
"masterLast" : "Thu Jan 01 1970 12:16:47 GMT+0000 (UTC)",
"lagSeconds" : 18446742793942500
}
]
},
To create the issue i start by setting up a master with the following config
- cat /etc/mongod.conf
dbpath = /db/mongodb
logpath = /db/logs/mongodb.log
fork = true
bind_ip = 0.0.0.0
master = true
directoryperdb = true
syncdelay = 5
oplogSize = 51200
auth = true
then log into the admin database locally create an admin user, then auth and switch to the local database and create the repl user.
Then start a slave with the following config
- cat /etc/mongod.conf
dbpath = /db/mongodb
logpath = /db/logs/mongodb.log
fork = true
bind_ip = 0.0.0.0
slave = true
source = 10.10.0.1
directoryperdb = true
syncdelay = 5
auth = true
Login and create the local repl user.
Import some data on the master
then run
> db._adminCommand(
);
and get the output above
Logs are attached