[JAVA-701] Got Error "unknown m/r field for sharding: $readPreference" when querying a sharded cluster Created: 27/Nov/12  Updated: 10/Mar/13  Resolved: 10/Mar/13

Status: Closed
Project: Java Driver
Component/s: None
Affects Version/s: 2.10.0
Fix Version/s: None

Type: Bug Priority: Major - P3
Reporter: Chris Choi Assignee: Unassigned
Resolution: Incomplete Votes: 0
Labels: query
Remaining Estimate: Not Specified
Time Spent: Not Specified
Original Estimate: Not Specified
Environment:

Scientific Linux 6.2 (Carbon)



 Description   

I have recently setup a sharded cluster, but the shards are actually single nodes. The problem I'm having is that when I query the `mongos` instance, reusing some code I know works against a single node I get:

Exception in thread "main" com.mongodb.CommandResult$CommandFailure: command failed [mapreduce]:

{ "serverUsed" : "project11.cs.st-andrews.ac.uk/138.251.214.135:27017" , "ok" : 0.0 , "errmsg" : "unknown m/r field for sharding: $readPreference"}

Note: I was performing an aggregate using the new aggregate framework.



 Comments   
Comment by Jeffrey Yemin [ 10/Mar/13 ]

Please re-open if you are still experiencing this.

Comment by Jeffrey Yemin [ 15/Dec/12 ]

Sorry for not responding to this earlier. I think it's a duplicate of JAVA-706, which is fixed in 2.10.1. Can you give it a try and let me know?

Thanks.

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