List:General Discussion« Previous MessageNext Message »
From:Mikael Fridh Date:January 24 2004 4:55pm
Subject:Re: Replication Madness
View as plain text  
On Saturday 24 January 2004 02.07, DePhillips, Michael P wrote:
> Thanks for the reply.
>
> I agree with your first solution but I feel this is very limiting.  I would
> like be able to connect with a dns name with assurance that it will
> succeed. I think this is a reasonable feature to request.  I have, for
> example, a DNS Round Robin used for load sharing.  It is essencial here
> that the DNS name authenticates.

So your slaves connect to f.e. HA.domain.com
which has two A records: 111.111.11.1, 111.111.1.2 ?
That's fine.

> For clarity below is the error message I receive when the system goes down.
> The connections were made perfectely well with dns prior to the mysterious
> switch - I guess the question remains why is it switching?

You mean your slave loses connection to the master and reconnects often?
Once the slave is connected to the master it could go on forever* on that 
established connection unless there are network problems.

When the slave reconnects, sometimes the master fails to find the PTR for the 
slave's IP address... I can't tell you exactly why. It just isn't fool-proof. 
http://www.mysql.com/doc/en/DNS.html

> 040119 12:01:16  Slave I/O thread: error reconnecting to master
> 'fc_mirror2@stripped:3336': Error: 'Host '111.111.11.11' is not
> allowed to connect to this MySQL server'  errno: 1130  retry-time: 60
> retries: 86400

Grant replication slave ON *.* TO 'fc_mirror2'@'111.111.11.11'; and the 
problem should be gone.

/Mikael.


>
> -----Original Message-----
> From: Mikael Fridh
> To: DePhillips, Michael P; mysql@stripped
> Sent: 1/23/2004 6:50 PM
> Subject: Re: Replication Madness
>
> I'm not sure I quite follow you here.
>
> I think you mean that when the slave connects to the master, sometimes
> the
> master does not resolve the address the slave has - thus failing because
> you
> don't have grants for the slave's IP address..
>
> Generally I think it's a bad idea to be dependent on a dns lookup, the
> grant
> should be for the proper Ip adress(es) instead.
> A name server look up always have the risk of failing (unless it's set
> to
> retry endlessly)
>
> You could try a worse solution - put the slave's IP address in the HOSTS
> file on the master. That way (IF the OS reads the host file before it
> queries a name server) it will always identify the slave's hostname.
> But like I said, that's the bad solution I think...
>
> Mikael
>
> ----- Original Message -----
> From: "DePhillips, Michael P" <dephilli@stripped>
> To: <mysql@stripped>
> Sent: Friday, January 23, 2004 11:00 PM
> Subject: Replication Madness
>
> > Hi Folks
> >
> >
> >
> > Every now and again one of my slaves try's to connect to its master
>
> via
> its
>
> > ip address as opposed to its dns name.  This causes a problem because
>
> the
> ip
>
> > address does not have credentials on the master, therefore, connection
> > refused ->replication ends ->databases out of sync-> angry users->
> we
>
> all
>
> > know the rest.  The switch is random both temporally and machine wise.
>
> Are
>
> > there any ideas on why this is happening or what needs to be done to
>
> prevent
>
> > it?
> >
> >
> >
> > Perhaps this is a bug and should be reported as such?
> >
> >
> >
> > Thanks
> >
> > Michael


Thread
Replication MadnessMichael P DePhillips23 Jan
  • Re: Replication MadnessMikael Fridh24 Jan
RE: Replication MadnessMichael P DePhillips24 Jan
  • Re: Replication MadnessMikael Fridh24 Jan