Monday 19 October 2015

1129 error connecting to master


mysql> show slave status \G;
*************************** 1. row ***************************
               Slave_IO_State: Connecting to master
                  Master_Host: 000.000.000.100
                  Master_User: rep_user
                  Master_Port: 3300
                Connect_Retry: 60
              Master_Log_File: mysql-bin.017008
          Read_Master_Log_Pos: 6004
               Relay_Log_File: relay-bin.000001
                Relay_Log_Pos: 4
        Relay_Master_Log_File: mysql-bin.017008
             Slave_IO_Running: Connecting
            Slave_SQL_Running: Yes
          Master_SSL_Key:
        Seconds_Behind_Master: NULL
Master_SSL_Verify_Server_Cert: No
                Last_IO_Errno: 1129
                Last_IO_Error: error connecting to master 'rep_user@000.000.000.100:3300' - retry-time: 60  retries: 1074
               Last_SQL_Errno: 0
               Last_SQL_Error:
  Replicate_Ignore_Server_Ids:
             Master_Server_Id: 0
                  Master_UUID: de4-1fa393-90303b
             Master_Info_File: /test01/master.info
                    SQL_Delay: 0
          SQL_Remaining_Delay: NULL
      Slave_SQL_Running_State: Slave has read all relay log; waiting for the slave I/O thread to update it
           Master_Retry_Count: 86400
                  Master_Bind:

[testserver]$ telnet 000.000.000.100 3300 
Trying 000.000.000.100... 
Connected to 000.000.000.100. 
Escape character is '^]'. 
mHost '000.000.000.100' is blocked because of many connection errors; unblock with 'mysqladmin flush-hosts'Connection closed by foreign host. 

solution :--

>'000.000.000.100' is blocked because of many connection errors; unblock with 'mysqladmin flush-hosts'Connection closed by foreign host. 

After more than max_connect_errors unsuccessful tries, the ip will be blocked by the master's instance. 

To solve this problem you could execute 'mysqladmin flush-host' to unblock all blocked ip or 

execute FLUSH HOSTS on the master. 

The link below explains the issue in detail. 
https://dev.mysql.com/doc/refman/5.6/en/blocked-host.html 

Master server :-
mysqladmin -u username -ppasswd flush-hosts

Slave server:-

stop slave;
start slave;

show slave status \G;

Once the blocked host is flush the slave should be able to connect to the master. 

Try stopping the slave and starting the slave again after executing the FLUSH HOSTS 

For more information on FLUSH HOST please refer the link below. 
https://dev.mysql.com/doc/refman/5.6/en/flush.html 

To start or stop the slave you can use the START/STOP SLAVE command. 
https://dev.mysql.com/doc/refman/5.6/en/start-slave.html 
https://dev.mysql.com/doc/refman/5.6/en/stop-slave.html 

Thank you.

No comments:

Post a Comment