Account Options

  1. Sign in
The old Google Groups will be going away soon, but your browser is incompatible with the new version.
Google Groups Home
« Groups Home
Message from discussion mongo failover

Received: by 10.58.187.168 with SMTP id ft8mr1081700vec.7.1346954702647;
        Thu, 06 Sep 2012 11:05:02 -0700 (PDT)
X-BeenThere: mongodb-user@googlegroups.com
Received: by 10.220.147.138 with SMTP id l10ls1067821vcv.7.gmail; Thu, 06 Sep
 2012 11:04:53 -0700 (PDT)
MIME-Version: 1.0
Received: by 10.52.180.202 with SMTP id dq10mr558104vdc.17.1346954693425; Thu,
 06 Sep 2012 11:04:53 -0700 (PDT)
Authentication-Results: ls.google.com; spf=pass (google.com: domain of
 tetl...@gmail.com designates internal as permitted sender)
 smtp.mail=tetl...@gmail.com; dkim=pass
 header...@gmail.com
Received: by o19g2000vbo.googlegroups.com with HTTP; Thu, 6 Sep 2012 11:04:53
 -0700 (PDT)
Date: Thu, 6 Sep 2012 11:04:53 -0700 (PDT)
In-Reply-To: <ded6461d-ff85-41bf-a17d-f02c43d20494@e29g2000vbm.googlegroups.com>
References: <dd2aee93-5e3f-4a82-a527-f4c7d11bb2ae@c9g2000vbv.googlegroups.com>
 <48a93c5e-d1ae-4401-b04e-908aaac9f3e4@googlegroups.com> <a2763b5b-333f-4334-802c-1fe1cc9d877d@v22g2000vbu.googlegroups.com>
 <54de1e32-aec9-45ce-b298-af5be91fc1b5@c4g2000vbe.googlegroups.com>
 <0f68dc8e-4b03-45ba-982e-13688460a400@googlegroups.com> <ec858b77-21c7-4919-9209-9297437159f9@z4g2000vby.googlegroups.com>
 <303eff4c-ec23-4e86-bcee-de29deee24be@c19g2000vbb.googlegroups.com> <ded6461d-ff85-41bf-a17d-f02c43d20494@e29g2000vbm.googlegroups.com>
User-Agent: G2/1.0
X-HTTP-UserAgent: Mozilla/5.0 (Windows NT 6.1) AppleWebKit/537.1 (KHTML, like
 Gecko) Chrome/21.0.1180.89 Safari/537.1,gzip(gfe)
Message-ID: <8ce5f052-74a5-4652-aaab-b9bcc4938a89@o19g2000vbo.googlegroups.com>
Subject: Re: mongo failover
From: tetlika <tetl...@gmail.com>
To: mongodb-user <mongodb-user@googlegroups.com>
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: quoted-printable

a little wrong info

['master'][0]  is an array of slave and master hosts defined in
config, like:

QUEUE_HOST =3D replaqueue.internal.com, replbqueue.internal.com

and ['master'][1] is a port

On 6 =D0=92=D0=B5=D1=80, 20:55, tetlika <tetl...@gmail.com> wrote:
> sorry, previous was a bit wrongly formatted
>
> =D1=81onnection=3Dmongokit.connection.Connection(settings.MONGODB[db_id]
> ['master'][0],settings.MONGODB[db_id]['master'][1])
>
> while =C2=A0['master'][0] are =C2=A0['master'][1] defined in config as sl=
ave and
> master hosts of replica
>
> On 6 =D0=92=D0=B5=D1=80, 20:51, tetlika <tetl...@gmail.com> wrote:
>
>
>
>
>
>
>
> > =C2=A0 connection =3D mongokit.connection.Connection(settings.MONGODB[d=
b_id]
> > ['master'][0],
> > =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =
=C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=
=A0 =C2=A0 =C2=A0 =C2=A0 settings.MONGODB[db_id]
> > ['master'][1])
>
> > On 6 =D0=92=D0=B5=D1=80, 20:49, tetlika <tetl...@gmail.com> wrote:
>
> > > centOS 5.6 x64 everywhere
> > > python 2.7.3
>
> > > wait a bit - I will provide the code , I hope
>
> > > On 6 =D0=92=D0=B5=D1=80, 20:42, "A. Jesse Jiryu Davis" <je...@10gen.c=
om> wrote:
>
> > > > What operating system are you using on the client (where Python run=
s) and
> > > > on the MongoDB servers? What Python version? Can you provide the ex=
act code
> > > > you use to create the PyMongo ReplicaSetConnection? I need to see p=
recisely
> > > > what options you pass to ReplicaSetConnection.
>
> > > > Thanks.
>
> > > > On Wednesday, September 5, 2012 12:14:33 PM UTC-4, tetlika wrote:
>
> > > > > can anyone help me on that?
>
> > > > > On 5 =D0=92=D0=B5=D1=80, 18:08, tetlika <tetl...@gmail.com> wrote=
:
> > > > > > in second scenario of course the fail over is not happening
> > > > > > immediately, - it takes 10-15 seconds or so
>
> > > > > > but in scenario 1 - the fail over is not happening at least for=
 30-40
> > > > > > minutes
>
> > > > > > On 5 =D0=92=D0=B5=D1=80, 18:05, Stephan <sboeseb...@googlemail.=
com> wrote:
>
> > > > > > > Actually, in Java I always see the first behavior, no matter =
if host
> > > > > is
> > > > > > > really down, or only the mongod.
> > > > > > > If there is a write access during the fail-over time (a coupl=
e of
> > > > > seconds),
> > > > > > > there is an error "can't find master". After that, it works h=
ere...
>
> > > > > > > Strange, that you see a different behavior...
>
> > > > > > > Am Mittwoch, 5. September 2012 15:13:06 UTC+2 schrieb tetlika=
:
>
> > > > > > > > we use pymongo 2.1.1, I've noticed such behavior in replica=
 set (can
> > > > > > > > be easy reproduced):
>
> > > > > > > > scenario 1:
>
> > > > > > > > 1) master host is shutted down by "shutdown -r now" command=
, or
> > > > > > > > hardware failure
> > > > > > > > 2) slave becomes master
> > > > > > > > 3) application fails saying it cant establish connection to=
 the db
> > > > > > > > 4) when the host with master's IP appears on the network an=
d is
> > > > > > > > pingable (even without mongod on it), things become ok
>
> > > > > > > > scenario 2:
>
> > > > > > > > 1) just mongod is shutted down on master host
> > > > > > > > 2) slave becomes master
> > > > > > > > 3) application handles failover and things are fine
>
> > > > > > > > is that normal behavior?