开发者社区> 问答> 正文

canal启动后11111端口未打开,只打开了11112端口,但是启动日志正常

Canal-1.1.1 [root@kafka-02 conf]# netstat -lntp Active Internet connections (only servers) Proto Recv-Q Send-Q Local Address Foreign Address State PID/Program name tcp 0 0 0.0.0.0:11112 0.0.0.0:* LISTEN 8305/java tcp 0 0 0.0.0.0:52342 0.0.0.0:* LISTEN 1262/sshd tcp 0 0 :::9092 :::* LISTEN 2000/java tcp 0 0 :::19845 :::* LISTEN 2000/java tcp 0 0 :::52342 :::* LISTEN 1262/sshd tcp 0 0 :::56860 :::* LISTEN 5124/java

[root@kafka-02 conf]# cat canal.properties ################################################# ######### common argument ############# ################################################# canal.id= 1 canal.ip=10.0.0.78 canal.port=11111 canal.metrics.pull.port=11112

canal.log启动日志: 2018-11-07 05:16:57.806 [main] INFO org.apache.kafka.common.utils.AppInfoParser - Kafka version : 1.1.1 2018-11-07 05:16:57.806 [main] INFO org.apache.kafka.common.utils.AppInfoParser - Kafka version : 1.1.1 2018-11-07 05:16:57.807 [main] INFO org.apache.kafka.common.utils.AppInfoParser - Kafka commitId : 98b6346a977495f6 2018-11-07 05:16:57.807 [main] INFO org.apache.kafka.common.utils.AppInfoParser - Kafka commitId : 98b6346a977495f6 2018-11-07 05:16:57.810 [main] INFO com.alibaba.otter.canal.server.CanalMQStarter - ## start the MQ workers. 2018-11-07 05:16:57.810 [main] INFO com.alibaba.otter.canal.server.CanalMQStarter - ## start the MQ workers. 2018-11-07 05:16:57.818 [main] INFO com.alibaba.otter.canal.server.CanalMQStarter - ## the MQ workers is running now ...... 2018-11-07 05:16:57.818 [main] INFO com.alibaba.otter.canal.server.CanalMQStarter - ## the MQ workers is running now ...... 2018-11-07 05:16:57.820 [pool-4-thread-1] INFO com.alibaba.otter.canal.server.CanalMQStarter - ## start the canal consumer: example. 2018-11-07 05:16:57.820 [pool-4-thread-1] INFO com.alibaba.otter.canal.server.CanalMQStarter - ## start the canal consumer: example. 2018-11-07 05:16:57.846 [pool-4-thread-1] INFO c.a.otter.canal.server.embedded.CanalServerWithEmbedded - subscribe successfully, ClientIdentity[destination=example,clientId=1001,filter=] with first position:null 2018-11-07 05:16:57.846 [pool-4-thread-1] INFO c.a.otter.canal.server.embedded.CanalServerWithEmbedded - subscribe successfully, ClientIdentity[destination=example,clientId=1001,filter=] with first position:null 2018-11-07 05:16:57.852 [pool-4-thread-1] INFO com.alibaba.otter.canal.server.CanalMQStarter - ## the canal consumer example is running now ...... 2018-11-07 05:16:57.852 [pool-4-thread-1] INFO com.alibaba.otter.canal.server.CanalMQStarter - ## the canal consumer example is running now ......

