ReplicaSetMonitor no master found for set while enabling sharding a

446 views
Skip to first unread message

gur...@gmail.com

unread,
Feb 26, 2015, 3:56:44 PM2/26/15
to mongod...@googlegroups.com

Trying to setup the sharded cluster on AWS with 2 replicasets spanning between 2 availability zones(us-west-2a and us-east-1a)
Throws the following error : ReplicaSetMonitor no master found for set while enabling sharding on a database.
Both replicasets exist and shards listing shows them, but it still throws the error.


Query router in us-west-2a complains it can't find master in rs1 which is located in us-east-1a zone.

mongos> use admin
switched to db admin
mongos
>  sh.enableSharding("dummy")
{
       
"code" : 10009,
       
"ok" : 0,
       
"errmsg" : "exception: error creating initial database config information :: caused by :: ReplicaSetMonitor no master found for set: rs2"
}



Query router in us-east-2a complains it can't find master in rs1 which is located in us-west-2a zone.

mongos> use admin
switched to db admin
mongos
>  sh.enableSharding("dummy")
{
       
"code" : 10009,
       
"ok" : 0,
       
"errmsg" : "exception: error creating initial database config information :: caused by :: ReplicaSetMonitor no master found for set: rs1"
}



Shards
{
       
"shards" : [
               
{
                       
"_id" : "ShardA",
                       
"host" : "rs1/ec2-52-1-46-178.compute-1.amazonaws.com:27017,ec2-54-68-104-153.us-west-2.compute.amazonaws.com:27017,ip-172-31-43-22:27017",
                       
"tags" : [                             "ORE"
                       
]
               
},
               
{
                       
"_id" : "ShardB",
                       
"host" : "rs2/ec2-52-10-172-71.us-west-2.compute.amazonaws.com:27017,ec2-54-88-34-213.compute-1.amazonaws.com:27017,ip-172-31-5-130:27017",
                       
"tags" : [
                               
"VIR"
                       
]
               
}
       
],
       
"ok" : 1
}



Replicaset -rs1



rs1
:PRIMARY> rs.status()
{
       
"set" : "rs1",
       
"date" : ISODate("2015-02-26T19:50:03Z"),
       
"myState" : 1,
       
"members" : [
               
{
                       
"_id" : 0,
                       
"name" : "ip-172-31-43-22:27017",
                       
"health" : 1,
                       
"state" : 1,
                       
"stateStr" : "PRIMARY",
                       
"uptime" : 4943,
                       
"optime" : Timestamp(1424970734, 1),
                       
"optimeDate" : ISODate("2015-02-26T17:12:14Z"),
                       
"electionTime" : Timestamp(1424975300, 1),
                       
"electionDate" : ISODate("2015-02-26T18:28:20Z"),
                       
"self" : true
               
},
               
{
                       
"_id" : 1,
                       
"name" : "ec2-54-68-104-153.us-west-2.compute.amazonaws.com:27017",
                       
"health" : 1,
                       
"state" : 2,
                       
"stateStr" : "SECONDARY",
                       
"uptime" : 4932,
                       
"optime" : Timestamp(1424970734, 1),
                       
"optimeDate" : ISODate("2015-02-26T17:12:14Z"),
                       
"lastHeartbeat" : ISODate("2015-02-26T19:50:01Z"),
                       
"lastHeartbeatRecv" : ISODate("2015-02-26T19:50:02Z"),
                       
"pingMs" : 0,
                       
"syncingTo" : "ip-172-31-43-22:27017"
               
},
               
{
                       
"_id" : 2,
                       
"name" : "ec2-52-1-46-178.compute-1.amazonaws.com:27017",
                       
"health" : 1,
                       
"state" : 2,
                       
"stateStr" : "SECONDARY",
                       
"uptime" : 4896,
                       
"optime" : Timestamp(1424970734, 1),
                       
"optimeDate" : ISODate("2015-02-26T17:12:14Z"),
                       
"lastHeartbeat" : ISODate("2015-02-26T19:50:01Z"),
                       
"lastHeartbeatRecv" : ISODate("1970-01-01T00:00:00Z"),
                       
"pingMs" : 66
               
}
       
],
       
"ok" : 1
}



