ailiyun上传报错:com.aliyuncs.exceptions.ClientException: SDK.ServerUnreachable

17 篇文章 0 订阅

获取ailiyun图片上传报错:

2018-05-10  18:48:00.601 [http-nio-8080-exec-2] INFO  org.apache.http.impl.execchain.RetryExec - Retrying request to {s}->https://sts.aliyuncs.com:443
2018-05-10  18:48:00.602 [http-nio-8080-exec-2] DEBUG org.apache.http.client.protocol.RequestAddCookies - CookieSpec selected: default
2018-05-10  18:48:00.602 [http-nio-8080-exec-2] DEBUG org.apache.http.client.protocol.RequestAuthCache - Auth cache not set in the context
2018-05-10  18:48:00.602 [http-nio-8080-exec-2] DEBUG org.apache.http.impl.conn.PoolingHttpClientConnectionManager - Connection request: [route: {s}->https://sts.aliyuncs.com:443][total kept alive: 0; route allocated: 0 of 5; total allocated: 0 of 64]
2018-05-10  18:48:00.602 [http-nio-8080-exec-2] DEBUG org.apache.http.impl.conn.PoolingHttpClientConnectionManager - Connection leased: [id: 14][route: {s}->https://sts.aliyuncs.com:443][total kept alive: 0; route allocated: 1 of 5; total allocated: 1 of 64]
2018-05-10  18:48:00.602 [http-nio-8080-exec-2] DEBUG org.apache.http.impl.execchain.MainClientExec - Opening connection {s}->https://sts.aliyuncs.com:443
2018-05-10  18:48:00.602 [http-nio-8080-exec-2] DEBUG org.apache.http.impl.conn.DefaultManagedHttpClientConnection - http-outgoing-14: Shutdown connection
2018-05-10  18:48:00.602 [http-nio-8080-exec-2] DEBUG org.apache.http.impl.execchain.MainClientExec - Connection discarded
2018-05-10  18:48:00.602 [http-nio-8080-exec-2] DEBUG org.apache.http.impl.conn.DefaultManagedHttpClientConnection - http-outgoing-14: Close connection
2018-05-10  18:48:00.603 [http-nio-8080-exec-2] DEBUG org.apache.http.impl.conn.PoolingHttpClientConnectionManager - Connection released: [id: 14][route: {s}->https://sts.aliyuncs.com:443][total kept alive: 0; route allocated: 0 of 5; total allocated: 0 of 64]
2018-05-10  18:48:00.603 [http-nio-8080-exec-2] INFO  org.apache.http.impl.execchain.RetryExec - I/O exception (org.apache.http.conn.UnsupportedSchemeException) caught when processing request to {s}->https://sts.aliyuncs.com:443: https protocol is not supported
2018-05-10  18:48:00.603 [http-nio-8080-exec-2] DEBUG org.apache.http.impl.execchain.RetryExec - https protocol is not supported
org.apache.http.conn.UnsupportedSchemeException: https protocol is not supported
at org.apache.http.impl.conn.DefaultHttpClientConnectionOperator.connect(DefaultHttpClientConnectionOperator.java:108)
at org.apache.http.impl.conn.PoolingHttpClientConnectionManager.connect(PoolingHttpClientConnectionManager.java:353)
at org.apache.http.impl.execchain.MainClientExec.establishRoute(MainClientExec.java:380)
at org.apache.http.impl.execchain.MainClientExec.execute(MainClientExec.java:236)
at org.apache.http.impl.execchain.ProtocolExec.execute(ProtocolExec.java:184)
at org.apache.http.impl.execchain.RetryExec.execute(RetryExec.java:88)
at org.apache.http.impl.execchain.RedirectExec.execute(RedirectExec.java:110)
at org.apache.http.impl.client.InternalHttpClient.doExecute(InternalHttpClient.java:184)
at org.apache.http.impl.client.CloseableHttpClient.execute(CloseableHttpClient.java:82)
at org.apache.http.impl.client.CloseableHttpClient.execute(CloseableHttpClient.java:107)
at com.aliyuncs.http.clients.ApacheHttpClient.syncInvoke(ApacheHttpClient.java:243)

at com.aliyuncs.DefaultAcsClient.doAction(DefaultAcsClient.java:272)


com.aliyuncs.exceptions.ClientException: SDK.ServerUnreachable


原因:

之前的的JAR .

<dependency>
<groupId>com.aliyun.oss</groupId>
<artifactId>aliyun-sdk-oss</artifactId>
<version>2.8.1</version>
</dependency>

<dependency>

    <groupId>com.aliyun</groupId>
    <artifactId>aliyun-java-sdk-core</artifactId>
    <version>4.0.0</version>

  </dependency>

  <dependency>
    <groupId>com.aliyun</groupId>
    <artifactId>aliyun-java-sdk-dysmsapi</artifactId>
    <version>1.1.0</version>
  </dependency>

改为:

<dependency>
    <groupId>com.aliyun</groupId>
    <artifactId>aliyun-java-sdk-core</artifactId>
    <version>3.3.1</version>
  </dependency>

<dependency>
<groupId>com.aliyun.oss</groupId>
<artifactId>aliyun-sdk-oss</artifactId>
<version>2.8.3</version>
</dependency>

  <dependency>
    <groupId>com.aliyun</groupId>
    <artifactId>aliyun-java-sdk-dysmsapi</artifactId>
    <version>1.0.0</version>
  </dependency>

  • 0
    点赞
  • 0
    收藏
    觉得还不错? 一键收藏
  • 1
    评论

“相关推荐”对你有帮助么?

  • 非常没帮助
  • 没帮助
  • 一般
  • 有帮助
  • 非常有帮助
提交
评论 1
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值