rpl_mirror_binlog_enabled configuration

39 views
Skip to first unread message

vimal

unread,
Aug 11, 2008, 1:38:13 PM8/11/08
to google-mysql-tools
Hello.

I am working with the MySQL 5.0.37-patch and try to configure the
mirror binlogs, but i can`t

At the my.cnf this is my parameters:

# Replication Master Server (default)
# binary logging is required for replication

server-id=1
log-bin = /DATABASE/mysql/data/mtest01lnx-bin-log
log-slave-updates
log-bin-index = /DATABASE/mysql/data/mtest01lnx-bin-log.index
relay-log=/DATABASE/mysql/data/mtest01lnx-relay
relay-log-info-file = /DATABASE/mysql/data/mtest01lnx-relay
relay-log-index = /DATABASE/mysql/data/mtest01lnx-relay.index
auto_increment_increment=10
auto_increment_offset=1
master-host = 10.90.40.61
master-user = repl
master-password = xxxxx

# Opciones de los patches de google
rpl_semi_sync_enabled = 1
rpl_semi_sync_slave_enabled = 1
rpl_mirror_binlog_enabled = 1
#rpl_mirror_binlog_no_replicate
sync-mirror-binlog = 1
sync-binlog = 1


server-id=2
log-bin = /DATABASE/mysql/data/mtest02lnx-bin-log
log-slave-updates
log-bin-index = /DATABASE/mysql/data/mtest02lnx-bin-log.index
relay-log=/DATABASE/mysql/data/mtest02lnx-relay
relay-log-info-file = /DATABASE/mysql/data/mtest02lnx-relay
relay-log-index = /DATABASE/mysql/data/mtest02lnx-relay.index
auto_increment_increment=10
auto_increment_offset=2
master-host = 10.90.40.60
master-user = repl
master-password = xxxxx

# Opciones de los patches de google
rpl_semi_sync_enabled = 1
rpl_semi_sync_slave_enabled = 1
rpl_mirror_binlog_enabled = 1
#rpl_mirror_binlog_no_replicate
sync-mirror-binlog = 1
sync-binlog = 1


But when the replication process begin, at the error.log i can see:

080811 19:00:29 [Note] Start semi-sync binlog_dump to slave_server(2),
pos(mtest01lnx-bin-log.000001, 98)
080811 19:00:29 [ERROR] Re-serving an already served binlog file.
080811 19:00:29 [ERROR] End binlog_dump in error: 2

and at the second server:

080811 19:00:29 [Note] Slave I/O thread: Failed reading log event,
reconnecting to retry, log 'mtest01lnx-bin-log.000001' position 98
080811 19:00:29 [Note] Slave: connected to master
're...@10.90.40.60:3306',replication resumed in log 'mtest01lnx-bin-log.
000001' at position 98
080811 19:00:30 [ERROR] Error reading packet from server: Error on
close of 'UNOPENED' (Errcode: 9) ( server_errno=4)


Can anyone say my if the config is correct ?

Regards

MARK CALLAGHAN

unread,
Aug 11, 2008, 1:48:32 PM8/11/08
to google-my...@googlegroups.com
We don't use mirror binlogs anymore, so I am not an expert in
debugging this and the feature has been removed for the next Google
patch that we will soon publish. Can you provide the output from:
SHOW MASTER STATUS -- run on the master
SHOW SLAVE STATUS -- run on the slave
the binlog index file from the master
master.info, relay-log.info from the slave

From looking at source code, it looks like that error occurs when the
same log file name is listed twice in the binlog index file on the
master.

--
Mark Callaghan
mdca...@gmail.com

vimal

unread,
Aug 12, 2008, 5:47:27 AM8/12/08
to google-mysql-tools
We would like to use the mirror binlogs to make possible the failover
of the slaves at one master-master enviroment, but i think that this
is not well implemented at the google patch.

When i show the status at the master i see that:

mysql> show master status;
+---------------------------+----------+--------------
+------------------+
| File | Position | Binlog_Do_DB |
Binlog_Ignore_DB |
+---------------------------+----------+--------------
+------------------+
| mtest01lnx-bin-log.000002 | 98 |
| |
+---------------------------+----------+--------------
+------------------+

and at the slave:

mysql> show master status;
+---------------------------+----------+--------------
+------------------+
| File | Position | Binlog_Do_DB |
Binlog_Ignore_DB |
+---------------------------+----------+--------------
+------------------+
| mtest01lnx-bin-log.000002 | 192 |
| |
+---------------------------+----------+--------------
+------------------+
1 row in set (0,00 sec)


Like you can see, both use the same binlog, but with diferent
position.

I think that the problem is the index of the binlog because don`t use
that full path for the mirrored binlog and the it can`t find it:

mtest02lnx:/DATABASE/mysql/data# cat mtest02lnx-bin-log.index
/DATABASE/mysql/data/mtest02lnx-bin-log.000001
./mtest01lnx-bin-log.000001
/DATABASE/mysql/data/mtest02lnx-bin-log.000002
/DATABASE/mysql/data/mtest02lnx-bin-log.000003
./mtest01lnx-bin-log.000002

080812 11:36:46 [Note] Start semi-sync binlog_dump to slave_server(1),
pos(mtest02lnx-bin-log.000001, 98)
080812 11:36:46 [ERROR] Could not find first log file name in binary
log index file
080812 11:36:46 [ERROR] End binlog_dump in error: 1

Regards
> > 'r...@10.90.40.60:3306',replication resumed in log 'mtest01lnx-bin-log.
> > 000001' at position 98
> > 080811 19:00:30 [ERROR] Error reading packet from server: Error on
> > close of 'UNOPENED' (Errcode: 9) ( server_errno=4)
>
> > Can anyone say my if the config is correct ?
>
> > Regards
>
> --
> Mark Callaghan
> mdcal...@gmail.com

MARK CALLAGHAN

unread,
Aug 12, 2008, 8:44:36 AM8/12/08
to google-my...@googlegroups.com
I am reasonably certain that it won't work with master-master.

We use master-slave with many slaves. master-master is great when you
are limited to 2 servers. If you want many slaves and don't want them
in a chain (master-master-master-master-...), then it is not so good.

--
Mark Callaghan
mdca...@gmail.com

Reply all
Reply to author
Forward
0 new messages