Uploaded image for project: 'Core Server'
  1. Core Server
  2. SERVER-4021

Running "addshard" outside admin db produces cryptic error message

    • Type: Icon: Improvement Improvement
    • Resolution: Done
    • Priority: Icon: Trivial - P5 Trivial - P5
    • None
    • Affects Version/s: 2.0.0
    • Component/s: Sharding
    • Sharding 10 (02/19/16), Sharding 2018-12-17, Sharding 2018-12-31, Sharding 2019-01-14

      Currently, adding a shard without the admin db selected produces a cryptic error:

      mongos> db.runCommand(

      { 'addshard': "shard-1/localhost:30000,localhost:30001,localhost:30002" }

      )
      Wed Oct 5 11:22:46 uncaught exception: error

      { "$err" : "can't find a shard to put new db on", "code" : 10185 }

      A google search reveals that a number of people have asked questions about this error. A message advising the use of "admin" ought to be implemented.

            Assignee:
            kimberly.tao@mongodb.com Kim Tao
            Reporter:
            dan@mongodb.com Daniel Pasette (Inactive)
            Votes:
            0 Vote for this issue
            Watchers:
            4 Start watching this issue

              Created:
              Updated:
              Resolved: