[CSHARP-128] find(..) query with MongoServer.Create("...?slaveok=true") will always throw "not master" Created: 07/Dec/10 Updated: 02/Apr/15 Resolved: 01/Feb/11 |
|
| Status: | Closed |
| Project: | C# Driver |
| Component/s: | None |
| Affects Version/s: | 0.9 |
| Fix Version/s: | 0.11 |
| Type: | Bug | Priority: | Major - P3 |
| Reporter: | huy nguyen | Assignee: | Robert Stam |
| Resolution: | Done | Votes: | 0 |
| Labels: | None | ||
| Remaining Estimate: | Not Specified | ||
| Time Spent: | Not Specified | ||
| Original Estimate: | Not Specified | ||
| Environment: |
Windows 7 C# .net 3.5 driver version 10gen driver v0.9. |
||
| Description |
|
//begin code var col = m["cache"]["flatdoc"]; )); //this will throw: not master //this will also throw: not master //end code I hope this helps |
| Comments |
| Comment by Robert Stam [ 01/Feb/11 ] |
|
Please reopen this issue if you are able to reproduce it. |
| Comment by Robert Stam [ 27/Dec/10 ] |
|
Are you still seeing this? The rs.status() looks normal. We would have to see the rs.status() values at the time of a failure. |
| Comment by huy nguyen [ 07/Dec/10 ] |
|
Just in case, here's the status of arbiter 1: connecting to: 192.168.1.110:27118/test , , , { "_id" : 5, "name" : "192.168.1.112:27117", "health" : 1, "state" : 2, "uptime" : 2833354, "lastHeartbeat" : "Tue Dec 07 2010 09:55:39 GMT-0800 (Pacific Standard Time)" } ], and for arbiter 2: connecting to: 192.168.1.112:27118/test , , , { "_id" : 5, "name" : "192.168.1.112:27117", "health" : 1, "state" : 2, "uptime" : 2833035, "lastHeartbeat" : "Tue Dec 07 2010 09:47:01 GMT-0800 (Pacific Standard Time)" } ], |
| Comment by huy nguyen [ 07/Dec/10 ] |
|
Robert, On the master of this replica (192.168.1.110:27117) set here is what I see: , , , { "_id" : 5, "name" : "192.168.1.112:27117", "health" : 1, "state" : 2, "uptime" : 2832654, "lastHeartbeat" : "Tue Dec 07 2010 09:43:58 GMT-0800 (Pacific Standard Time)" } ], On the slave (192.168.1.112:27117), I see this: > rs.isMaster() , , , { "_id" : 5, "name" : "vm-sandbox-1.docstoc.local:27117", "health" : 1, "state" : 2, "self" : true } ], I will continue to investigate this issue on my side (reboot all the mongo nodes) and do additional tests. I'll keep you posted. --Huy |
| Comment by Robert Stam [ 07/Dec/10 ] |
|
I cannot reproduce this. I have a similar test program with a 2 node replica set, and verified just now that it is still working (that reads are routed to the secondary and that no exception is thrown). When you remove "slaveok=true" from the URL it no longer uses the secondaries at all (even if you set SlaveOk on the cursor). So I suspect your secondary may be in some unusual state that is preventing it from responding to queries. Can you repeat this test and call "rs.status()" from the mongo shell (from two shells actually, one for each node) so that we can see what state the replica set nodes are in? I don't think we need the state of the arbiters, but it wouldn't hurt. |