Replicaset -rs2


rs2
:PRIMARY> rs.status()
{
       
"set" : "rs2",
       
"date" : ISODate("2015-02-26T20:46:57Z"),
       
"myState" : 1,
       
"members" : [
               
{
                       
"_id" : 0,
                       
"name" : "ip-172-31-5-130:27017",
                       
"health" : 1,
                       
"state" : 1,
                       
"stateStr" : "PRIMARY",
                       
"uptime" : 8332,
                       
"optime" : Timestamp(1424972059, 1),
                       
"optimeDate" : ISODate("2015-02-26T17:34:19Z"),
                       
"electionTime" : Timestamp(1424975335, 1),
                       
"electionDate" : ISODate("2015-02-26T18:28:55Z"),
                       
"self" : true
               
},
               
{
                       
"_id" : 1,
                       
"name" : "ec2-54-88-34-213.compute-1.amazonaws.com:27017",
                       
"health" : 1,
                       
"state" : 2,
                       
"stateStr" : "SECONDARY",
                       
"uptime" : 8316,
                       
"optime" : Timestamp(1424972059, 1),
                       
"optimeDate" : ISODate("2015-02-26T17:34:19Z"),
                       
"lastHeartbeat" : ISODate("2015-02-26T20:46:57Z"),
                       
"lastHeartbeatRecv" : ISODate("2015-02-26T20:46:57Z"),
                       
"pingMs" : 0,
                       
"syncingTo" : "ip-172-31-5-130:27017"
               
},
               
{
                       
"_id" : 2,
                       
"name" : "ec2-52-10-172-71.us-west-2.compute.amazonaws.com:27017",
                       
"health" : 1,
                       
"state" : 2,
                       
"stateStr" : "SECONDARY",
                       
"uptime" : 8275,
                       
"optime" : Timestamp(1424972059, 1),
                       
"optimeDate" : ISODate("2015-02-26T17:34:19Z"),
                       
"lastHeartbeat" : ISODate("2015-02-26T20:46:56Z"),
                       
"lastHeartbeatRecv" : ISODate("1970-01-01T00:00:00Z"),
                       
"pingMs" : 59
               
}
       
],
       
"ok" : 1
}




Appreciated help.

Thanks

Message has been deleted

gur...@gmail.com

unread,
Feb 26, 2015, 5:34:29 PM2/26/15
to mongod...@googlegroups.com
Used mongodb version 2.6.8 
...

Asya Kamsky

unread,
Feb 26, 2015, 9:12:12 PM2/26/15
to mongodb-user
Looks like you asked this question more than once - I replied in the other thread.


--
You received this message because you are subscribed to the Google Groups "mongodb-user"
group.
 
For other MongoDB technical support options, see: http://www.mongodb.org/about/support/.
---
You received this message because you are subscribed to the Google Groups "mongodb-user" group.
To unsubscribe from this group and stop receiving emails from it, send an email to mongodb-user...@googlegroups.com.
To post to this group, send email to mongod...@googlegroups.com.
Visit this group at http://groups.google.com/group/mongodb-user.
To view this discussion on the web visit https://groups.google.com/d/msgid/mongodb-user/20a9a5bd-20b0-4649-b9ea-d24e48d4d2f4%40googlegroups.com.

For more options, visit https://groups.google.com/d/optout.



--
{ "name" : "Asya Kamsky",
  "place" : [ "New York", "Palo Alto", "Everywhere else" ],
  "email" : "as...@mongodb.com",
  "blog" : "http://www.askasya.com/",
  "twitter": "@asya999" }
Reply all
Reply to author
Forward
0 new messages