[SERVER-909] multiple mongos start race condition (WAS: mongos start failed) Created: 13/Jan/10  Updated: 12/Jul/16  Resolved: 08/Feb/10

Status: Closed
Project: Core Server
Component/s: None
Affects Version/s: None
Fix Version/s: 1.3.5

Type: Question Priority: Major - P3
Reporter: sunquanjun Assignee: Eliot Horowitz (Inactive)
Resolution: Done Votes: 0
Labels: None
Remaining Estimate: Not Specified
Time Spent: Not Specified
Original Estimate: Not Specified
Environment:

CentOS release 5.2 (Final)


Participants:

 Description   

config:
1.sharding:(master-master), 3 group instance
2.config servier:(master-master), 1 group instance
3.route: 2 instance

note:
after installed:
1.start sharding: success
2.start config server:success
3.start mongos: 1 success, 1 failed
failed info:
/usr/home/quanjun/soft/mongo-1.2.1/mongos --port 23001 --configdb mongodb.store.sina.com.cn:21001 > /data1/mongdb/route1/log&
called after throwing an instance of 'mongo::UserException'
what(): should only have 1 thing in config.version

next day:
1.start route: 2 failed:

failed info:

called after throwing an instance of 'mongo::UserException'
what(): should only have 1 thing in config.version



 Comments   
Comment by auto [ 08/Feb/10 ]

Author:

{'login': 'erh', 'name': 'Eliot Horowitz', 'email': 'eliot@10gen.com'}

Message: fix race condition when starting multiple mongos SHARDING-69
http://github.com/mongodb/mongo/commit/2c1274202f16673b452903bee15fc9736442f2df

Comment by sunquanjun [ 13/Jan/10 ]

ps ax|grep mongo|awk '

{print "kill -9 "$1}

'|sh
rm -Rf /data1/mongdb/

mkdir -p /data1/mongdb/sharding1-20011/
mkdir -p /data1/mongdb/sharding1-20012/
mkdir -p /data1/mongdb/sharding2-20021/
mkdir -p /data1/mongdb/sharding2-20022/
mkdir -p /data1/mongdb/sharding3-20031/
mkdir -p /data1/mongdb/sharding3-20032/

mkdir -p /data1/mongdb/configure1/
mkdir -p /data1/mongdb/configure2/

mkdir -p /data1/mongdb/route1/
mkdir -p /data1/mongdb/route2/

#start sharding:
/usr/home/quanjun/soft/mongo-1.2.1/mongod --diaglog 7 --shardsvr --master --slave --smallfiles --noauth --nohttpinterface --source mongodb.store.sina.com.cn:20012 --dbpath=/data1/mongdb/sharding1-20011/ --logpath=/data1/mongdb/sharding1-20011/log --port=20011 --bind_ip=10.210.141.204&
/usr/home/quanjun/soft/mongo-1.2.1/mongod --diaglog 7 --shardsvr --master --slave --smallfiles --noauth --nohttpinterface --source mongodb.store.sina.com.cn:20011 --dbpath=/data1/mongdb/sharding1-20012/ --logpath=/data1/mongdb/sharding1-20012/log --port=20012 --bind_ip=10.210.141.204&

/usr/home/quanjun/soft/mongo-1.2.1/mongod --diaglog 7 --shardsvr --master --slave --smallfiles --noauth --nohttpinterface --source mongodb.store.sina.com.cn:20022 --dbpath=/data1/mongdb/sharding2-20021/ --logpath=/data1/mongdb/sharding2-20021/log --port=20021 --bind_ip=10.210.141.204&
/usr/home/quanjun/soft/mongo-1.2.1/mongod --diaglog 7 --shardsvr --master --slave --smallfiles --noauth --nohttpinterface --source mongodb.store.sina.com.cn:20021 --dbpath=/data1/mongdb/sharding2-20022/ --logpath=/data1/mongdb/sharding2-20022/log --port=20022 --bind_ip=10.210.141.204&

/usr/home/quanjun/soft/mongo-1.2.1/mongod --diaglog 7 --shardsvr --master --slave --smallfiles --noauth --nohttpinterface --source mongodb.store.sina.com.cn:20032 --dbpath=/data1/mongdb/sharding3-20031/ --logpath=/data1/mongdb/sharding3-20031/log --port=20031 --bind_ip=10.210.141.204&
/usr/home/quanjun/soft/mongo-1.2.1/mongod --diaglog 7 --shardsvr --master --slave --smallfiles --noauth --nohttpinterface --source mongodb.store.sina.com.cn:20031 --dbpath=/data1/mongdb/sharding3-20032/ --logpath=/data1/mongdb/sharding3-20032/log --port=20032 --bind_ip=10.210.141.204&

#start configure:
/usr/home/quanjun/soft/mongo-1.2.1/mongod --diaglog 7 --configsvr --master --slave --smallfiles --noauth --nohttpinterface --source mongodb.store.sina.com.cn:21002 --dbpath=/data1/mongdb/configure1/ --logpath=/data1/mongdb/configure1/log --port=21001 --bind_ip=10.210.141.204&
/usr/home/quanjun/soft/mongo-1.2.1/mongod --diaglog 7 --configsvr --master --slave --smallfiles --noauth --nohttpinterface --source mongodb.store.sina.com.cn:21001 --dbpath=/data1/mongdb/configure2/ --logpath=/data1/mongdb/configure2/log --port=21002 --bind_ip=10.210.141.204&

sleep 900
#start route:
/usr/home/quanjun/soft/mongo-1.2.1/mongos --port 23001 --configdb mongodb.store.sina.com.cn:21001 >/data1/mongdb/route1/log &
/usr/home/quanjun/soft/mongo-1.2.1/mongos --port 23002 --configdb mongodb.store.sina.com.cn:21002 >/data1/mongdb/route2/log &

Generated at Thu Feb 08 02:55:30 UTC 2024 using Jira 9.7.1#970001-sha1:2222b88b221c4928ef0de3161136cc90c8356a66.