-
Type:
Bug
-
Resolution: Done
-
Priority:
Major - P3
-
None
-
Affects Version/s: 2.2.0
-
Component/s: None
-
None
-
ALL
-
None
-
3
-
None
-
None
-
None
-
None
-
None
-
None
https://groups.google.com/forum/?fromgroups=#!topic/mongodb-user/iKEK4ZISvSc
These days, i need to scale out my single node mongodb service into a
mongodb cluster.
I use 2 machines to set up a mongodb cluster, it includes 2 shards(mongod
process), 1 config process and 1 mongs process. The details are as the
follow:
step1. start config process
bin/mongod --bind_ip 10.163.138.87 --configsvr --fork --dbpath
/data/mongodb/config --logpath /data/mongodb/log/config.log --logappend --port
20000
step2. start shard services
bin/mongod --bind_ip 10.163.138.87 --fork --shardsvr --port 10000 --dbpath
/data/mongodb/data --logpath /data/mongodb/log/mongod.log --logappend
bin/mongod --bind_ip 10.163.138.88 --fork --shardsvr --port 10000 --dbpath
/data/mongodb/data --logpath /data/mongodb/log/mongod.log --logappend
step3. start mongos service
bin/mongos --bind_ip 10.163.138.87 --port 30000 --fork --configdb
10.163.138.87:20000 --logpath /data/mongodb/log/mongos.log --logappend
step4. log on the mongos and config shards
bin/mongo 10.163.138.87:30000
mongos> use admin
mongos> db.runCommand(
)
mongos> db.runCommand(
{addshard:"10.163.138.88:10000"})
mongos> db.runCommand(
{ "enablesharding" : "query"})
mongos> db.runCommand({ "shardcollection" : "query.DailyPcQueryStats",
"key" :{ "d":1, "qpc":1, "ua" : 1}})
step5: use mongoimport to insert data into the collection "
query.DailyPcQueryStats".
But...
The problem ocurrs. when I inserting into collections, the mongd process
turn into a state of 'uninterruptable sleep', and can not recover. Other
processes accessing the same disk also get into the same state, and I can't
even reboot the system with commands. The ONLY thing I can do is to press
the reboot button.
And i test the 2 machines as stand-alone mongodb service. And i almost
import over 300 million data, it's ok.
I wonder why the mongodb cluster perform like this? Where is the problem?
And i test like this: I start all mongodb cluster processes on 1 machine(
10.163.138.88), include 2 shards, 1 config, 1 mongos. And I insert data
into it, it is ok!!! Too strangeļ¼
Single node is ok, multi node has problem?