对象存储服务 OBS-其他高频问题汇总(Java SDK):UnknownHostException域名无法解析异常

时间:2024-11-06 21:55:01

UnknownHostException 域名 无法解析异常

1
2
3
4
Caused by: java.net.UnknownHostException: bucketname.unknowndomain.com
	at java.net.Inet6AddressImpl.lookupAllHostAddr(Native Method)
	at java.net.InetAddress$1.lookupAllHostAddr(InetAddress.java:901)
	at java.net.InetAddress.getAddressesFromNameService(InetAddress.java:1293)

此类错误一般有两种原因:

  1. 初始化ObsClient时传入的Endpoint有误,解决方法:检查Endpoint,确保正确;
  2. DNS无法解析OBS服务域名,解决方法:联系OBS运维团队。
support.huaweicloud.com/sdk-java-devg-obs/obs_21_0302.html