Details
-
Bug
-
Resolution: Done
-
Critical - P2
-
None
-
None
-
None
-
None
-
ALL
Description
I have created a replica set with three mongo server(mongo-1,mongo-2,mongo-3) and i have initiated mongo-1 as Primary but when i added mongo-2's ip address and mongo-3's ip address it is showing :
rs2:PRIMARY> rs.status();
|
{
|
"set" : "rs2",
|
"date" : ISODate("2014-02-18T13:32:02Z"),
|
"myState" : 1,
|
"members" : [
|
{
|
"_id" : 0,
|
"name" : "mongo-1:27017",
|
"health" : 1,
|
"state" : 1,
|
"stateStr" : "PRIMARY",
|
"uptime" : 11863,
|
"optime" : Timestamp(1392730243, 1),
|
"optimeDate" : ISODate("2014-02-18T13:30:43Z"),
|
"self" : true
|
},
|
{
|
"_id" : 1,
|
"name" : "ip-address of mongo-2:27017",
|
"health" : 1,
|
"state" : 6,
|
"stateStr" : "UNKNOWN",
|
"uptime" : 11722,
|
"optime" : Timestamp(0, 0),
|
"optimeDate" : ISODate("1970-01-01T00:00:00Z"),
|
"lastHeartbeat" : ISODate("2014-02-18T13:32:00Z"),
|
"lastHeartbeatRecv" : ISODate("1970-01-01T00:00:00Z"),
|
"pingMs" : 22,
|
"lastHeartbeatMessage" : "still initializing"
|
},
|
{
|
"_id" : 2,
|
"name" : "ip-address of mongo-3:27017",
|
"health" : 1,
|
"state" : 6,
|
"stateStr" : "UNKNOWN",
|
"uptime" : 79,
|
"optime" : Timestamp(0, 0),
|
"optimeDate" : ISODate("1970-01-01T00:00:00Z"),
|
"lastHeartbeat" : ISODate("2014-02-18T13:32:00Z"),
|
"lastHeartbeatRecv" : ISODate("1970-01-01T00:00:00Z"),
|
"pingMs" : 44,
|
"lastHeartbeatMessage" : "still initializing"
|
}
|
],
|
"ok" : 1
|
}
|
and my mongodb.conf file for all three server includes:
dbpath=/var/lib/mongodb
|
logpath=/var/log/mongodb/mongodb.log
|
logappend=true
|
port = 27017
|
fork = true
|
replSet = rs2
|
and all the three server are accessible from each other by issuing command like this:
Eg: From mongo-1 server
mongo ip-address-of-mongo-2:27017
output obtained:
MongoDB shell version: 2.4.9
connecting to: ip-address-of-mongo-2:27017/test
i have gone through the all configuration... but still replica set members are not accessible.
Please help me to resolve this issue.