Subject: [mongodb-user] MongoDB 3.4 Sharded Server

The Mongo 3.4 Shard setup is different compared to previous versions from what I understand.  Here are the instructions that I am supposed to perform: 

Stop the mongod process. Now, restart the mongod process adding the option --shardsvr. If you started mongod with a --dbpath option, specify that as well.

mongod --shardsvr ...

Note that with --shardsvr specified the default port for mongod becomes 27018.

Start a mongo config server:

mongod --configsvr ...

Note: configuration server setup has changed. If you are using MongoDB 3.4 you must set up your configuration servers with CSRS. An example setup is as follows:

mongod --configsvr --replSet csReplSet ...
mongod --configsvr --replSet csReplSet ...
mongod --configsvr --replSet csReplSet ...

mongo --port 27019

config = { _id: "csReplSet", members:[
         { _id : 0, host : "localhost:27019" },
         { _id : 1, host : "localhost:27020" },
         { _id : 2, host : "localhost:27021" }]};

(Note with --configsvr specified the default port for listening becomes 27019 and the default data directory /data/configdb. Wherever your data directory is, it is suggested that you verify that the directory is empty before you begin.)

Start a mongos:

mongos --configdb your_host_name:27019

These are the steps I tried from what I have gathered so far: 
mongod --shardsvr --replSet a --dbpath a0 --logpath log.a0 --port 27000 --fork --logappend --smallfiles --oplogSize 50
mongod --shardsvr --replSet a --dbpath a1 --logpath log.a1 --port 27001 --fork --logappend --smallfiles --oplogSize 50
mongod --shardsvr --replSet a --dbpath a2 --logpath log.a2 --port 27002 --fork --logappend --smallfiles --oplogSize 50

mongod --configsvr --replSet a --dbpath cfg0 --port 26050 --fork --logpath log.cfg0 --logappend
mongod --configsvr --replSet a --dbpath cfg1 --port 26051 --fork --logpath log.cfg1 --logappend
mongod --configsvr --replSet a --dbpath cfg2 --port 26052 --fork --logpath log.cfg2 --logappend

mongos --configdb m034:26050,m034:26051,m034:26052 --fork --logappend --logpath log.mongos0

It looks like I'm missing the step where it says if you're using Mongo 3.4, you must set up you configuration servers with CSRS.  What steps am I missing in order to get it to work?  Please help me fill in the missing steps.  Thanks.- show quoted text -

You received this message because you are subscribed to the Google Groups "mongodb-user"
For other MongoDB technical support options, see:
You received this message because you are subscribed to the Google Groups "mongodb-user" group.
To unsubscribe from this group and stop receiving emails from it, send an email to [email protected].
To post to this group, send email to [email protected].
Visit this group at
To view this discussion on the web visit
For more options, visit

Programming list archiving by: Enterprise Git Hosting