• java.net.UnknownHostException: you.hai.com


    1、错误描述

    信息: Server startup in 14654 ms
    java.net.UnknownHostException: you.hai.com
    	at java.net.Inet6AddressImpl.lookupAllHostAddr(Native Method)
    	at java.net.InetAddress$1.lookupAllHostAddr(InetAddress.java:901)
    	at java.net.InetAddress.getAddressesFromNameService(InetAddress.java:1295)
    	at java.net.InetAddress.getAllByName0(InetAddress.java:1248)
    	at java.net.InetAddress.getAllByName(InetAddress.java:1164)
    	at java.net.InetAddress.getAllByName(InetAddress.java:1098)
    	at org.apache.http.impl.conn.SystemDefaultDnsResolver.resolve(SystemDefaultDnsResolver.java:45)
    	at org.apache.http.impl.conn.DefaultClientConnectionOperator.resolveHostname(DefaultClientConnectionOperator.java:259)
    	at org.apache.http.impl.conn.DefaultClientConnectionOperator.openConnection(DefaultClientConnectionOperator.java:159)
    	at org.apache.http.impl.conn.ManagedClientConnectionImpl.open(ManagedClientConnectionImpl.java:304)
    	at org.apache.http.impl.client.DefaultRequestDirector.tryConnect(DefaultRequestDirector.java:611)
    	at org.apache.http.impl.client.DefaultRequestDirector.execute(DefaultRequestDirector.java:446)
    	at org.apache.http.impl.client.AbstractHttpClient.doExecute(AbstractHttpClient.java:882)
    	at org.apache.http.impl.client.CloseableHttpClient.execute(CloseableHttpClient.java:82)
    
    	at org.apache.http.impl.client.CloseableHttpClient.execute(CloseableHttpClient.java:107)
    	at org.apache.http.impl.client.CloseableHttpClient.execute(CloseableHttpClient.java:55)
    	at core.util.MesHTTPClient.exeHttp(MesHTTPClient.java:186)
    	at core.util.MesHTTPClient.exeHttpGet(MesHTTPClient.java:119)

    2、错误原因

            未知的主机域名异常,导致报错


    3、解决办法

    (1)修正主机域名

    (2)以对应的IP进行访问地址

  • 相关阅读:
    c++异常处理
    循环数比较
    交错01串
    六一儿童节
    独立的小易
    牛客网上的最后一位
    微微信.NET 为什么採用文件系统而不是数据库?
    Ugly Numbers(1.5.8)
    xcode6-beta下载
    接收socket数据的粘包处理
  • 原文地址:https://www.cnblogs.com/hzcya1995/p/13313966.html
Copyright © 2020-2023  润新知