Check /home/admin/canal-server/logs/example/example.log and find the following error:
2022-07-20 00:00:08.473 [destination = example , address = mall-mysql/192.168.38.131:3306 , EventParser] ERROR com.alibaba.otter.canal.common.alarm.LogAlarmHandler - destination:e
xample[java.io.IOException: Received error packet: errno = 1236, sqlstate = HY000 errmsg = Could not find first log file name in binary log index file
at com.alibaba.otter.canal.parse.inbound.mysql.dbsync.DirectLogFetcher.fetch(DirectLogFetcher.java:102)
at com.alibaba.otter.canal.parse.inbound.mysql.MysqlConnection.dump(MysqlConnection.java:238)
at com.alibaba.otter.canal.parse.inbound.AbstractEventParser$1.run(AbstractEventParser.java:262)
at java.lang.Thread.run(Thread.java:748)
reason:
The binlog file set in the configuration file was not found
Solution:
Because the configuration file of instance.properties is packaged into the docker image, so it can only be modified in the instance
First check the binlog log file name and position in the database
Query in the mall-mysql database of this example:
mysql> show master status;
Output file: File: mysql-binlog.000233, Position: 652645
Enter the instance:
kubectl exec -ti mall-canal-84f6f7d7cc-xbghn bash -n nsName
xxx> vi /home/admin/canal-server/conf/example/instance.properties
Modify the position Info section:
canal.instance.master.address=mall-mysql:3306
canal.instance.master.journal.name=mysql-binlog.000233
canal.instance.master.position=652645
canal.instance.master.timestamp=
canal.instance.master.gtid=
Restart service:
xxx> cd /home/admin/canal-server
xxx> ./restart.sh
Check the log after restart and solve this error.
Read More:
- RECEIVED ERROR PACKET: ERRNO = 1236, SQLSTATE = HY000 ERRMSG = COULD NOT FIND FIRST LOG FILE NAME IN BINARY LOG INDEX FILE
- Centos7 Initialize mysql Error: Could not open file ‘/usr/local/mysql/log/mysqld.log‘ for error logging: Per
- [Solved] Last_IO_Error: Got fatal error 1236 from master when reading data from binary log: ‘event read from binlog did not pass crc check; the first event
- [Solved] Worker 1 failed executing transaction ‘ANONYMOUS‘ at master log mall-mysql-bin.000001, end_log_pos
- MYSQL8 Startup Error: mysqld_safe error: log-error set to ‘/var/log/mariadb/mariadb.log‘
- Dbeaver Import SQL File Error: Error executing process Process failed (exit code = 1). See error log. Process failed (exit code = 1). See error log.
- [Solved] MYSQL Error: ERROR! MySQL server PID file could not be found!
- MYSQL Error: Can‘t find error-message file [How to Solve]
- [ERROR] [FATAL] InnoDB: Table flags are 0 in the data dictionary but the flags in file ./ibdata
- [Solved] mysqldump: Got error: 1556: “You can‘t use locks with log tables.“ when using LOCK TABLES
- [Solved] Starting MySQL… ERROR The server quit without updating PID file
- MySQL Error: [ERROR] [FATAL] InnoDB: Table flags are 0 in the data dictionary but the flags in file
- MySql Warning: The server quit without updating PID file error
- [Solved] MySQL Startup Error: The server quit without updating PID file
- [How to Fix] Database can’t open file (errno:24)
- [Linux Docker Mirror] MYSQL Run sql Script Error: Failed to open file ‘/home/mydatabase.sql‘, error: 2
- [Solved] dynamic-datasource can not find primary datasource
- Failed to load file or assembly MySql.Web Solution
- MYSQL 5.7 Error Code: 1290. The MySQL server is running with the –secure-file-priv option so it..
- MySQL Error: Error writing file ‘/tmp/MY4WYVlC‘ (Errcode: 28 – No space left on device)