已解决 canal启动报错java.net.UnknownHostException: xxx: Name or service not known
-
启动的时候有如下报错
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
-
您好,这个一般是由于您的host文件中的设置有问题会有类似的报错。可以按照如下步骤确认您的linux系统配置
### 1. 检查您/etc/hostname中的内容 cat /etc/hostname ### 2. 检查第一步获取的hostname在您的/etc/hosts文件中是否配置了正确的解析 cat /etc/hosts
-
您好,这个一般是由于您的host文件中的设置有问题会有类似的报错。可以按照如下步骤确认您的linux系统配置
### 1. 检查您/etc/hostname中的内容 cat /etc/hostname ### 2. 检查第一步获取的hostname在您的/etc/hosts文件中是否配置了正确的解析 cat /etc/hosts
Copyright © 2020 ClouGence, Inc.备案号:浙ICP备20007605号-2