Client requested master to start replication from position Client requested master to start replication from position
com.github.shyiko.mysql.binlog.network.ServerException: Client requested master to start replication from position > file size; the first event 'master.000002' at 118380, the last event read from './master.000002' at 4, the last byte read from './master.000002' at 4.
at com.github.shyiko.mysql.binlog.BinaryLogClient.listenForEventPackets(BinaryLogClient.java:946)
at com.github.shyiko.mysql.binlog.BinaryLogClient.connect(BinaryLogClient.java:581)
at com.github.shyiko.mysql.binlog.BinaryLogClient$7.run(BinaryLogClient.java:857)
at java.lang.Thread.run(Thread.java:748)
11:15:15,934 INFO TaskManager - Stopped all tasks
You have mail in /var/spool/mail/hadoop
# 解决方案
登录mysql maxwell数据库 修改positions表中,读取bin-log起始位置即可
mysql> use maxwell
Reading table information for completion of table and column names
You can turn off this feature to get a quicker startup with -A
Database changed
mysql> show tables;
+-------------------+
| Tables_in_maxwell |
+-------------------+
| bootstrap |
| columns |
| databases |
| heartbeats |
| positions |
| schemas |
| tables |
+-------------------+
7 rows in set (0.00 sec)
mysql> select * from positions;
+-----------+---------------+-----------------+----------+-----------+--------------+---------------------+
| server_id | binlog_file | binlog_position | gtid_set | client_id | heartbeat_at | last_heartbeat_read |
+-----------+---------------+-----------------+----------+-----------+--------------+---------------------+
| 1 | master.000002 | 118380 | NULL | maxwell | NULL | 1574905779360 |
+-----------+---------------+-----------------+----------+-----------+--------------+---------------------+
1 row in set (0.00 sec)
mysql> update positions set binlog_position=4 where server_id=1;