[SERVER-7075] Queries fail if no primary server available (primaryPreferred read preference) Created: 19/Sep/12  Updated: 15/Feb/13  Resolved: 23/Sep/12

Status: Closed
Project: Core Server
Component/s: Querying, Replication, Sharding
Affects Version/s: 2.2.0
Fix Version/s: None

Type: Bug Priority: Major - P3
Reporter: Benedikt Waldvogel Assignee: Randolph Tan
Resolution: Duplicate Votes: 0
Labels: None
Remaining Estimate: Not Specified
Time Spent: Not Specified
Original Estimate: Not Specified
Environment:

Setup:

  • OS: Linux 64bit
  • Sharding with one mongo router
  • Two replica sets:
  • RS1: Primary (mongo1), Secondary (mongo2), Arbiter
  • RS2: Primary (mongo3), Secondary (mongo4), Arbiter

Attachments: Java Source File PrimaryPreferredTest.java     File client.log     File mongos.log    
Issue Links:
Duplicate
duplicates SERVER-7246 Mongos cannot do slaveOk queries when... Closed
Operating System: ALL
Participants:

 Description   

Due to a crash, bother arbiters and both primary servers fail. Only the two secondary servers are alive but stay in state 'SECONDARY'.

Querying with the new 'primaryPreferred' read preference should still be possible.
However, a query using a new connection on the mongo router always fails:

socket exception [CONNECT_ERROR] for rs1/mongo1:27017,mongo2:27017



 Comments   
Comment by Randolph Tan [ 23/Sep/12 ]

Hi,

Thanks for reporting the bug. I have created a new issue and linked it to this ticket.

Comment by Benedikt Waldvogel [ 23/Sep/12 ]

I'm using mongo java driver 2.9.1. The java code and logs are attached. I set the read preferrence at all places that are possible.

Comment by Randolph Tan [ 21/Sep/12 ]

Hi,

Which driver are you using and how are you setting the read preference? Can you also post a verbose (-vvvvv or use setParameter command (http://docs.mongodb.org/manual/reference/command/setParameter/) to set logLevel to 5 temporarily) mongos log when this happens?

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