I am using Kafka and Debezium to connect to a MariaDB
I have a problem where in the event the MariaDB loses power and shutsdown abruptly, on restart Debezium is no longer able to connect
I have this error in particular
[2023-12-06 13:26:05,800] ERROR [192.168.108.1|task-0] Error during binlog processing. Last offset stored = null, binlog reader near position = mariadb-bin.000006/53938 (io.debezium.connector.mysql.MySqlStreamingChangeEventSource:1161)
io.debezium.DebeziumException: Client requested master to start replication from impossible position; the first event 'mariadb-bin.000006' at 53938, the last event read from 'mariadb-bin.000006' at 4, the last byte read from 'mariadb-bin.000006' at 4. Error code: 1236; SQLSTATE: HY000.
And on the mariadb side i have this
+--------------------+-----------+
| Log_name | File_size |
+--------------------+-----------+
| mariadb-bin.000001 | 330 |
| mariadb-bin.000002 | 330 |
| mariadb-bin.000003 | 67494 |
| mariadb-bin.000004 | 69007 |
| mariadb-bin.000005 | 126922 |
| mariadb-bin.000006 | 45056 |
| mariadb-bin.000007 | 103304 |
+--------------------+-----------+
7 rows in set (0.001 sec)
MariaDB [(none)]> show master status;
+--------------------+----------+--------------+------------------+
| File | Position | Binlog_Do_DB | Binlog_Ignore_DB |
+--------------------+----------+--------------+------------------+
| mariadb-bin.000007 | 103304 | | |
+--------------------+----------+--------------+------------------+
1 row in set (0.000 sec)
I have tried resetting offsets on Kafka side of things but I get the exact same error without fail, does anyone know why exactly there is a problem and how to resolve things? All help appreciated thanks so much!