clean shutdown of configserver and mongos (sharding set)

680 views
Skip to first unread message

Tim

unread,
Nov 7, 2012, 7:43:28 AM11/7/12
to mongod...@googlegroups.com
Hi,


I have three config-server and one mongos instance.

What's the best way to do a clean shutdown (in order to restart them or restart a other configuration).

I tried
"mongo host:port/admin" to call the mongos-shell
and used the commands

> use admin
> db.shutdownServer()

but it did not work:

uncaught exception: assert failed : unexpected error: "shutdownServer failed: unauthorized: this command must run from localhost when running db without auth"

Is there an order (1st: config server, 2nd: mongos)... do I have to delete the mongo.lock file and so on in order to clean
all the configs that are stored?

best regards


Tim

unread,
Nov 8, 2012, 3:49:07 AM11/8/12
to mongod...@googlegroups.com
(Or Even to shutdown mongos )

tetlika

unread,
Nov 8, 2012, 6:14:13 AM11/8/12
to mongodb-user
I beleive the best way of clean shutdown is to:

1. stop ballancing
2. shutdown mongoses services
3. shutdown config mongod services
4. shutdown shards mongod services

Tim

unread,
Nov 8, 2012, 6:42:40 AM11/8/12
to mongod...@googlegroups.com
hi tetlika,

I fail to shutdown mongos ... (like descriped above) do you have an idea how to simply shutdown mongos?
Is there a special command for that?

Andre de Frere

unread,
Nov 19, 2012, 11:00:45 PM11/19/12
to mongod...@googlegroups.com
Hi Tim,

As described in the output of the error, you cannot shutdown the process remotely if you are not using auth.  You will need to either enable auth, or remote into the box so that you can issue the commands from localhost.

Regards,
André
Reply all
Reply to author
Forward
0 new messages