sh.isBalancerRunning() is failing at config server

XMLWordPrintableJSON

    • Type: Bug
    • Resolution: Works as Designed
    • Priority: Minor - P4
    • None
    • Affects Version/s: None
    • Component/s: None
    • None
    • Environment:
      Ubuntu
    • ALL
    • None
    • None
    • None
    • None
    • None
    • None
    • None

      Hello Team,

      My MongoDB sharded environment is 3.2.11 and I'm trying to execute sh.isBalancerRunning() at config server.

      My backup script is checking balancer status before start the config DB backup process. The script is trying to connect config server and execute sh.isBalancerRunning() and get the result.
      This one command works for older versions but it's giving an error with 3.x versions

      Could you please tell me how could I check the balancer status from config server without connections MongoS

      Here is the error:

      configsvr> sh.isBalancerRunning()
      2017-05-25T22:43:48.504+0000 E QUERY [thread1] Error: not connected to a mongos :
      sh._checkMongos@src/mongo/shell/utils_sh.js:8:15
      sh._getConfigDB@src/mongo/shell/utils_sh.js:23:5
      sh.isBalancerRunning@src/mongo/shell/utils_sh.js:138:1
      @(shell):1:1

      Thanks,

            Assignee:
            Kaloian Manassiev
            Reporter:
            Hasitha Kanchana [X]
            Votes:
            0 Vote for this issue
            Watchers:
            8 Start watching this issue

              Created:
              Updated:
              Resolved: