samedi 28 février 2015

Failing to ensureIndex on sharded Mongo


I run a mongoDb, sharding it on 4 different shards (+ 1 router and + 1 config). Sometime ago I had to replace a shard, and everything went ok. But now, every time I run:



db.summoners.ensureIndex( { plus: 1 } )


I get this error:



{
"raw" : {
"10.132.156.211:27017" : {
"numIndexesBefore" : 3,
"note" : "all indexes already exist",
"ok" : 1
},
"10.132.156.218:27017" : {

},
"10.132.145.51:27017" : {
"numIndexesBefore" : 3,
"note" : "all indexes already exist",
"ok" : 1
},
"10.132.157.195:27017" : {
"numIndexesBefore" : 3,
"note" : "all indexes already exist",
"ok" : 1
},
"10.132.137.214:27017" : {
"numIndexesBefore" : 3,
"note" : "all indexes already exist",
"ok" : 1
}
},
"ok" : 0,
"errmsg" : "{ 10.132.156.218:27017: \"result without error message returned : {}\" }"
}


The problem is that the given shard, 10.132.156.218:27017, does not exists anymore.

It's not even listed on the shard list!



{ "_id" : "shard0000", "host" : "10.132.156.211:27017" }
{ "_id" : "shard0002", "host" : "10.132.145.51:27017" }
{ "_id" : "shard0003", "host" : "10.132.157.195:27017" }
{ "_id" : "shard0004", "host" : "10.132.137.214:27017" }


What should I do?


PS:: MongoDB shell version: 2.6.5


--



mongos> db.summoners.stats()
{
"sharded" : true,
"systemFlags" : 1,
"userFlags" : 1,
"code" : 11002,
"ok" : 0,
"errmsg" : "exception: socket exception [CONNECT_ERROR] for 10.132.156.218:27017"
}




Aucun commentaire:

Enregistrer un commentaire