Got Error "unknown m/r field for sharding: $readPreference" when querying a sharded cluster

XMLWordPrintableJSON

    • Type: Bug
    • Resolution: Incomplete
    • Priority: Major - P3
    • None
    • Affects Version/s: 2.10.0
    • Component/s: None
    • Environment:
      Scientific Linux 6.2 (Carbon)
    • None
    • None
    • None
    • None
    • None
    • None
    • None

      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.

            Assignee:
            Unassigned
            Reporter:
            Chris Choi
            None
            Votes:
            0 Vote for this issue
            Watchers:
            2 Start watching this issue

              Created:
              Updated:
              Resolved: