MySQL Forums
Forum List  »  MySQL Workbench

"mysqlrpladmin start" fails to start slave SQL thread
Posted by: Thornton Roby
Date: February 08, 2013 05:34PM

I'm testing replication on a fresh installation of MySQL 5.6GA and MySQL Utilities 1.2.0. After successfully configuring a master and 2 slaves I tried stopping and starting the slaves from the master using "mysqlrpladmin start". The I/O thread starts up OK but the SQL thread does not. Executing "start slave" on the slave directly succeeds. There is no other activity on the servers during this procedure. Here is a synopsis of the commands and the error noted in the mysql.log on the slave:

Start slave on slave:
2013-02-08 16:04:03 11525 [Note] Slave SQL thread initialized, starting replication in log
'MASTER-bin.000003' at position 1272,
relay log './SLAVE-relay-bin.000004' position: 363

Check from master:
mysqlrpladmin --master=user:pass@localhost --slaves=user:pass@'SLAVE' health
# Checking privileges.
#
# Replication Topology Health:
+-----------------------------+-------+---------+--------+------------+------------------------------------------+
| host | port | role | state | gtid_mode | health |
+-----------------------------+-------+---------+--------+------------+------------------------------------------+
| localhost | 3306 | MASTER | UP | ON | OK |
| SLAVE | 3306 | SLAVE | UP | ON | Slave has 1 transactions behind master. |
+-----------------------------+-------+---------+--------+------------+------------------------------------------+
# ...done.

Stop slave from master:
mysqlrpladmin --master=user:pass@localhost --slaves=user:pass@'SLAVE' stop
# Checking privileges.
# Performing STOP on all slaves.
# Executing stop on slave SLAVE:3306 Ok
# ...done.
# mysqlrpladmin --master=user:pass@localhost --slaves=user:pass@'SLAVE' health
# Checking privileges.
#
# Replication Topology Health:
+-----------------------------+-------+---------+--------+------------+-------------------------------------------------------------------------------------------------+
| host | port | role | state | gtid_mode | health |
+-----------------------------+-------+---------+--------+------------+-------------------------------------------------------------------------------------------------+
| localhost | 3306 | MASTER | UP | ON | OK |
| SLAVE | 3306 | SLAVE | UP | ON | IO thread is not running., SQL thread is not running., Slave has 1 transactions behind master. |
+-----------------------------+-------+---------+--------+------------+-------------------------------------------------------------------------------------------------+
# ...done.

Start slave from master:
mysqlrpladmin --master=user:pass@localhost --slaves=user:pass@'SLAVE' start
# Checking privileges.
# Performing START on all slaves.
# Executing start on slave SLAVE:3306 Ok
# ...done.
# mysqlrpladmin --master=user:pass@localhost --slaves=user:pass@'SLAVE' health
# Checking privileges.
#
# Replication Topology Health:
+-----------------------------+-------+---------+--------+------------+----------------------------------------------------------------------+
| host | port | role | state | gtid_mode | health |
+-----------------------------+-------+---------+--------+------------+----------------------------------------------------------------------+
| localhost | 3306 | MASTER | UP | ON | OK |
| SLAVE | 3306 | SLAVE | UP | ON | SQL thread is not running., Slave has 1 transactions behind master. |
+-----------------------------+-------+---------+--------+------------+----------------------------------------------------------------------+
# ...done.

Log on slave:
2013-02-08 16:09:05 11525 [Note] Slave I/O thread: connected to master 'root@MASTER:3306',replication started in log 'MASTER-bin.000003' at position 1272
2013-02-08 16:09:56 11525 [ERROR] Error writing relay log configuration.
2013-02-08 16:09:56 11525 [ERROR] Slave SQL: Failed during slave workers initialization, Error_code: 1593

Start slave on slave:
2013-02-08 16:11:51 11525 [Note] Slave SQL thread initialized, starting replication in log 'MASTER-bin.000003' at position 1272, relay log './SLAVE-relay-bin.000005' position: 363

Check status from master:
mysqlrpladmin --master=user:pass@localhost --slaves=user:pass@'SLAVE' health
# Checking privileges.



# Replication Topology Health:
+-----------------------------+-------+---------+--------+------------+------------------------------------------+
| host | port | role | state | gtid_mode | health |
+-----------------------------+-------+---------+--------+------------+------------------------------------------+
| localhost | 3306 | MASTER | UP | ON | OK |
| SLAVE | 3306 | SLAVE | UP | ON | Slave has 1 transactions behind master. |
+-----------------------------+-------+---------+--------+------------+------------------------------------------+

slave_relay_log_info table on slave:

select * from slave_relay_log_info\G
*************************** 1. row ***************************
Number_of_lines: 7
Relay_log_name: ./SLAVE-relay-bin.000005
Relay_log_pos: 363
Master_log_name: MASTER-bin.000003
Master_log_pos: 1272
Sql_delay: 0
Number_of_workers: 0
Id: 1

Relevant my.cnf:
master-info-repository=TABLE
relay-log-info-repository=TABLE

Options: ReplyQuote


Subject
Views
Written By
Posted
"mysqlrpladmin start" fails to start slave SQL thread
2451
February 08, 2013 05:34PM


Sorry, you can't reply to this topic. It has been closed.

Content reproduced on this site is the property of the respective copyright holders. It is not reviewed in advance by Oracle and does not necessarily represent the opinion of Oracle or any other party.