VirtualBox(Hortonworks 沙盒)中 Nifi GetHttp 处理器 运行 中的 UnknownHostException
UnknownHostException in Nifi GetHttp processor running inside VirtualBox (Hortonworks Sandbox)
我正在尝试从以下 URL 获取数据:
http://webservices.nextbus.com/service/publicXMLFeed?command=vehicleLocations&a=sf-muni&r=M&t=0
我已将 Nifi(即 Oracle VirtualBox 上的 运行)GetHttp 处理器 URL 属性 配置为上述 URL,但是我收到以下异常:
Caused by: java.net.UnknownHostException: webservices.nextbus.com
at java.net.InetAddress.getAllByName0(InetAddress.java:1280) ~[na:1.8.0_111]
at java.net.InetAddress.getAllByName(InetAddress.java:1192) ~[na:1.8.0_111]
at java.net.InetAddress.getAllByName(InetAddress.java:1126) ~[na:1.8.0_111]
我在 VM 和主机上都使用了以下命令。
nslookup webservices.nextbus.com
VM 和主机上的输出如下:
Non-authoritative answer:
Name: 4yu7q.x.incapdns.net
Address: 192.230.77.86
Aliases: webservices.nextbus.com
我正在使用 Google DNS(在 /etc/resolv.conf 中我有以下内容)
nameserver 8.8.8.8
Ping webservices.nextbus.com 也成功
ping webservices.nextbus.com
Pinging 4yu7q.x.incapdns.net [192.230.77.86] with 32 bytes of data:
Reply from 192.230.77.86: bytes=32 time=15ms TTL=56
Reply from 192.230.77.86: bytes=32 time=14ms TTL=56
UnknownHostException 的可能原因是什么以及如何修复它?
DNS 更改未从 resolv.conf 文件中提取。重启 NiFi 解决了这个问题。
我正在尝试从以下 URL 获取数据: http://webservices.nextbus.com/service/publicXMLFeed?command=vehicleLocations&a=sf-muni&r=M&t=0
我已将 Nifi(即 Oracle VirtualBox 上的 运行)GetHttp 处理器 URL 属性 配置为上述 URL,但是我收到以下异常:
Caused by: java.net.UnknownHostException: webservices.nextbus.com
at java.net.InetAddress.getAllByName0(InetAddress.java:1280) ~[na:1.8.0_111]
at java.net.InetAddress.getAllByName(InetAddress.java:1192) ~[na:1.8.0_111]
at java.net.InetAddress.getAllByName(InetAddress.java:1126) ~[na:1.8.0_111]
我在 VM 和主机上都使用了以下命令。
nslookup webservices.nextbus.com
VM 和主机上的输出如下:
Non-authoritative answer:
Name: 4yu7q.x.incapdns.net
Address: 192.230.77.86
Aliases: webservices.nextbus.com
我正在使用 Google DNS(在 /etc/resolv.conf 中我有以下内容)
nameserver 8.8.8.8
Ping webservices.nextbus.com 也成功
ping webservices.nextbus.com
Pinging 4yu7q.x.incapdns.net [192.230.77.86] with 32 bytes of data:
Reply from 192.230.77.86: bytes=32 time=15ms TTL=56
Reply from 192.230.77.86: bytes=32 time=14ms TTL=56
UnknownHostException 的可能原因是什么以及如何修复它?
DNS 更改未从 resolv.conf 文件中提取。重启 NiFi 解决了这个问题。