[SERVER-4021] Running "addshard" outside admin db produces cryptic error message Created: 05/Oct/11 Updated: 02/Jan/19 Resolved: 02/Jan/19 |
|
| Status: | Closed |
| Project: | Core Server |
| Component/s: | Sharding |
| Affects Version/s: | 2.0.0 |
| Fix Version/s: | None |
| Type: | Improvement | Priority: | Trivial - P5 |
| Reporter: | Daniel Pasette (Inactive) | Assignee: | Kim Tao |
| Resolution: | Done | Votes: | 0 |
| Labels: | ShardingRoughEdges, neweng | ||
| Remaining Estimate: | Not Specified | ||
| Time Spent: | Not Specified | ||
| Original Estimate: | Not Specified | ||
| Issue Links: |
|
||||||||||||||||
| Sprint: | Sharding 10 (02/19/16), Sharding 2018-12-17, Sharding 2018-12-31, Sharding 2019-01-14 | ||||||||||||||||
| Participants: | |||||||||||||||||
| 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" }) 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. |
| Comments |
| Comment by Kim Tao [ 02/Jan/19 ] |
|
Confirmed that this has gone away. Repeating the above steps now returns an error: "addShard may only be run against the admin database." |
| Comment by Spencer Brody (Inactive) [ 29/Jan/16 ] |
|
I suspect this has gone away, but we should just double-check that. |
| Comment by Eric Milkie [ 16/Feb/12 ] |
|
I ran into this today as well. Possibly we could put the name of the namespace that it's attempting to create in the error message, to make it more obvious. And I agree with Brandon that we should suggest that the solution is to switch to the admin database. |