-
Enhancement
-
Resolution: Done
-
Major
-
0.3
-
None
Before, our team is using debezium 0.2.0-snapshot, and it works well with binlog. And right now, our team would like to upgrade to 0.3.0-snapshot in order to support snapshot feature(full sync the mysql data which is already removed from binlog). But it seems debezium 0.3.0-snapshot has bugs (UPDATE: the connector was improperly configured, but the minimal log statements during the MySQL connector's snapshot operation made it harder to understand what was going on.)
- mysql have tables inserted.
- the schema-change includes all ddls which we inserted into mysql
- There's no kafka topics about mysql tables (0.2.0 binlog is ok). Only Kafka system builtin topics has been created, e.g. config, offset, status.
Below is the debezium source mysql docker log. The log tells that it's ok (except the warning javax.management.InstanceAlreadyExistsException), but the source mysql connector doesn't produce data to Kafka topic, and so our team's sink connector has no kafka topic to consume.
2016-08-02 09:27:14,199 WARN MySQL|mysql_host_192_168_99_100_port_3307|task Error registering AppInfo mbean [org.apache.kafka.common.utils.AppInfoParser] javax.management.InstanceAlreadyExistsException: kafka.producer:type=app-info,id=b8924caa-f7f9-4cc0-90f3-9445e6594b36 at com.sun.jmx.mbeanserver.Repository.addMBean(Repository.java:437) at com.sun.jmx.interceptor.DefaultMBeanServerInterceptor.registerWithRepository(DefaultMBeanServerInterceptor.java:1898) at com.sun.jmx.interceptor.DefaultMBeanServerInterceptor.registerDynamicMBean(DefaultMBeanServerInterceptor.java:966) at com.sun.jmx.interceptor.DefaultMBeanServerInterceptor.registerObject(DefaultMBeanServerInterceptor.java:900) at com.sun.jmx.interceptor.DefaultMBeanServerInterceptor.registerMBean(DefaultMBeanServerInterceptor.java:324) at com.sun.jmx.mbeanserver.JmxMBeanServer.registerMBean(JmxMBeanServer.java:522) at org.apache.kafka.common.utils.AppInfoParser.registerAppInfo(AppInfoParser.java:58) at org.apache.kafka.clients.producer.KafkaProducer.<init>(KafkaProducer.java:328) at org.apache.kafka.clients.producer.KafkaProducer.<init>(KafkaProducer.java:188) at io.debezium.relational.history.KafkaDatabaseHistory.start(KafkaDatabaseHistory.java:147) at io.debezium.connector.mysql.MySqlSchema.start(MySqlSchema.java:133) at io.debezium.connector.mysql.MySqlTaskContext.start(MySqlTaskContext.java:131) at io.debezium.connector.mysql.MySqlConnectorTask.start(MySqlConnectorTask.java:69) at org.apache.kafka.connect.runtime.WorkerSourceTask.execute(WorkerSourceTask.java:137) at org.apache.kafka.connect.runtime.WorkerTask.doRun(WorkerTask.java:140) at org.apache.kafka.connect.runtime.WorkerTask.run(WorkerTask.java:175) at java.util.concurrent.Executors$RunnableAdapter.call(Executors.java:511) at java.util.concurrent.FutureTask.run(FutureTask.java:266) at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1142) at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:617) at java.lang.Thread.run(Thread.java:745) 2016-08-02 09:27:14,735 INFO || Source task WorkerSourceTask{id=dp-test-0} finished initialization and start [org.apache.kafka.connect.runtime.WorkerSourceTask] 2016-08-02 09:27:14,735 INFO MySQL|mysql_host_192_168_99_100_port_3307|snapshot Starting snapshot [io.debezium.connector.mysql.SnapshotReader] 2016-08-02 09:27:14,735 INFO MySQL|mysql_host_192_168_99_100_port_3307|snapshot Step 0: disabling autocommit and enabling repeatable read transactions [io.debezium.connector.mysql.SnapshotReader] Tue Aug 02 09:27:15 UTC 2016 WARN: Establishing SSL connection without server's identity verification is not recommended. According to MySQL 5.5.45+, 5.6.26+ and 5.7.6+ requirements SSL connection must be established by default if explicit option isn't set. For compliance with existing applications not using SSL the verifyServerCertificate property is set to 'false'. You need either to explicitly disable SSL by setting useSSL=false, or set useSSL=true and provide truststore for server certificate verification. 2016-08-02 09:27:15,265 INFO MySQL|mysql_host_192_168_99_100_port_3307|snapshot Step 1: start transaction with consistent snapshot [io.debezium.connector.mysql.SnapshotReader] 2016-08-02 09:27:15,266 INFO MySQL|mysql_host_192_168_99_100_port_3307|snapshot Step 2: flush and obtain global read lock (preventing writes to database) [io.debezium.connector.mysql.SnapshotReader] 2016-08-02 09:27:15,268 INFO MySQL|mysql_host_192_168_99_100_port_3307|snapshot Step 3: read binlog position of MySQL master [io.debezium.connector.mysql.SnapshotReader] 2016-08-02 09:27:15,273 INFO MySQL|mysql_host_192_168_99_100_port_3307|snapshot Step 4: read list of available databases [io.debezium.connector.mysql.SnapshotReader] 2016-08-02 09:27:15,274 INFO MySQL|mysql_host_192_168_99_100_port_3307|snapshot Step 5: read list of available tables in each database [io.debezium.connector.mysql.SnapshotReader] 2016-08-02 09:27:15,302 INFO MySQL|mysql_host_192_168_99_100_port_3307|snapshot Step 6: generating DROP and CREATE statements to reflect current database schemas [io.debezium.connector.mysql.SnapshotReader] 2016-08-02 09:27:15,402 WARN MySQL|mysql_host_192_168_99_100_port_3307|task Error while fetching metadata with correlation id 0 : {schema-changes.dp-test=LEADER_NOT_AVAILABLE} [org.apache.kafka.clients.NetworkClient] 2016-08-02 09:27:15,540 INFO MySQL|mysql_host_192_168_99_100_port_3307|snapshot Step 7: releasing global read lock to enable MySQL writes [io.debezium.connector.mysql.SnapshotReader] 2016-08-02 09:27:15,543 INFO MySQL|mysql_host_192_168_99_100_port_3307|snapshot Writes to MySQL prevented for a total of 00:00:00.277 [io.debezium.connector.mysql.SnapshotReader] 2016-08-02 09:27:15,543 INFO MySQL|mysql_host_192_168_99_100_port_3307|snapshot Step 8: scanning contents of 0 tables [io.debezium.connector.mysql.SnapshotReader] 2016-08-02 09:27:15,543 INFO MySQL|mysql_host_192_168_99_100_port_3307|snapshot Step 8: scanned contents of 0 tables in 00:00:00.0 [io.debezium.connector.mysql.SnapshotReader] 2016-08-02 09:27:15,544 INFO MySQL|mysql_host_192_168_99_100_port_3307|snapshot Step 10: committing transaction [io.debezium.connector.mysql.SnapshotReader] 2016-08-02 09:27:15,547 INFO MySQL|mysql_host_192_168_99_100_port_3307|snapshot Completed snapshot in 00:00:00.811 [io.debezium.connector.mysql.SnapshotReader] Aug 02, 2016 9:27:15 AM com.github.shyiko.mysql.binlog.BinaryLogClient connect INFO: Connected to 192.168.99.100:3307 at mysql-bin.000003/154 (sid:6079, cid:3) 2016-08-02 09:27:15,811 INFO MySQL|mysql_host_192_168_99_100_port_3307|binlog Connected to MySQL binlog at 192.168.99.100:3307, starting at binlog file 'mysql-bin.000003', pos=154, row=0 [io.debezium.connector.mysql.BinlogReader] 2016-08-02 09:36:02,881 INFO || Marking the coordinator 192.168.99.100:9092 (id: 2147482646 rack: null) dead for group topic_source_group_connect_source_debezium_mysql_dp-test [org.apache.kafka.clients.consumer.internals.AbstractCoordinator] 2016-08-02 09:36:02,884 INFO || Discovered coordinator 192.168.99.100:9092 (id: 2147482646 rack: null) for group topic_source_group_connect_source_debezium_mysql_dp-test. [org.apache.kafka.clients.consumer.internals.AbstractCoordinator]