首页 » MySQL/TiDB/GoldenDB, OGG » MySQL ERROR 2027(HY000):Malformed packet due to GoldenGate Replication Slave

MySQL ERROR 2027(HY000):Malformed packet due to GoldenGate Replication Slave

最近有个客户查看MySQL主从同步时,提示ERROR 2027(HY000):Malformed packet错误,存在slave连接失败的现象,后分析是因为该MySQL配置了oracle goldengate,以replication slave的方式抽取,仅记录提醒再次遇到该问题。

mysql> show slave hosts;
ERROR 2027(HYg00):Malformed packet

mysql> show databases;
ERROR 2013(HY000):Lost connection to MySQL server during query
--
ERROR 2006(HY000):MySQL server has gone away
No connection. Trying to reconnect...

查看MySQL日志

 450176 [Note] Aborted connection 450176 to db: 'sample' user: 'xxxx' host: '127.0.0.1' (Got an error reading communication packets)

可能原因是
大量的MySQL进程耗尽,或未关闭的连接
部分客户端失败报与服务器失去连接,可增加connect_timeout
确认max_allowed_packet的值足够高,并且您的客户端没有收到“数据包太大”消息。这种情况会中止连接而不会正确关闭它。

在Oceanbase mysql模式时也可能出现这类错误,可能是因为版本高低不兼容。

 

查看当前参数max_allowed_packet为1073741824

mysql>show processlist;

发现有ogg进程在做binlog dump,和repl slaveg 一样,在等待master has sent all binlog to slave; waiting for more updates; 停止OGG进程后,查看slave状态正常,由此断定是把ogg当做slave rule。

https://docs.oracle.com/en/middleware/goldengate/core/21.3/gghdb/preparing-and-configuring-system-oracle-goldengate.html#GUID-41F158D6-9B69-4E7D-B7E7-3075CFE4E5BF

Capturing using a MySQL Replication Slave

You can configure a MySQL replication slave to capture the master’s binary log events from the slave.

Typically, the transactions applied by the slave are logged into the relay logs and not into the slave’s binlog. For the slave to write transactions in its binlog, that it receives from the master , you must start the replication slave with the log-slave-updates option as 1 in my.cnf in conjunction with the other binary logging parameters for Oracle GoldenGate. After the master’s transactions are in the slave’s binlog , you can set up a regular Oracle GoldenGate capture on the slave to capture and process the slave’s binlog.

发现OGG FOR MYSQL 确实存在一种做为replication slave的方式。 我理解是一种不生成trail文件的远程抽取方式。

如这篇BLOG MySQL to Oracle Heterogeneous Unidirectional Replication using Slave Server Bin log

打赏

, ,

目前这篇文章还没有评论(Rss)

我要评论