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

Non indicative error is displayed when mongoS configDB replica set name is incorrect.

    • Type: Icon: Improvement Improvement
    • Resolution: Unresolved
    • Priority: Icon: Minor - P4 Minor - P4
    • None
    • Affects Version/s: None
    • Component/s: Logging
    • Cluster Scalability

      Overview:
      When `mongoS` is launched with an incorrect replica set name for the config server host, there is no clear indication of the error in customer actions.

      The displayed error is:

      "Cannot accept sharding commands if not started with --shardsvr"
      

      Encountered in version: 4.4.3

      Scenario:
      1. Start data nodes as:

      mongod --replSet shard01 --dbpath <paths> --logpath <logbaths> --port <ports> --fork --shardsvr 
      

      2. Start config nodes as:

      mongod --replSet configRepl --dbpath <path> --logpath <logpath> --port <conf_port> --fork --configsvr 
      

      3. Start `mongoS` as:

      mongos --logpath <logpath> --port <port> --configdb shard01/<conf_host>:<conf_port> --fork
      

      The --configdb option in this command uses the incorrect replica set name "shard01" instead of "configRepl".

      4. Connect to mongoS
      5. Run commands:

      sh.enableSharding("myNewDB")
      use myNewDB
      db.myNewCollection1.insertOne( { x: 1 }
      

      Result:
      Error that suggests the server was started without the required configuration.

      WriteError({
        "index": 0,
        "code": 193,
        "errmsg": "Cannot accept sharding commands if not started with --shardsvr",
        "op": {
          "_id": ObjectId("601804bf64ac35a70d27f863"),
          "x": 1
        }
      })
      

      Expected Result:
      An indicative error that specifies that the config server <fill configDB param> is not available.

            Assignee:
            backlog-server-cluster-scalability [DO NOT USE] Backlog - Cluster Scalability
            Reporter:
            stas.baskin@mongodb.com Stas Baskin
            Votes:
            1 Vote for this issue
            Watchers:
            7 Start watching this issue

              Created:
              Updated: