[SERVER-5240] mongos fails to connect to active cluster with config hosts down Created: 07/Mar/12  Updated: 15/Aug/12  Resolved: 08/Jun/12

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

Type: Bug Priority: Major - P3
Reporter: Greg Studer Assignee: Tad Marshall
Resolution: Cannot Reproduce Votes: 0
Labels: None
Remaining Estimate: Not Specified
Time Spent: Not Specified
Original Estimate: Not Specified

Issue Links:
Depends
Related
related to SERVER-2988 mongos fails to start initially when ... Closed
Operating System: ALL
Participants:

 Description   

This is different from SERVER-2988 - the cluster is active and correctly versioned, so there is no need to write to the config servers before using.



 Comments   
Comment by Tad Marshall [ 08/Jun/12 ]

I was unable to reproduce this, testing today's code (scons --64 --release) in Ubuntu 12.04 LTS Desktop.

1) Created empty directories db/config1, db/config2, db/config3, db/shard1, db/shard2.
2) Started config servers with:

./mongod --port 31001 --dbpath /home/tad/db/config1 --noprealloc --nohttpinterface
./mongod --port 31002 --dbpath /home/tad/db/config2 --noprealloc --nohttpinterface
./mongod --port 31003 --dbpath /home/tad/db/config3 --noprealloc --nohttpinterface

3) Started shard servers with:

./mongod --port 27017 --dbpath /home/tad/db/shard1 --nohttpinterface --noprealloc
./mongod --port 27018 --dbpath /home/tad/db/shard2 --nohttpinterface --noprealloc

4) Started mongos with:

./mongos --port 27019 --nohttpinterface --configdb "localhost:31001,localhost:31002,localhost:31003" --chunkSize 1

5) mongos worked as expected.
6) Tried stopping 1, 2 or 3 of the config servers, in different combinations, and then restarting mongos. mongos restarted in every case except when all three config servers were down. When any of the config servers were down, I was unable to shard a new collection, but after restarting the config servers I was able to shard a new collection.

With Greg looking on and making suggestions, I tried dropping the settings collection and restarting mongos. This did not prevent mongos from starting. I then shut down all 3 config servers and deleted the contents of their directories then restarted then. I was not able to start mongos until all three config servers were running (as expected) but was able to once all three were running again.

Everything I tried worked as designed.

Generated at Thu Feb 08 03:08:18 UTC 2024 using Jira 9.7.1#970001-sha1:2222b88b221c4928ef0de3161136cc90c8356a66.