Mongodb – Balancer is down after stopping config servers

mongodbreplication

I had an urgent issue to solve in admin DB

I stopped all config servers, and made changes in the primary one.
After restarting all other servers – balancer working only on the server where I did changes, the other two have:

balancer:
Currently enabled: yes
Currently running: no

Also rs.status() returns:

configsvr> rs.status()
{
        "info" : "configsvr",
        "ok" : 0,
        "errmsg" : "not running with --replSet",
        "code" : 76
}

Need some help to fix it
Should I restart all config servers with some options, or need to build replication from the beginning?

Best Answer

First: balancer is running ONLY at config server replica sets PRIMARY, never on SECONDARY.

Second: (as) your error message says that, that node where you gave rs.statatus() command is not started in replica set mode, more like maintenance mode. i.e. started without --replSet or replication.replSetName config parameter and maybe also without "sharding.clusterRole: configsvr" parameter.

You can check what where starting parameters, by just reading mongod.log file. There is (at startup) list of parameters what that mongod used when it was started.