开发者社区> 问答> 正文

为什么操作bucket就会出现错误,初始化连接未出现错误,求助热心人


Exception in thread "main" com.aliyun.oss.ClientException: mypic2.oss-cn-hangzhou-internal.aliyuncs.com
[ErrorCode]: UnknownHost
[RequestId]: Unknown
    at com.aliyun.oss.common.utils.ExceptionFactory.createNetworkException(ExceptionFactory.java:65)
    at com.aliyun.oss.common.comm.DefaultServiceClient.sendRequestCore(DefaultServiceClient.java:62)
    at com.aliyun.oss.common.comm.ServiceClient.sendRequestImpl(ServiceClient.java:126)
    at com.aliyun.oss.common.comm.ServiceClient.sendRequest(ServiceClient.java:72)
    at com.aliyun.oss.internal.OSSOperation.send(OSSOperation.java:92)
    at com.aliyun.oss.internal.OSSOperation.doOperation(OSSOperation.java:133)
    at com.aliyun.oss.internal.OSSOperation.doOperation(OSSOperation.java:111)
    at com.aliyun.oss.internal.OSSBucketOperation.listObjects(OSSBucketOperation.java:323)
    at com.aliyun.oss.OSSClient.listObjects(OSSClient.java:388)
    at com.aliyun.oss.OSSClient.listObjects(OSSClient.java:376)
    at UploadPartCopySample.main(UploadPartCopySample.java:55)
Caused by: java.net.UnknownHostException: mypic2.oss-cn-hangzhou-internal.aliyuncs.com
    at java.net.InetAddress.getAllByName0(InetAddress.java:1156)
    at java.net.InetAddress.getAllByName(InetAddress.java:1082)
    at java.net.InetAddress.getAllByName(InetAddress.java:1018)
    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)
    

展开
收起
枫情轩缘 2015-08-04 16:51:45 11725 0
3 条回答
写回答
取消 提交回答
  • 您好,您这个问题解决了吗?可以请教一下吗?我也遇到了[ErrorCode]: UnknownHost [RequestId]: Unknown这个错误

    2020-06-30 10:03:22
    赞同 展开评论 打赏
  • Re为什么操作bucket就会出现错误,初始化连接未出现错误,求助热心人
    mypic2.oss-cn-hangzhou-internal.aliyuncs.com是内网地址,
    2015-08-05 17:38:46
    赞同 展开评论 打赏
  • 先ping下mypic2.oss-cn-hangzhou-internal.aliyuncs.com 看是否能通?
    因为这是一个杭州的ECS才能访问的域名,如果在其他环境可能就不通了。
    2015-08-05 14:31:18
    赞同 展开评论 打赏
问答分类:
问答地址:
问答排行榜
最热
最新

相关电子书

更多
面向失败设计 立即下载
低代码开发师(初级)实战教程 立即下载
阿里巴巴DevOps 最佳实践手册 立即下载

相关实验场景

更多