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

Misleading error when running addshard with a space before hostname

    • Type: Icon: Improvement Improvement
    • Resolution: Unresolved
    • Priority: Icon: Minor - P4 Minor - P4
    • None
    • Affects Version/s: 2.0.2
    • Component/s: Sharding
    • Labels:
    • Cluster Scalability
    • Sharding 10 (02/19/16)

      If add a replica set as a member of a shard, with a space between the comma and one of the hosts, like so:

      db.runCommand(

      { addshard : 'shard0/localhost:4000, localhost:4001', name: 'shard0' }

      )

      I get a misleading error:

      "can't use localhost as a shard since all shards need to communicate. either use all shards and configdbs in localhost or all in actual IPs host: localhost:4001 isLocalHost:0"

      Better to trim spaces in lists of replica-set members, or to give a more informative error.

            Assignee:
            backlog-server-cluster-scalability [DO NOT USE] Backlog - Cluster Scalability
            Reporter:
            jesse@mongodb.com A. Jesse Jiryu Davis
            Votes:
            0 Vote for this issue
            Watchers:
            2 Start watching this issue

              Created:
              Updated: