启动日志正常,但是在收集日志中报 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
这个一般是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
版权声明:本文内容由阿里云实名注册用户自发贡献,版权归原作者所有,阿里云开发者社区不拥有其著作权,亦不承担相应法律责任。具体规则请查看《阿里云开发者社区用户服务协议》和《阿里云开发者社区知识产权保护指引》。如果您发现本社区中有涉嫌抄袭的内容,填写侵权投诉表单进行举报,一经查实,本社区将立刻删除涉嫌侵权内容。