4.canal抽取失败报is blocked because of many connection errors; unblock with ‘mysqladmin flush-hosts‘

Posted PacosonSWJTU

tags:

篇首语:本文由小常识网(cha138.com)小编为大家整理,主要介绍了4.canal抽取失败报is blocked because of many connection errors; unblock with ‘mysqladmin flush-hosts‘相关的知识,希望对你有一定的参考价值。

【README】

1.本文po出了报错【message=XXX' is blocked because of many connection errors; unblock with 'mysqladmin flush-hosts'】的解决方法;

2.解决方法参考了 StackOverflow: mysql - How to unblock with mysqladmin flush hosts - Stack Overflowhttps://stackoverflow.com/questions/22285318/how-to-unblock-with-mysqladmin-flush-hosts3. 我今天连续3次都碰到这个问题,所以单独记录下问题解决方法。


【1】查看canal服务器实例的日志

1)以 example实例为准,查看路径如下:

[root@centos201 example]# pwd
/usr/software/canal/logs/example
[root@centos201 example]# ll
total 1808
-rw-r--r--. 1 root root 1846033 Sep 17 18:15 example.log
-rw-r--r--. 1 root root    1774 Sep 17 18:00 meta.log

2)错误日志如下:

Caused by: java.io.IOException: handshake exception:
ErrorPacket [errorNumber=1129, fieldCount=-1, message=192.168.163.201' is blocked because of many connection errors; unblock with 'mysqladmin flush-hosts', sqlState=ost ', sqlStateMarker=H]
        at com.alibaba.otter.canal.parse.driver.mysql.MysqlConnector.negotiate(MysqlConnector.java:168) ~[canal.parse.driver-1.1.6.jar:na]
        at com.alibaba.otter.canal.parse.driver.mysql.MysqlConnector.connect(MysqlConnector.java:82) ~[canal.parse.driver-1.1.6.jar:na]
        ... 4 common frames omitted

message=192.168.163.201' is blocked because of many connection errors; unblock with 'mysqladmin flush-hosts'

【日志解释】

  •     大致说 192.168.163.201 被阻塞了,需要执行 mysqladmin flush-hosts 解除阻塞
  •     在mysql上执行 FLUSH HOSTS;  即可。
  • FLUSH HOSTS;  

以上是关于4.canal抽取失败报is blocked because of many connection errors; unblock with ‘mysqladmin flush-hosts‘的主要内容,如果未能解决你的问题,请参考以下文章

pandas 报警告:A value is trying to be set on a copy of a slice from a DataFrame

调试断言失败_BLOCK_TYPE_IS_VALID(pHead->nBlockUse)

hadoop启动守护进程报JAVA_HOME is not set and could not be found

运行报警告UserWarning: Unknown extension is not supported and will be removed warn(msg)

postgres15删除数据库报错ERROR: database "***" is being accessed by other users

Ubuntu报“xxx is not in the sudoers file.This incident will be reported” 错误解决方法