详细解答可以参考官方帮助文档
报错:Connection to http://buname.oss-cn-hangzhou-internal.aliyuncs.com refused
[RequestId]: Unknown
at com.aliyun.oss.common.utils.ExceptionFactory.createNetworkException(ExceptionFactory.java:31)
at com.aliyun.oss.common.comm.DefaultServiceClient.sendRequestCore(DefaultServiceClient.java:57)
at com.aliyun.oss.common.comm.ServiceClient.sendRequestImpl(ServiceClient.java:191)
at com.aliyun.oss.common.comm.ServiceClient.sendRequest(ServiceClient.java:151)
at com.aliyun.oss.internal.OSSOperation.send(OSSOperation.java:71)
at com.aliyun.oss.internal.OSSObjectOperation.putObject(OSSObjectOperation.java:92)
at com.aliyun.oss.OSSClient.putObject(OSSClient.java:394)
at osscs1.OSSPutObjectSample.uploadFile(OSSPutObjectSample.java:82)
at osscs1.OSSPutObjectSample.main(OSSPutObjectSample.java:46)
解决方法:
private static final String OSS_ENDPOINT = "http:// oss-cn-hangzhou.aliyuncs.com/";
OSSClient client = new OSSClient(OSS_ENDPOINT,ACCESS_ID, ACCESS_KEY);
如果问题还未能解决,请联系售后技术支持。
版权声明:本文内容由阿里云实名注册用户自发贡献,版权归原作者所有,阿里云开发者社区不拥有其著作权,亦不承担相应法律责任。具体规则请查看《阿里云开发者社区用户服务协议》和《阿里云开发者社区知识产权保护指引》。如果您发现本社区中有涉嫌抄袭的内容,填写侵权投诉表单进行举报,一经查实,本社区将立刻删除涉嫌侵权内容。