Quantcast
Channel: MySQL Forums - Replication
Viewing all articles
Browse latest Browse all 1562

Master<>Master replication stops after connection loss (no replies)

$
0
0
Hello all,

i have some problems setting up a master-master replication with 2 MySQL servers.
I have included several files, they will me mentioned in the report by [filename].
You can get those files here: http://1vg.de/MasterMaster_Fail.zip

Ok, here is the setup:

2 virtual PC's with Windows XP, MySQL 5.1.41 community.
Linked together over a private virtual Network.
Server 1: 10.8.0.2/8
Server 2: 10.8.0.1/8
(Yes, the IP adresses are correct! Kinda fixed mistake while installing...)

Server 1 config: [Server_1_config.ini.txt]
Server 2 config: [Server_2_config.ini.txt]

They have to run as master-master, because in the real world (different IP's, real servers) we have one big database
and two buildings with no ethernet connection between. (>500m distance)
The replication runs through a vpn tunnel over a normal dsl internet connection.


Ok, as i said, there is one database with several tables. i picked one of these to test the replication.
See
[Server_1_TableUser_working.txt]
and
[Server_2_TableUser_working.txt]
for both tables on the servers.

At this point, the replication is in place and works. Changing values on server1 is replicated to server2 and vice versa.
See [Server_1_working.txt] and [Server_2_working.txt] for the master and slave status output on both servers.

Now, i disconnected server2 from the network, by pulling its virtual network cable.
A few seconds later, the replication process on server 2 is aware of the connection loss, but not on server 1
See [Server_1_disconnected.txt] and [Server_2_disconnected.txt]

Keep the "Slave: Read_Master_Log_Pos" and "Master: Position" values in mind for both servers, they match each other:
S1 Master : Position: 31593
S2 Slave : Read_Master_Log_Pos: 31593

S2 Master : Position: 53160
S1 Slave : Read_Master_Log_Pos: 53160


Now, i changed values on both servers.
See [Server_1_TableUser_disconnected.txt] and [Server_2_TableUser_disconnected.txt] for the altered tables.

As mentioned, the setup is master master.
Therefore, after reconnecting server 2, both Servers should start catching up each others binlog,
should they? Yes they should. But they don't!

See
[Server_1_TableUser_reconnected.txt]
and
[Server_2_TableUser_reconnected.txt]

So the question is, why?
Server 2 successfully reads all data from server 1, but server 1 isn't catching up with server 2:
[Server_1_reconnected.txt]
[Server_2_reconnected.txt]

Again, let's look at the Position pointers:
S1 Master : Position: 33931
S2 Slave : Read_Master_Log_Pos: 33931

S2 Master : Position: 55498
S1 Slave : Read_Master_Log_Pos: 53160

Next problem: Replication is NOT working in this state, values are transmitted from server1 to server2, but if you change values on server2, they never reach server1.
However, they're not lost, after invoking "stop slave" then "start slave" on server1, the tables are up to date and replication works too.


---

Ok, thats it. Does anyone know how to fix those issues?
Am i missing some config values in my config files?

I found a bug report from 2008 without any replies or comments:
http://bugs.mysql.com/bug.php?id=34568
Seems that he has(had?) a similar problem

Also, there is a forum post which explains roughly the same issue:
http://forums.mysql.com/read.php?26,392582,392582#msg-392582


Kindly regards,
Stefan

Viewing all articles
Browse latest Browse all 1562

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>