首页 > 其他分享 >android 访问域名接口报错

android 访问域名接口报错

时间:2023-03-06 16:57:08浏览次数:51  
标签:springboot ssl 域名 报错 版本 error android net

1. 移动端访问https域名及接口,显示

java.net.UnknownHostException: Unable to resolve host  "xxx" : No address associated with hostname

2. 使用okhttp访问的接口,于是设定忽略证书,报错

javax.net.ssl.SSLException: Write error: ssl=xxx: I/O error during system call, Connection reset by peer

3. 怀疑是忽略证书的写法出了问题,于是又调整了忽略的写法

然后还是报错

javax.net.ssl.SSLException: Write error: ssl=xxx: I/O error during system call, Broken pipe

此时后端报错为:

Bad Request: Failed to parse multipart servlet request; nested exception is java.io.IOException: org.apache.tomcat.util.http.fileupload
.impl.IOFileUploadException: Processing of multipart/form-data request failed. Stream ended unexpectedly

4.查了一下百度,发现有人说是后端的tomcat版本的问题,而且我正在使用的版本正好是9.0.31(springboot 2.2.5.RELEASE)

于是升级版本,由于我是springboot内嵌的tomcat,所以升级了springboot的版本

 <parent>
        <groupId>org.springframework.boot</groupId>
        <artifactId>spring-boot-starter-parent</artifactId>
        <version> 2.2.13.RELEASE</version>
        <relativePath/>
    </parent>

  

升级版本后,验证正常

标签:springboot,ssl,域名,报错,版本,error,android,net
From: https://www.cnblogs.com/uoky/p/17184466.html

相关文章