canal.log: 2018-11-13 13:26:09.610 [main] ERROR com.alibaba.druid.pool.DruidDataSource - testWhileIdle is true, validationQuery not set 2018-11-13 13:26:09.641 [main] INFO com.alibaba.druid.pool.DruidDataSource - {dataSource-1} inited 2018-11-13 13:26:09.929 [main] INFO c.a.o.c.p.inbound.mysql.tsdb.DefaultTableMetaTSDBFactory - example init TableMetaTSDB with classpath:spring/tsdb/h2-tsdb.xml 2018-11-13 13:26:09.932 [main] INFO com.alibaba.otter.canal.prometheus.CanalInstanceExports - Successfully register metrics for instance example. 2018-11-13 13:26:09.932 [main] INFO com.alibaba.otter.canal.prometheus.PrometheusService - Register metrics for destination example. 2018-11-13 13:26:09.981 [destination = example , address = /10.0.0.61:3306 , EventParser] INFO c.a.o.c.p.inbound.mysql.rds.RdsBinlogEventParserProxy - start heart beat.... 2018-11-13 13:26:10.004 [destination = example , address = /10.0.0.61:3306 , EventParser] INFO c.alibaba.otter.canal.parse.driver.mysql.MysqlConnector - connect MysqlConnection to /10.0.0.61:3306... 2018-11-13 13:26:10.027 [destination = example , address = /10.0.0.61:3306 , EventParser] INFO c.alibaba.otter.canal.parse.driver.mysql.MysqlConnector - handshake initialization packet received, prepare the client authentication packet to send 2018-11-13 13:26:10.033 [destination = example , address = /10.0.0.61:3306 , EventParser] INFO c.alibaba.otter.canal.parse.driver.mysql.MysqlConnector - client authentication packet is sent out. 2018-11-13 13:26:10.070 [destination = example , address = /10.0.0.61:3306 , EventParser] INFO c.alibaba.otter.canal.parse.driver.mysql.MysqlConnector - connect MysqlConnection to /10.0.0.61:3306... 2018-11-13 13:26:10.071 [destination = example , address = /10.0.0.61:3306 , EventParser] INFO c.alibaba.otter.canal.parse.driver.mysql.MysqlConnector - handshake initialization packet received, prepare the client authentication packet to send 2018-11-13 13:26:10.071 [destination = example , address = /10.0.0.61:3306 , EventParser] INFO c.alibaba.otter.canal.parse.driver.mysql.MysqlConnector - client authentication packet is sent out. 2018-11-13 13:26:10.124 [main] INFO c.a.otter.canal.server.embedded.CanalServerWithEmbedded - start CanalInstances[example] successfully 2018-11-13 13:26:10.174 [destination = example , address = /10.0.0.61:3306 , EventParser] WARN c.a.o.c.p.inbound.mysql.rds.RdsBinlogEventParserProxy - prepare to find start position just show master status 2018-11-13 13:26:10.175 [destination = example , address = /10.0.0.61:3306 , EventParser] INFO c.alibaba.otter.canal.parse.driver.mysql.MysqlConnector - disConnect MysqlConnection to /10.0.0.61:3306... 2018-11-13 13:26:10.176 [destination = example , address = /10.0.0.61:3306 , EventParser] INFO c.alibaba.otter.canal.parse.driver.mysql.MysqlConnector - connect MysqlConnection to /10.0.0.61:3306... 2018-11-13 13:26:10.177 [destination = example , address = /10.0.0.61:3306 , EventParser] INFO c.alibaba.otter.canal.parse.driver.mysql.MysqlConnector - handshake initialization packet received, prepare the client authentication packet to send 2018-11-13 13:26:10.208 [destination = example , address = /10.0.0.61:3306 , EventParser] INFO c.alibaba.otter.canal.parse.driver.mysql.MysqlConnector - client authentication packet is sent out. 2018-11-13 13:26:10.215 [main] INFO com.alibaba.otter.canal.deployer.CanalLauncher - ## the canal server is running now ...... 2018-11-13 13:26:10.220 [destination = example , address = /10.0.0.61:3306 , EventParser] INFO c.a.otter.canal.parse.inbound.mysql.MysqlConnection - COM_BINLOG_DUMP with position:BinlogDumpCommandPacket[binlogPosition=4,slaveServerId=1234,binlogFileName=mysql-bin.000004,command=18] 2018-11-13 13:26:10.249 [destination = example , address = /10.0.0.61:3306 , EventParser] INFO com.taobao.tddl.dbsync.binlog.LogEvent - common_header_len= 19, number_of_event_types= 35
example.log: 2018-11-13 13:26:08.708 [main] INFO o.s.context.support.ClassPathXmlApplicationContext - Refreshing org.springframework.context.support.ClassPathXmlApplicationContext@10dba097: startup date [Tue Nov 13 13:26:08 CST 2018]; root of context hierarchy 2018-11-13 13:26:08.751 [main] INFO o.s.beans.factory.xml.XmlBeanDefinitionReader - Loading XML bean definitions from class path resource [spring/file-instance.xml] 2018-11-13 13:26:08.891 [main] INFO o.s.beans.factory.xml.XmlBeanDefinitionReader - Loading XML bean definitions from class path resource [spring/base-instance.xml] 2018-11-13 13:26:09.038 [main] INFO c.a.o.c.i.spring.support.PropertyPlaceholderConfigurer - Loading properties file from class path resource [canal.properties] 2018-11-13 13:26:09.039 [main] INFO c.a.o.c.i.spring.support.PropertyPlaceholderConfigurer - Loading properties file from class path resource [example/instance.properties] 2018-11-13 13:26:09.057 [main] INFO o.s.beans.factory.support.DefaultListableBeanFactory - Pre-instantiating singletons in org.springframework.beans.factory.support.DefaultListableBeanFactory@68999068: defining beans [com.alibaba.otter.canal.instance.spring.support.PropertyPlaceholderConfigurer#0,socketAddressEditor,org.springframework.beans.factory.config.CustomEditorConfigurer#0,baseEventParser,instance,alarmHandler,metaManager,eventStore,eventSink,eventParser]; root of factory hierarchy 2018-11-13 13:26:09.201 [main] WARN o.s.beans.GenericTypeAwarePropertyDescriptor - Invalid JavaBean property 'connectionCharset' being accessed! Ambiguous write methods found next to actually used [public void com.alibaba.otter.canal.parse.inbound.mysql.AbstractMysqlEventParser.setConnectionCharset(java.nio.charset.Charset)]: [public void com.alibaba.otter.canal.parse.inbound.mysql.AbstractMysqlEventParser.setConnectionCharset(java.lang.String)] 2018-11-13 13:26:09.235 [main] INFO o.s.context.support.ClassPathXmlApplicationContext - Refreshing org.springframework.context.support.ClassPathXmlApplicationContext@13b13b5d: startup date [Tue Nov 13 13:26:09 CST 2018]; root of context hierarchy 2018-11-13 13:26:09.237 [main] INFO o.s.beans.factory.xml.XmlBeanDefinitionReader - Loading XML bean definitions from class path resource [spring/tsdb/h2-tsdb.xml] 2018-11-13 13:26:09.317 [main] INFO c.a.o.c.i.spring.support.PropertyPlaceholderConfigurer - Loading properties file from class path resource [canal.properties] 2018-11-13 13:26:09.318 [main] INFO c.a.o.c.i.spring.support.PropertyPlaceholderConfigurer - Loading properties file from class path resource [example/instance.properties] 2018-11-13 13:26:09.326 [main] INFO o.s.beans.factory.support.DefaultListableBeanFactory - Pre-instantiating singletons in org.springframework.beans.factory.support.DefaultListableBeanFactory@4e7912d8: defining beans [com.alibaba.otter.canal.instance.spring.support.PropertyPlaceholderConfigurer#0,tableMetaTSDB,dataSource,sqlMapClient,metaHistoryDAO,metaSnapshotDAO]; root of factory hierarchy 2018-11-13 13:26:09.610 [main] ERROR com.alibaba.druid.pool.DruidDataSource - testWhileIdle is true, validationQuery not set 2018-11-13 13:26:09.641 [main] INFO com.alibaba.druid.pool.DruidDataSource - {dataSource-1} inited 2018-11-13 13:26:09.929 [main] INFO c.a.o.c.p.inbound.mysql.tsdb.DefaultTableMetaTSDBFactory - example init TableMetaTSDB with classpath:spring/tsdb/h2-tsdb.xml 2018-11-13 13:26:09.932 [main] INFO com.alibaba.otter.canal.prometheus.CanalInstanceExports - Successfully register metrics for instance example. 2018-11-13 13:26:09.932 [main] INFO com.alibaba.otter.canal.prometheus.PrometheusService - Register metrics for destination example. 2018-11-13 13:26:09.932 [main] INFO c.a.otter.canal.instance.spring.CanalInstanceWithSpring - start CannalInstance for 1-example 2018-11-13 13:26:09.981 [destination = example , address = /10.0.0.61:3306 , EventParser] INFO c.a.o.c.p.inbound.mysql.rds.RdsBinlogEventParserProxy - start heart beat.... 2018-11-13 13:26:10.004 [destination = example , address = /10.0.0.61:3306 , EventParser] INFO c.alibaba.otter.canal.parse.driver.mysql.MysqlConnector - connect MysqlConnection to /10.0.0.61:3306... 2018-11-13 13:26:10.027 [destination = example , address = /10.0.0.61:3306 , EventParser] INFO c.alibaba.otter.canal.parse.driver.mysql.MysqlConnector - handshake initialization packet received, prepare the client authentication packet to send 2018-11-13 13:26:10.033 [destination = example , address = /10.0.0.61:3306 , EventParser] INFO c.alibaba.otter.canal.parse.driver.mysql.MysqlConnector - client authentication packet is sent out. 2018-11-13 13:26:10.070 [destination = example , address = /10.0.0.61:3306 , EventParser] INFO c.alibaba.otter.canal.parse.driver.mysql.MysqlConnector - connect MysqlConnection to /10.0.0.61:3306... 2018-11-13 13:26:10.071 [destination = example , address = /10.0.0.61:3306 , EventParser] INFO c.alibaba.otter.canal.parse.driver.mysql.MysqlConnector - handshake initialization packet received, prepare the client authentication packet to send 2018-11-13 13:26:10.071 [destination = example , address = /10.0.0.61:3306 , EventParser] INFO c.alibaba.otter.canal.parse.driver.mysql.MysqlConnector - client authentication packet is sent out. 2018-11-13 13:26:10.123 [main] INFO c.a.otter.canal.instance.core.AbstractCanalInstance - subscribe filter change to ... 2018-11-13 13:26:10.124 [main] INFO c.a.otter.canal.instance.core.AbstractCanalInstance - start successful.... 2018-11-13 13:26:10.124 [main] INFO c.a.otter.canal.server.embedded.CanalServerWithEmbedded - start CanalInstances[example] successfully 2018-11-13 13:26:10.174 [destination = example , address = /10.0.0.61:3306 , EventParser] WARN c.a.o.c.p.inbound.mysql.rds.RdsBinlogEventParserProxy - prepare to find start position just show master status 2018-11-13 13:26:10.175 [destination = example , address = /10.0.0.61:3306 , EventParser] INFO c.alibaba.otter.canal.parse.driver.mysql.MysqlConnector - disConnect MysqlConnection to /10.0.0.61:3306... 2018-11-13 13:26:10.176 [destination = example , address = /10.0.0.61:3306 , EventParser] INFO c.alibaba.otter.canal.parse.driver.mysql.MysqlConnector - connect MysqlConnection to /10.0.0.61:3306... 2018-11-13 13:26:10.177 [destination = example , address = /10.0.0.61:3306 , EventParser] INFO c.alibaba.otter.canal.parse.driver.mysql.MysqlConnector - handshake initialization packet received, prepare the client authentication packet to send 2018-11-13 13:26:10.208 [destination = example , address = /10.0.0.61:3306 , EventParser] INFO c.alibaba.otter.canal.parse.driver.mysql.MysqlConnector - client authentication packet is sent out. 2018-11-13 13:26:10.220 [destination = example , address = /10.0.0.61:3306 , EventParser] INFO c.a.otter.canal.parse.inbound.mysql.MysqlConnection - COM_BINLOG_DUMP with position:BinlogDumpCommandPacket[binlogPosition=4,slaveServerId=1234,binlogFileName=mysql-bin.000004,command=18] 2018-11-13 13:26:10.249 [destination = example , address = /10.0.0.61:3306 , EventParser] INFO com.taobao.tddl.dbsync.binlog.LogEvent - common_header_len= 19, number_of_event_types= 35
原提问者GitHub用户Czjcunzhang
解决了, 虚拟机 CPU核数给了1核, canal估计要至少2核才能跑起来 修改canal.properties文件中的 canal.instance.parser.parallel 属性 改为 false就可以了
原回答者GitHub用户kaibi12
版权声明:本文内容由阿里云实名注册用户自发贡献,版权归原作者所有,阿里云开发者社区不拥有其著作权,亦不承担相应法律责任。具体规则请查看《阿里云开发者社区用户服务协议》和《阿里云开发者社区知识产权保护指引》。如果您发现本社区中有涉嫌抄袭的内容,填写侵权投诉表单进行举报,一经查实,本社区将立刻删除涉嫌侵权内容。