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

Running "addshard" outside admin db produces cryptic error message

    XMLWordPrintableJSON

Details

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

    Description

      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.

      Attachments

        Activity

          People

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

            Dates

              Created:
              Updated:
              Resolved: