[SERVER-7234] Receiving Rplicaset Error intermittently without explanation: Exception: Failed on findOne(): 16340 No replica set monitor active and no cached seed found for set: rs5 Created: 02/Oct/12  Updated: 05/Oct/12  Resolved: 05/Oct/12

Status: Closed
Project: Core Server
Component/s: Internal Client
Affects Version/s: 2.2.0
Fix Version/s: None

Type: Task Priority: Blocker - P1
Reporter: Warren Chang Assignee: William Zola
Resolution: Done Votes: 0
Labels: None
Remaining Estimate: Not Specified
Time Spent: Not Specified
Original Estimate: Not Specified
Environment:

PRODUCTION


Participants:

 Description   

Hi,
We have 6 replicasets used in our production environment and we are seeing at odd times the following error in our application logs

Exception: Failed on findOne(): 16340 No replica set monitor active and no
cached seed found for set: rs5

I can't find a reference to this error code or message, so putting in a ticket hoping someone can help us understand what happens. This usually fails and recovers 10-20 minutes later.

When this happens, we check and the replica set is alive and healthy.

We are using the c++ driver and using mongo 2.2



 Comments   
Comment by William Zola [ 05/Oct/12 ]

I believe that I've answered your question, and I haven't heard back from you in a few days, so I will be closing out this case. Have a great day!

-William

Comment by William Zola [ 03/Oct/12 ]

Hi David!

This error indicates that the C++ driver couldn't find any nodes in the replica set 'rs5'.

Reference: https://github.com/mongodb/mongo/blob/master/src/mongo/client/dbclient_rs.cpp#L1283

I note that your "rs.status()" output is for 'rs4', not 'rs5'. If you're trying to connect to a replica set that does not exist, you'll likely get that error.

What connect string or MongoDB URL are you using to connect to the replica set? If you're only connecting to one node from the set, and that node happens to be down, you could also get that error.

Finally, networking connectivity problems between your client program and the replica set could also cause this problem.

Let me know if you have further questions. Have a great day!

-William

Comment by Warren Chang [ 03/Oct/12 ]

Hi William,
We are connecting to a replica set. the node sizes vary between 5 and 8
This error appears in the application code only.

I can send you the rs status, but everytime this has happened, the replicaset seems to be healthy.
rs4:PRIMARY> rs.status()
{
"set" : "rs4",
"date" : ISODate("2012-10-03T21:52:57Z"),
"myState" : 1,
"members" : [

{ "_id" : 6, "name" : "ec2-23-21-94-159.compute-1.amazonaws.com:27017", "health" : 1, "state" : 1, "stateStr" : "PRIMARY", "uptime" : 1388647, "optime" : Timestamp(1349301177000, 228), "optimeDate" : ISODate("2012-10-03T21:52:57Z"), "self" : true }

,

{ "_id" : 7, "name" : "ec2-23-21-103-241.compute-1.amazonaws.com:27017", "health" : 1, "state" : 2, "stateStr" : "SECONDARY", "uptime" : 1046655, "optime" : Timestamp(1349301176000, 70), "optimeDate" : ISODate("2012-10-03T21:52:56Z"), "lastHeartbeat" : ISODate("2012-10-03T21:52:56Z"), "pingMs" : 0 }

,

{ "_id" : 8, "name" : "ec2-23-21-97-125.compute-1.amazonaws.com:27017", "health" : 1, "state" : 2, "stateStr" : "SECONDARY", "uptime" : 1046655, "optime" : Timestamp(1349301176000, 86), "optimeDate" : ISODate("2012-10-03T21:52:56Z"), "lastHeartbeat" : ISODate("2012-10-03T21:52:56Z"), "pingMs" : 0 }

,

{ "_id" : 9, "name" : "ec2-23-21-103-219.compute-1.amazonaws.com:27017", "health" : 1, "state" : 2, "stateStr" : "SECONDARY", "uptime" : 174502, "optime" : Timestamp(1349301176000, 70), "optimeDate" : ISODate("2012-10-03T21:52:56Z"), "lastHeartbeat" : ISODate("2012-10-03T21:52:56Z"), "pingMs" : 0 }

,

{ "_id" : 10, "name" : "ec2-23-21-103-228.compute-1.amazonaws.com:27017", "health" : 1, "state" : 2, "stateStr" : "SECONDARY", "uptime" : 1046655, "optime" : Timestamp(1349301176000, 82), "optimeDate" : ISODate("2012-10-03T21:52:56Z"), "lastHeartbeat" : ISODate("2012-10-03T21:52:56Z"), "pingMs" : 0 }

],
"ok" : 1
}

Comment by William Zola [ 03/Oct/12 ]

Hi Warren!

I'll need some more information to diagnose this problem. Please let me know:

  • Are you connecting to a Replica Set or a sharded cluster (a 'mongos' process)?
  • Does this error appear in the 'mongod' or 'mongos' log, or in your application code?
  • What is the output of 'rs.status()' from the replica set to which you are trying to connect?

Once I have this information, I will be able to move forward with my diagnosis. I look forward to hearing from you soon. Have a great day!

-William

Generated at Thu Feb 08 03:13:58 UTC 2024 using Jira 9.7.1#970001-sha1:2222b88b221c4928ef0de3161136cc90c8356a66.