[GODRIVER-1184] server selection timeout ReplicaSetNoPrimary, but there is a primary Created: 03/Jul/19  Updated: 27/Oct/23  Resolved: 09/Jul/19

Status: Closed
Project: Go Driver
Component/s: Connections
Affects Version/s: 1.0.3
Fix Version/s: None

Type: Bug Priority: Major - P3
Reporter: Pierre Durand Assignee: Isabella Siu (Inactive)
Resolution: Gone away Votes: 0
Labels: None
Remaining Estimate: Not Specified
Time Spent: Not Specified
Original Estimate: Not Specified


 Description   

My daemon process stopped working unexpectedly.

Here is the error message returned by the MongoDB driver.

server selection error: server selection timeout current topology: Type: ReplicaSetNoPrimary Servers: Addr: archive6-3.xxx.com:27506, Type: RSPrimary, State: Connected, Average RTT: 5002238 Addr: archive6-1.xxx.com:27506, Type: RSSecondary, State: Connected, Average RTT: 4990684 Addr: archive6-2.xxx.com:27506, Type: RSSecondary, State: Connected, Average RTT: 5050808 Addr: archive6-arb1.xxx.com:27506, Type: RSArbiter, State: Connected, Average RTT: 4962164 Addr: archive6-arb2.xxx.com:27506, Type: RSArbiter, State: Connected, Average RTT: 848065

The MongoDB client object is no more usable: all MongoDB queries fail with this error.

The only solution is to restart my process, which creates a new client.

I don't understand what is the problem:

  • the driver reports that there is no primary
  • all nodes are in "connected" state
  • when I check manually with rs.status(), everything is fine

Is it possible that the Go MongoDB driver is in a "corrupted" state ?



 Comments   
Comment by Pierre Durand [ 09/Jul/19 ]

Hello,

 

Sorry I don't have the logs anymore.

If the issue happens again, I will get the logs quickly.

You can close this issue, if the logs are required for your investigation.

Thank you.

Comment by Isabella Siu (Inactive) [ 08/Jul/19 ]

Hi pierrre,

In order to properly diagnose this problem, we need the server logs to go with the error.

Generated at Thu Feb 08 08:35:51 UTC 2024 using Jira 9.7.1#970001-sha1:2222b88b221c4928ef0de3161136cc90c8356a66.