[MySQL] MGR错误日志出现大量Got an error reading communication packets报错

MySQL错误日志出现大量的 Got an error reading communication packets 报错

2017-12-19T13:45:30.520979+08:00 209938 [Note] Aborted connection 209938 to db: 'db_test' user: 'user' host: '192.168.1.11' (Got an error reading communication packets)
2017-12-19T13:45:38.079170+08:00 209977 [Note] Aborted connection 209977 to db: 'db_test' user: 'user' host: '192.168.1.11' (Got an error reading communication packets)
2017-12-19T13:45:43.181608+08:00 209994 [Note] Aborted connection 209994 to db: 'db_test' user: 'user' host: '192.168.1.11' (Got an error reading communication packets)
2017-12-19T13:45:55.358198+08:00 210024 [Note] Aborted connection 210024 to db: 'db_test' user: 'user' host: '192.168.1.11' (Got an error reading communication packets)
2017-12-19T13:46:18.637414+08:00 210048 [Note] Aborted connection 210048 to db: 'db_test' user: 'user' host: '192.168.1.11' (Got an error reading communication packets)
2017-12-19T13:46:24.350035+08:00 210068 [Note] Aborted connection 210068 to db: 'db_test' user: 'user' host: '192.168.1.11' (Got an error reading communication packets)
2017-12-19T13:46:27.782725+08:00 210070 [Note] Aborted connection 210070 to db: 'db_test' user: 'user' host: '192.168.1.11' (Got an error reading communication packets)
2017-12-19T13:46:33.734913+08:00 210113 [Note] Aborted connection 210113 to db: 'db_test' user: 'user' host: '192.168.1.11' (Got an error reading communication packets)
2017-12-19T13:47:24.663976+08:00 210143 [Note] Aborted connection 210143 to db: 'db_test' user: 'user' host: '192.168.1.11' (Got an error reading communication packets)
2017-12-19T13:47:48.532414+08:00 210171 [Note] Aborted connection 210171 to db: 'db_test' user: 'user' host: '192.168.1.11' (Got an error reading communication packets)
2017-12-19T13:50:55.389600+08:00 210264 [Note] Aborted connection 210264 to db: 'db_test' user: 'user' host: '192.168.1.11' (Got an error reading communication packets)
2017-12-19T13:51:52.200686+08:00 210312 [Note] Aborted connection 210312 to db: 'db_test' user: 'user' host: '192.168.1.11' (Got an error reading communication packets)
2017-12-19T13:53:18.220629+08:00 210372 [Note] Aborted connection 210372 to db: 'db_test' user: 'user' host: '192.168.1.11' (Got an error reading communication packets)
2017-12-19T13:54:20.138416+08:00 210528 [Note] Aborted connection 210528 to db: 'db_test' user: 'user' host: '192.168.1.11' (Got an error reading communication packets)
2017-12-19T13:54:58.566553+08:00 210597 [Note] Aborted connection 210597 to db: 'db_test' user: 'user' host: '192.168.1.11' (Got an error reading communication packets)
2017-12-19T13:54:59.011252+08:00 210604 [Note] Aborted connection 210604 to db: 'db_test' user: 'user' host: '192.168.1.11' (Got an error reading communication packets)
2017-12-19T13:55:35.805322+08:00 210616 [Note] Aborted connection 210616 to db: 'db_test' user: 'user' host: '192.168.1.11' (Got an error reading communication packets)
2017-12-19T13:56:04.918893+08:00 210707 [Note] Aborted connection 210707 to db: 'db_test' user: 'user' host: '192.168.1.11' (Got an error reading communication packets)
2017-12-19T13:56:18.713241+08:00 210756 [Note] Aborted connection 210756 to db: 'db_test' user: 'user' host: '192.168.1.11' (Got an error reading communication packets)
2017-12-19T13:57:46.983769+08:00 210854 [Note] Aborted connection 210854 to db: 'db_test' user: 'user' host: '192.168.1.11' (Got an error reading communication packets)
2017-12-19T13:58:22.214034+08:00 210890 [Note] Aborted connection 210890 to db: 'db_test' user: 'user' host: '192.168.1.11' (Got an error reading communication packets)
2017-12-19T13:59:38.062524+08:00 210859 [Note] Aborted connection 210859 to db: 'db_test' user: 'user' host: '192.168.1.11' (Got an error reading communication packets)
2017-12-19T14:01:19.203145+08:00 211000 [Note] Aborted connection 211000 to db: 'db_test' user: 'user' host: '192.168.1.11' (Got an error reading communication packets)
2017-12-19T14:02:06.677057+08:00 211055 [Note] Aborted connection 211055 to db: 'db_test' user: 'user' host: '192.168.1.11' (Got an error reading communication packets)
2017-12-19T14:04:47.181184+08:00 211187 [Note] Aborted connection 211187 to db: 'db_test' user: 'user' host: '192.168.1.11' (Got an error reading communication packets)


查看log_warnings设置

mysql> select @@log_warnings;
+----------------+
| @@log_warnings |
+----------------+
|              2 |
+----------------+
1 row in set, 1 warning (0.00 sec)

mysql>

将log_warnings参数设为1

mysql> set global log_warnings=1;
Query OK, 0 rows affected, 1 warning (0.00 sec)

mysql> select @@log_warnings;
+----------------+
| @@log_warnings |
+----------------+
|              1 |
+----------------+
1 row in set, 1 warning (0.00 sec)

mysql>

此时,上面的大量日志就不会出现在错误日志里面了。

MySQL官方对log_warnings参数的解释是:Print out warnings such as Aborted connection... to the error log. This option is enabled (1) by default. To disable it, use --log-warnings=0. Specifying the option without a level value increments the current value by 1. Enabling this option by setting it greater than 0 is recommended, for example, if you use replication (you get more information about what is happening, such as messages about network failures and reconnections). If the value is greater than 1, aborted connections are written to the error log, and access-denied errors for new connection attempts are written

http://dev.mysql.com/doc/refman/5.6/en/server-options.html#option_mysqld_log-warnings

因为我的环境是MySQL Group Replication集群,还需要tracking网络异常等错误所以将log_wanings设置为1。

你可能感兴趣的:(MySQL,MySQL,MGR)