Description:
Trying to START SLAVE after loading slave_master_info and slave_relay_log_info into a clean MySQL instance results in an empty error message:
mysql 5.6.10-log (root) [test]> start slave;
ERROR 1593 (HY000): Fatal error: %s
From error log:
2013-03-07 15:24:12 20901 [ERROR] Failed to open the relay log './prosimmon-relay-bin.000041' (relay_log_pos 4464).
2013-03-07 15:24:12 20901 [ERROR] Could not find target log file mentioned in relay log info in the index file './prosimmon-relay-bin.index' during relay log initialization.
2013-03-07 15:24:12 20901 [ERROR] Failed to initialize the master info structure
2013-03-07 15:24:12 20901 [Note] Check error log for additional messages. You will not be able to start replication until the issue is resolved and the server restarted.
How to repeat:
Set up fresh 5.6.10 instance (mysql_install_db)
Start MySQL with this configuration:
[mysqld]
server-id=2
port=4002
datadir=/Users/kolbe/Devel/m/5.6/box2
socket=/Users/kolbe/Devel/m/5.6/box2/mysql.sock
log-bin=box2
log-error=prosimmon.err
log-slave-updates
master-info-repository=TABLE
relay-log-info-repository=TABLE
gtid_mode=ON
enforce-gtid-consistency
Import a dump file with these lines:
SET @@GLOBAL.GTID_PURGED='075f2616-8508-11e2-a100-2d636aea58f7:1-53';
INSERT INTO `slave_master_info` VALUES (23,'box1.000010',191,'127.0.0.1','root','',4001,60,0,'','','','','',0,1800,'','0','075f2616-8508-11e2-a100-2d636aea58f7',86400,'','',1);
INSERT INTO `slave_relay_log_info` VALUES (7,'./prosimmon-relay-bin.000041',4464,'box1.000010',4264,0,0,1);
Restart MySQL (so that MySQL will initialize slave structures from newly-populated table-based replication info repositories)
Try to START SLAVE
kolbe@prosimmon 5.6 $ rm -rf ./box2/*
kolbe@prosimmon 5.6 $ ./scripts/mysql_install_db --datadir=box2 >/dev/null
2013-03-07 15:23:42 0 [Warning] TIMESTAMP with implicit DEFAULT value is deprecated. Please use --explicit_defaults_for_timestamp server option (see documentation for more details).
2013-03-07 15:23:46 0 [Warning] TIMESTAMP with implicit DEFAULT value is deprecated. Please use --explicit_defaults_for_timestamp server option (see documentation for more details).
kolbe@prosimmon 5.6 $ mysqld_safe --defaults-file=box2.cnf &
[1] 20498
kolbe@prosimmon 5.6 $ 130307 15:23:50 mysqld_safe Logging to '/Users/kolbe/Devel/m/5.6/box2/prosimmon.err'.
chown: /Users/kolbe/Devel/m/5.6/box2/prosimmon.err: Operation not permitted
130307 15:23:50 mysqld_safe Starting mysqld daemon with databases from /Users/kolbe/Devel/m/5.6/box2
kolbe@prosimmon 5.6 $ cat slave_master_info.sql
SET @@GLOBAL.GTID_PURGED='075f2616-8508-11e2-a100-2d636aea58f7:1-53';
INSERT INTO `slave_master_info` VALUES (23,'box1.000010',191,'127.0.0.1','root','',4001,60,0,'','','','','',0,1800,'','0','075f2616-8508-11e2-a100-2d636aea58f7',86400,'','',1);
INSERT INTO `slave_relay_log_info` VALUES (7,'./prosimmon-relay-bin.000041',4464,'box1.000010',4264,0,0,1);
kolbe@prosimmon 5.6 $ ./bin/mysql -S ./box2/mysql.sock mysql < slave_master_info.sql
kolbe@prosimmon 5.6 $ kill %1
kolbe@prosimmon 5.6 $ 130307 15:24:05 mysqld_safe mysqld from pid file /Users/kolbe/Devel/m/5.6/box2/prosimmon.pid ended
[1]+ Done mysqld_safe --defaults-file=box2.cnf
kolbe@prosimmon 5.6 $ mysqld_safe --defaults-file=box2.cnf &
[1] 20702
kolbe@prosimmon 5.6 $ 130307 15:24:11 mysqld_safe Logging to '/Users/kolbe/Devel/m/5.6/box2/prosimmon.err'.
chown: /Users/kolbe/Devel/m/5.6/box2/prosimmon.err: Operation not permitted
130307 15:24:11 mysqld_safe Starting mysqld daemon with databases from /Users/kolbe/Devel/m/5.6/box2
kolbe@prosimmon 5.6 $ mysql -e 'show slave status\G'
ERROR 2002 (HY000): Can't connect to local MySQL server through socket './data/mysql.sock' (2)
kolbe@prosimmon 5.6 $ ./bin/mysql -S ./box2/mysql.sock -e 'show slave status\G'
*************************** 1. row ***************************
Slave_IO_State:
Master_Host: 127.0.0.1
Master_User: root
Master_Port: 4001
Connect_Retry: 60
Master_Log_File: box1.000010
Read_Master_Log_Pos: 191
Relay_Log_File: prosimmon-relay-bin.000041
Relay_Log_Pos: 4464
Relay_Master_Log_File: box1.000010
Slave_IO_Running: No
Slave_SQL_Running: No
Replicate_Do_DB:
Replicate_Ignore_DB:
Replicate_Do_Table:
Replicate_Ignore_Table:
Replicate_Wild_Do_Table:
Replicate_Wild_Ignore_Table:
Last_Errno: 0
Last_Error:
Skip_Counter: 0
Exec_Master_Log_Pos: 4264
Relay_Log_Space: 0
Until_Condition: None
Until_Log_File:
Until_Log_Pos: 0
Master_SSL_Allowed: No
Master_SSL_CA_File:
Master_SSL_CA_Path:
Master_SSL_Cert:
Master_SSL_Cipher:
Master_SSL_Key:
Seconds_Behind_Master: NULL
Master_SSL_Verify_Server_Cert: No
Last_IO_Errno: 0
Last_IO_Error:
Last_SQL_Errno: 0
Last_SQL_Error:
Replicate_Ignore_Server_Ids:
Master_Server_Id: 0
Master_UUID: 075f2616-8508-11e2-a100-2d636aea58f7
Master_Info_File: mysql.slave_master_info
SQL_Delay: 0
SQL_Remaining_Delay: NULL
Slave_SQL_Running_State:
Master_Retry_Count: 86400
Master_Bind:
Last_IO_Error_Timestamp:
Last_SQL_Error_Timestamp:
Master_SSL_Crl:
Master_SSL_Crlpath:
Retrieved_Gtid_Set:
Executed_Gtid_Set: 075f2616-8508-11e2-a100-2d636aea58f7:1-53
Auto_Position: 1
kolbe@prosimmon 5.6 $ ./bin/mysql -S ./box2/mysql.sock -e 'start slave'
ERROR 1593 (HY000) at line 1: Fatal error: %s
Suggested fix:
This sequence should result in an error, certainly, but it should not give an empty/placeholder error message. A more descriptive error message must be added.