exapmle.log日志: 2018-11-07 05:16:55.531 [main] INFO c.a.o.c.i.spring.support.PropertyPlaceholderConfigurer - Loading properties file from class path resource [example/instance.properties] 2018-11-07 05:16:55.536 [main] INFO o.s.beans.factory.support.DefaultListableBeanFactory - Pre-instantiating singletons in org.springframework.beans.factory.support.DefaultListableBeanFactory@221a3fa4: defining beans [com.alibaba.otter.canal.instance.spring.support.PropertyPlaceholderConfigurer#0,tableMetaTSDB,dataSource,sqlMapClient,metaHistoryDAO,metaSnapshotDAO]; root of factory hierarchy 2018-11-07 05:16:56.028 [main] ERROR com.alibaba.druid.pool.DruidDataSource - testWhileIdle is true, validationQuery not set 2018-11-07 05:16:56.049 [main] INFO com.alibaba.druid.pool.DruidDataSource - {dataSource-1} inited 2018-11-07 05:16:56.622 [main] INFO c.a.o.c.p.inbound.mysql.tsdb.DefaultTableMetaTSDBFactory - example init TableMetaTSDB with classpath:spring/tsdb/h2-tsdb.xml 2018-11-07 05:16:56.641 [main] INFO com.alibaba.otter.canal.prometheus.CanalInstanceExports - Successfully register metrics for instance example. 2018-11-07 05:16:56.646 [main] INFO com.alibaba.otter.canal.prometheus.PrometheusService - Register metrics for destination example. 2018-11-07 05:16:56.647 [main] INFO c.a.otter.canal.instance.spring.CanalInstanceWithSpring - start CannalInstance for 1-example 2018-11-07 05:16:56.718 [destination = example , address = /10.0.0.99:3306 , EventParser] INFO c.a.o.c.p.inbound.mysql.rds.RdsBinlogEventParserProxy - start heart beat.... 2018-11-07 05:16:56.843 [destination = example , address = /10.0.0.99:3306 , EventParser] INFO c.alibaba.otter.canal.parse.driver.mysql.MysqlConnector - connect MysqlConnection to /10.0.0.99:3306... 2018-11-07 05:16:56.858 [destination = example , address = /10.0.0.99:3306 , EventParser] INFO c.alibaba.otter.canal.parse.driver.mysql.MysqlConnector - handshake initialization packet received, prepare the client authentication packet to send 2018-11-07 05:16:56.883 [main] INFO c.a.otter.canal.instance.core.AbstractCanalInstance - start successful.... 2018-11-07 05:16:56.887 [main] INFO c.a.otter.canal.server.embedded.CanalServerWithEmbedded - start CanalInstances[example] successfully 2018-11-07 05:16:56.968 [destination = example , address = /10.0.0.99:3306 , EventParser] INFO c.alibaba.otter.canal.parse.driver.mysql.MysqlConnector - client authentication packet is sent out. 2018-11-07 05:16:57.008 [destination = example , address = /10.0.0.99:3306 , EventParser] INFO c.alibaba.otter.canal.parse.driver.mysql.MysqlConnector - connect MysqlConnection to /10.0.0.99:3306... 2018-11-07 05:16:57.009 [destination = example , address = /10.0.0.99:3306 , EventParser] INFO c.alibaba.otter.canal.parse.driver.mysql.MysqlConnector - handshake initialization packet received, prepare the client authentication packet to send 2018-11-07 05:16:57.010 [destination = example , address = /10.0.0.99:3306 , EventParser] INFO c.alibaba.otter.canal.parse.driver.mysql.MysqlConnector - client authentication packet is sent out. 2018-11-07 05:16:57.015 [destination = example , address = /10.0.0.99:3306 , EventParser] WARN c.a.o.c.p.inbound.mysql.rds.RdsBinlogEventParserProxy - prepare to find start position just show master status 2018-11-07 05:16:57.020 [destination = example , address = /10.0.0.99:3306 , EventParser] INFO c.alibaba.otter.canal.parse.driver.mysql.MysqlConnector - disConnect MysqlConnection to /10.0.0.99:3306... 2018-11-07 05:16:57.027 [destination = example , address = /10.0.0.99:3306 , EventParser] INFO c.alibaba.otter.canal.parse.driver.mysql.MysqlConnector - connect MysqlConnection to /10.0.0.99:3306... 2018-11-07 05:16:57.028 [destination = example , address = /10.0.0.99:3306 , EventParser] INFO c.alibaba.otter.canal.parse.driver.mysql.MysqlConnector - handshake initialization packet received, prepare the client authentication packet to send 2018-11-07 05:16:57.029 [destination = example , address = /10.0.0.99:3306 , EventParser] INFO c.alibaba.otter.canal.parse.driver.mysql.MysqlConnector - client authentication packet is sent out. 2018-11-07 05:16:57.050 [destination = example , address = /10.0.0.99:3306 , EventParser] INFO c.a.otter.canal.parse.inbound.mysql.MysqlConnection - COM_BINLOG_DUMP with position:BinlogDumpCommandPacket[binlogPosition=4,slaveServerId=9527,binlogFileName=mysql-bin.000003,command=18]

原提问者GitHub用户Czjcunzhang

展开
收起
Java工程师 2023-05-08 17:52:03 683 0
2 条回答
写回答
取消 提交回答
  • 因为那个11111端口是给 tcp模式(netty)时候用的,你应该是用了kafka或者rocketmq吧,就不会去起这个端口了。可以看下 CanalController那一块初始化的逻辑(在构造函数里)。

    原回答者GitHub用户jiacheo

    2023-05-09 18:45:16
    赞同 展开评论 打赏
  • 云端行者觅知音, 技术前沿我独行。 前言探索无边界, 阿里风光引我情。

    Canal启动后默认会监听两个端口,一个是11111端口,用于客户端连接Canal Server进行数据订阅和消费;另一个是11112端口,用于Canal Manager连接Canal Server进行管理和监控。如果你发现Canal启动后只打开了11112端口,而11111端口未打开,可能是因为Canal Server没有成功启动或者配置文件中的端口号被修改了。建议检查Canal Server的启动日志,查看是否有异常信息,同时检查Canal配置文件中的端口号是否正确。如果仍然无法解决问题,可以尝试重新启动Canal Server或者重新配置Canal。

    2023-05-08 18:33:26
    赞同 展开评论 打赏
问答排行榜
最热
最新

相关电子书

更多
PostgresChina2018_赖思超_PostgreSQL10_hash索引的WAL日志修改版final 立即下载
Kubernetes下日志实时采集、存储与计算实践 立即下载
日志数据采集与分析对接 立即下载