How to fix Shard Version Errors?

460 views
Skip to first unread message

HARUN YARDIMCI

unread,
Oct 19, 2012, 4:35:37 AM10/19/12
to mongod...@googlegroups.com
I am getting following errors on a sharded cluster. What is the reason for this and what should I do to fix it? 


mongos> db.description.find()
error: {
        "$err" : "could not initialize cursor across all shards because : setShardVersion failed host: mng03.host.net:27018 { oldVersion: Timestamp 0|0, ns: \"product.description\", version: Timestamp 1000|2, globalVersion: Timestamp 3000|1, reloadConfig: true, errmsg: \"shard global version for collection is higher than trying to set to 'product.description'\", ok: 0.0 } @ set02/mng03.host.net:27018,mng04.host.net:27018",
        "code" : 14827
}

mongos> db.description.find()
error: {
        "$err" : "setShardVersion failed host: mng03.host.net:27018 { oldVersion: Timestamp 0|0, ns: \"product.description\", version: Timestamp 1000|2, globalVersion: Timestamp 3000|1, reloadConfig: true, errmsg: \"shard global version for collection is higher than trying to set to 'product.description'\", ok: 0.0 }",
        "code" : 10429
}



{  "_id" : "product",  "partitioned" : true,  "primary" : "set02" }
                product.description chunks:
                                set02   2
                        { "pId" : { $minKey : 1 }, "rm" : { $minKey : 1 } } -->> { "pId" : 32944369, "rm" : "2783" } on : set02 { "t" : 1000, "i" : 1 }
                        { "pId" : 32944369, "rm" : "2783" } -->> { "pId" : { $maxKey : 1 }, "rm" : { $maxKey : 1 } } on : set02 { "t" : 1000, "i" : 2 }
        {  "_id" : "amdin",  "partitioned" : false,  "primary" : "set01" }

Stephen Lee

unread,
Oct 19, 2012, 10:06:05 AM10/19/12
to mongod...@googlegroups.com
To fix, you can try restarting the mongos or doing a 

> use admin
> db.runCommand({ flushRouterConfig : 1 })

at the console.

What version of MongoDB is this?  Can you provide some of the mongos logs when you run db.description.find()?

HARUN YARDIMCI

unread,
Oct 30, 2012, 3:20:47 AM10/30/12
to mongod...@googlegroups.com
Version 2.0.6

I already tried flushRouterConfig:1 at each mongos but i didn't solve my problem. I restarted some mongos then it worked properly. 

I don't have the log at the moment. I will send it if it happens again. 

thanks.  
Reply all
Reply to author
Forward
0 new messages