title: How can I add shard at mongodb cluster?
body: <p>I have setting-up mongodb 3.2 cluster as below configuration on my debian machines</p>
  
  <pre><code># Config Server - mongod.conf
  
  storage:
    dbPath: /data/mongodb
    journal:
      enabled: true
  
  systemLog:
    destination: file
    logAppend: true
    path: /var/log/mongodb/mongod.log
  
  net:
    port: 27019
    bindIp: 0.0.0.0
  
  replication:
   replSetName: rs0
  
  sharding:
   clusterRole: "configsvr"
  
  
  # Shard Server 1 - mongod.conf
  
  storage:
    dbPath: /data/mongodb
    journal:
      enabled: true
  
  systemLog:
    destination: file
    logAppend: true
    path: /var/log/mongodb/mongod.log
  
  net:
    port: 27017
    bindIp: 0.0.0.0
  
  replication:
   replSetName: rs0
  
  
  # Shard Server 2 - mongod.conf
  
  storage:
    dbPath: /data/mongodb
    journal:
      enabled: true
  
  systemLog:
    destination: file
    logAppend: true
    path: /var/log/mongodb/mongod.log
  
  net:
    port: 27017
    bindIp: 0.0.0.0
  
  replication:
   replSetName: rs0
  </code></pre>
  
  <p>and run mongos to add shard on query router server</p>
  
  <p>$)mongos --configdb mongo-config:27019</p>
  
  <p>but I can't add shard.</p>
  
  <pre><code>mongos&gt; sh.addShard("rs0/mongo-db1:27017")
  {
      "ok" : 0,
      "errmsg" : "Cannot add rs0/mongo-db1:27017 as a shard since it is part of a config server replica set",
      "code" : 96
  }
  mongos&gt; sh.addShard("rs0/mongo-db1:27017")
  {
      "ok" : 0,
      "errmsg" : "Surprised to discover that mongo-db1:27017 does not believe it is a config server",
      "code" : 72
  }
  </code></pre>
  
  <p>getSharmap Command.</p>
  
  <pre><code>mongos&gt; db.runCommand("getShardMap");
  {
      "map" : {
          "config" : "rs0/mongo-db1:27017,mongo-db2:27017",
          "mongo-db1:27017" : "rs0/mongo-db1:27017,mongo-db2:27017",
          "mongo-db2:27017" : "rs0/mongo-db1:27017,mongo-db2:27017",
          "rs0/mongo-config:27019" : "rs0/mongo-config:27019",
          "rs0/mongo-db1:27017,mongo-db2:27017" : "rs0/mongo-db1:27017,mongo-db2:27017"
      },
      "ok" : 1
  }
  </code></pre>
  
  <p>here is mongos log</p>
  
  <p>2016-04-06T15:05:14.243+0000 I SHARDING [Balancer] about to log metadata event into actionlog: { _id: "mongo-router1-2016-04-06T15:05:14.243+0000-570525aa6b2b3378bb9daf56", server: "mongo-router1", clientAddr: "", time: new Date(1459955114243), what: "balancer.round", ns: "", details: { executionTimeMillis: 3, errorOccured: true, errmsg: "could not get updated shard list from config server due to Surprised to discover that mongo-db1:27017 does not believe it is a config server" } }</p>
  
  <p>what I'm missing  .?</p>