mongos: config servers order matter?

102 views
Skip to first unread message

V

unread,
Mar 30, 2012, 8:26:47 PM3/30/12
to mongod...@googlegroups.com
Hello

We are using 3 config servers in sharding cluster: config1, config2, config3
mongos running on application side connecting to configs with --configdb config1:27123,config2:27123,config3:27123
all instances runing mongo v.2.0.3 

the system was running fine but suddenly mongos started erroring with

[root@mongos-server ~]# mongo localhost:27123/db -uuname -ppassword 
connecting to: localhost:27123/db
Fri Mar 30 23:16:45 uncaught exception: login failed
exception: login failed
[root@mongos-server ~]#  

i run dbhash over all 3 configs to check if they are synced. hashes were the same for all configs.
i tried to restart mongos. configs. one more recheck... sync was ok, but error still there.
then i changed configs order in mongos --configdb config2:27123,config1:27123,config3:27123
and was able to connect successfully

so the question is - do config servers order matter on mongos? or it's some kind of bug?

thanks
v

Scott Hernandez

unread,
Mar 31, 2012, 3:25:33 AM3/31/12
to mongod...@googlegroups.com
The order matters, and you must us the same string basically.

> --
> You received this message because you are subscribed to the Google Groups
> "mongodb-user" group.
> To view this discussion on the web visit
> https://groups.google.com/d/msg/mongodb-user/-/jXplu65d3jwJ.
> To post to this group, send email to mongod...@googlegroups.com.
> To unsubscribe from this group, send email to
> mongodb-user...@googlegroups.com.
> For more options, visit this group at
> http://groups.google.com/group/mongodb-user?hl=en.

V

unread,
Mar 31, 2012, 10:20:39 AM3/31/12
to mongod...@googlegroups.com
hi Scott

where the most actual order of configs can be found which mongos should using?
i changed configs order to fix above problem. but first ordering (1,2,3) working good for few weeks. which is strange because servers were synced ok.

 --configdb config1:27123,config2:27123,config3:27123 
 --configdb config2:27123,config1:27123,config3:27123 

thanks
v

Субота, 31 березня 2012 р., 10:25:33 UTC+3 користувач Scott Hernandez написав:

Scott Hernandez

unread,
Mar 31, 2012, 12:25:42 PM3/31/12
to mongod...@googlegroups.com
You need to use the same order everywhere. That is how the order is
important; there is not any predefined order you must use.

2012/3/31 V <shum...@gmail.com>:

>> > mongodb-user...@googlegroups.com.


>> > For more options, visit this group at
>> > http://groups.google.com/group/mongodb-user?hl=en.
>

> --
> You received this message because you are subscribed to the Google Groups
> "mongodb-user" group.
> To view this discussion on the web visit

> https://groups.google.com/d/msg/mongodb-user/-/QtJn6VTW-1cJ.


>
> To post to this group, send email to mongod...@googlegroups.com.
> To unsubscribe from this group, send email to

> mongodb-user...@googlegroups.com.

Vasyl Shumskyi

unread,
May 25, 2013, 5:15:17 AM5/25/13
to mongod...@googlegroups.com
You should just replace DNS / local mongoses resolvers of C1 - that's the easiest approach

Thanks,
Vasyl


2013/5/25 Tung Nguyen <tu...@misfitwearables.com>
Hi Scott,


Thanks for the answers


Could you please take a look at this case:

* Let's say, we have 3 config servers: C1, C2, C3
* 3 mongos servers: M1, M2, M3. Each mongos server has the same order of config servers as C1 -> C2 -> C3
* One day C1 (or whichever config server) goes down. We replace it by C4. So now we have: C4, C2, C3

Question #1: Do the 3 mongos servers (with their old order of config server C1 -> C2 -> C3) still work?
Question #2: Are the 3 mongos servers able to be updated their list from C1 -> C2 -> C3 to C4 -> C2 -> C3? That will happen automatically or we have to do it manually?
Question #3: If we add a new mongos server, let's call M4, with new order of config servers (C4 -> C2 -> C3), is there any problem with the whole cluster?


Thank you in advance :)
--
--
You received this message because you are subscribed to the Google
Groups "mongodb-user" group.
To post to this group, send email to mongod...@googlegroups.com
To unsubscribe from this group, send email to
mongodb-user...@googlegroups.com
See also the IRC channel -- freenode.net#mongodb
 
---
You received this message because you are subscribed to a topic in the Google Groups "mongodb-user" group.
To unsubscribe from this topic, visit https://groups.google.com/d/topic/mongodb-user/QQuQBGBtNkg/unsubscribe?hl=en.
To unsubscribe from this group and all its topics, send an email to mongodb-user...@googlegroups.com.
For more options, visit https://groups.google.com/groups/opt_out.
 
 

Reply all
Reply to author
Forward
0 new messages