开发者社区> 问答> 正文

canal 收集日志报错 java.net.UnknownHostException: bogon:

启动日志正常,但是在收集日志中报 2021-02-18 09:42:57.017 [destination = test , address = / :3306 , EventParser] ERROR c.a.o.c.p.inbound.mysql.rds.RdsBinlogEventParserProxy - dump address /10.136.0.92:3306 has an error, retrying. caused by com.alibaba.otter.canal.parse.exception.CanalParseException: Unknown host Caused by: java.net.UnknownHostException: bogon: bogon: Name or service not known at java.net.InetAddress.getLocalHost(InetAddress.java:1505) ~[na:1.8.0_181] at com.alibaba.otter.canal.parse.inbound.mysql.MysqlEventParser.generateUniqueServerId(MysqlEventParser.java:342) ~[canal.parse-1.1.5-SNAPSHOT.jar:na] at com.alibaba.otter.canal.parse.inbound.mysql.MysqlEventParser.buildMysqlConnection(MysqlEventParser.java:326) ~[canal.parse-1.1.5-SNAPSHOT.jar:na] at com.alibaba.otter.canal.parse.inbound.mysql.MysqlEventParser.buildErosaConnection(MysqlEventParser.java:75) ~[canal.parse-1.1.5-SNAPSHOT.jar:na] at com.alibaba.otter.canal.parse.inbound.AbstractEventParser$3.run(AbstractEventParser.java:177) ~[canal.parse-1.1.5-SNAPSHOT.jar:na] at java.lang.Thread.run(Thread.java:748) [na:1.8.0_181] Caused by: java.net.UnknownHostException: bogon: Name or service not known at java.net.Inet4AddressImpl.lookupAllHostAddr(Native Method) ~[na:1.8.0_181] at java.net.InetAddress$2.lookupAllHostAddr(InetAddress.java:928) ~[na:1.8.0_181] at java.net.InetAddress.getAddressesFromNameService(InetAddress.java:1323) ~[na:1.8.0_181] at java.net.InetAddress.getLocalHost(InetAddress.java:1500) ~[na:1.8.0_181] ... 5 common frames omitted 2021-02-18 09:42:57.020 [destination = test , address = /10.136.0.92:3306 , EventParser] ERROR com.alibaba.otter.canal.common.alarm.LogAlarmHandler - destination:test[com.alibaba.otter.canal.parse.exception.CanalParseException: Unknown host Caused by: java.net.UnknownHostException: bogon: bogon: Name or service not known at java.net.InetAddress.getLocalHost(InetAddress.java:1505) at com.alibaba.otter.canal.parse.inbound.mysql.MysqlEventParser.generateUniqueServerId(MysqlEventParser.java:342) at com.alibaba.otter.canal.parse.inbound.mysql.MysqlEventParser.buildMysqlConnection(MysqlEventParser.java:326) at com.alibaba.otter.canal.parse.inbound.mysql.MysqlEventParser.buildErosaConnection(MysqlEventParser.java:75) at com.alibaba.otter.canal.parse.inbound.AbstractEventParser$3.run(AbstractEventParser.java:177) at java.lang.Thread.run(Thread.java:748) Caused by: java.net.UnknownHostException: bogon: Name or service not known at java.net.Inet4AddressImpl.lookupAllHostAddr(Native Method) at java.net.InetAddress$2.lookupAllHostAddr(InetAddress.java:928) at java.net.InetAddress.getAddressesFromNameService(InetAddress.java:1323) at java.net.InetAddress.getLocalHost(InetAddress.java:1500) ... 5 more ] 2021-02-18 09:42:57.020 [destination = test , address = /10.136.0.92:3306 , EventParser] ERROR c.a.o.c.p.inbound.mysql.rds.RdsBinlogEventParserProxy - parse events has an error com.alibaba.otter.canal.parse.exception.CanalParseException: illegal connection is null

原提问者GitHub用户ghost

展开
收起
山海行 2023-04-27 18:54:26 214 0
1 条回答
写回答
取消 提交回答
  • 这个一般是hosts文件配置的问题,这个解法可以参考下:http://47.98.150.183/topic/12/canal%E5%90%AF%E5%8A%A8%E6%8A%A5%E9%94%99java-net-unknownhostexception-xxx-name-or-service-not-known

    原回答者GitHub用户KaimingWan

    2023-04-28 13:46:28
    赞同 展开评论 打赏
问答排行榜
最热
最新

相关电子书

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