Java InetAddress.getByName因系统错误而间歇性失败

Java InetAddress.getByName因系统错误而间歇性失败,java,nslookup,Java,Nslookup,我有一些代码使用InetAddress.getByName。我间歇性地得到一个未知后异常: java.net.UnknownHostException: google.com: System error at java.net.Inet6AddressImpl.lookupAllHostAddr(Native Method) at java.net.InetAddress$1.lookupAllHostAddr(InetAddress.java:901) at java.

我有一些代码使用
InetAddress.getByName
。我间歇性地得到一个
未知后异常

java.net.UnknownHostException: google.com: System error
    at java.net.Inet6AddressImpl.lookupAllHostAddr(Native Method)
    at java.net.InetAddress$1.lookupAllHostAddr(InetAddress.java:901)
    at java.net.InetAddress.getAddressesFromNameService(InetAddress.java:1293)
    at java.net.InetAddress.getAllByName0(InetAddress.java:1246)
    at java.net.InetAddress.getAllByName(InetAddress.java:1162)
    at java.net.InetAddress.getAllByName(InetAddress.java:1098)
    at java.net.InetAddress.getByName(InetAddress.java:1048)
执行
nslookup google.com
工作正常,故障本身只是偶尔发生。这可能是什么原因造成的?

试着看看

抛出: UnknownHostException-如果找不到主机的IP地址,或者如果为全局IPv6地址指定了作用域id