0

I config a cluster in MongoDB as following:

1 Config Server
2 Shard Servers,

and this is Sharding status:

--- Sharding Status ---
  sharding version: {
        "_id" : 1,
        "minCompatibleVersion" : 5,
        "currentVersion" : 6,
        "clusterId" : ObjectId("59c333c5d92439c17b08a330")
}
  shards:
        {  "_id" : "rs1",  "host" : "rs1/ShardServer1:27018",  "state" : 1,  "tags" : [ "siteGroup1" ] }
        {  "_id" : "rs2",  "host" : "rs2/ShardServer2:27018",  "state" : 1,  "tags" : [ "siteGroup2" ] }
  active mongoses:
        "3.4.9" : 2
 autosplit:
        Currently enabled: yes
  balancer:
        Currently enabled:  yes
        Currently running:  no
                Balancer lock taken at Thu Sep 21 2017 05:39:18 GMT+0200 (W. Europe Standard Time) by ConfigServer:Balancer
        Failed balancer rounds in last 5 attempts:  0
        Migration Results for the last 24 hours:
                195 : Failed with error 'aborted', from rs2 to rs1
  databases:
        {  "_id" : "DataCollector",  "primary" : "rs2",  "partitioned" : true }
                DataCollector.EMessageData
                        shard key: { "SiteId" : 1 }
                        unique: false
                        balancing: true
                        chunks:
                                rs2     5
                        { "SiteId" : { "$minKey" : 1 } } -->> { "SiteId" : 1 } on : rs2 Timestamp(1, 1)
                        { "SiteId" : 1 } -->> { "SiteId" : 10 } on : rs2 Timestamp(1, 2)
                        { "SiteId" : 10 } -->> { "SiteId" : 11 } on : rs2 Timestamp(1, 4)
                        { "SiteId" : 11 } -->> { "SiteId" : 20 } on : rs2 Timestamp(1, 5)
                        { "SiteId" : 20 } -->> { "SiteId" : { "$maxKey" : 1 } } on : rs2 Timestamp(1, 6)
                         tag: siteGroup1  { "SiteId" : 1 } -->> { "SiteId" : 10 }
                         tag: siteGroup2  { "SiteId" : 11 } -->> { "SiteId" : 20 }


When I move a chunk from a Shard Server to another and got the error message:
"cannot start recv'ing chunk, sharding is not enabled and no config server was provided"

Could you please help me to resolve this problem?

Thank you in advanced!

Updated: Config Server log says:

2017-09-22T03:48:32.803+0200 I SHARDING [Balancer] distributed lock 'DataCollector.EMessageData' acquired for 'Migrating chunk(s) in collection DataCollector.EMessageData', ts : 59c46aefbd78955b52702afc
2017-09-22T03:48:32.809+0200 W SHARDING [conn5] cannot start recv'ing chunk, sharding is not enabled and no config server was provided
2017-09-22T03:48:32.817+0200 I SHARDING [NetworkInterfaceASIO-ShardRegistry-0] distributed lock with ts: '59c46aefbd78955b52702afc' and _id: 'DataCollector.EMessageData' unlocked.
2017-09-22T03:48:32.820+0200 I SHARDING [Balancer] Balancer move DataCollector.EMessageData: [{ SiteId: 1.0 }, { SiteId: 10.0 }), from rs2, to rs1 failed :: caused by :: UnknownError: cannot start recv'ing chunk, sharding is not enabled and no config server was provided
2017-09-22T03:48:32.820+0200 I SHARDING [Balancer] about to log metadata event into actionlog: { _id: "ELVN-LAP02-2017-09-22T03:48:32.820+0200-59c46bf0bd78955b52702dcf", server: "ELVN-LAP02", clientAddr: "", time: new Date(1506044912820), what: "balancer.round", ns: "", details: { executionTimeMillis: 31, errorOccured: false, candidateChunks: 1, chunksMoved: 0 } }

Log file of nodes: https://github.com/jvanhien/mongodbcluster

0

Shutdown all mongod and mongos (those two) processes, your shards and that config server. When nothing is running, first start shardServers when those are up, start config server and last mongos. Connect to mongos with mongo.

I noticed that with your tags, you haven't define where $minkey --> 1, SiteId: 10 or SiteId:20 --> $maxKey goes. So those chunks can be anywhere.

When chunkMove happens, what config servers log says?

  • I did steps as you guided, and this problem still happen. and I updated question with config servers log says. – Lã Anh Tú Sep 22 '17 at 1:53
  • Have you checked that there are NO firewalls between nodes and config servers? Ports 27017, 27018, 27019 are open between all players in the cluster! – JJussi Sep 22 '17 at 3:59
  • I allowed all inbound and outbound connections for Domain, Private and Public Profiles for all nodes in this cluster. – Lã Anh Tú Sep 22 '17 at 4:56
  • Is there some other error messages in mongod/mongos log files (data nodes primary and config server primary node). – JJussi Sep 22 '17 at 7:14
  • I added log files for all nodes to github repository. Could you please see the update of Question. Many thanks! – Lã Anh Tú Sep 23 '17 at 4:09

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.