Android 改装ssl=0x717f870208:系统调用期间发生I/O错误,对等方重置连接

Android 改装ssl=0x717f870208:系统调用期间发生I/O错误,对等方重置连接,android,android-studio,ssl-certificate,retrofit,Android,Android Studio,Ssl Certificate,Retrofit,我的代码工作正常,从服务器接收到数据,但突然出现了以下错误: javax.net.ssl.SSLException:读取错误:ssl=0x717c368708:系统调用期间发生I/O错误,对等方重置连接 有时我也会犯这样的错误: com.google.gson.stream.MalformedJsonException: Use JsonReader.setLenient(true) to accept malformed JSON at line 1 column 1 path $ 我正在

我的代码工作正常,从服务器接收到数据,但突然出现了以下错误:

javax.net.ssl.SSLException:读取错误:ssl=0x717c368708:系统调用期间发生I/O错误,对等方重置连接

有时我也会犯这样的错误:

com.google.gson.stream.MalformedJsonException: 
Use JsonReader.setLenient(true) to accept malformed JSON at line 1 column 1 path $
我正在使用改装

implementation 'com.squareup.retrofit2:retrofit:2.0.0-beta4'
implementation 'com.squareup.retrofit2:converter-gson:2.0.0-beta4' 
这是它的初始化

 Retrofit retrofit = new Retrofit.Builder().baseUrl(baseUrl).
                addConverterFactory(GsonConverterFactory.create()).build();
 Api api = retrofit.create(Api.class);
 Call<ProfileResult> profileCallBack = api.getProfileData();
reformation-reformation=new-reformation.Builder().baseUrl(baseUrl)。
addConverterFactory(GsonConverterFactory.create()).build();
Api=改装.create(Api.class);
Call profileCallBack=api.getProfileData();

我发现问题出在我的ISP上,它将我重定向到他们的网站,以显示有关互联网消费的消息,并卡在重定向中,当我使用数据或不同的WiFi运行应用程序时,它工作正常

对等方重置连接
听起来像是服务器关闭了您的连接。你的问题没有包含足够的信息来猜测原因
MalformedJsonException
听起来像是它发送了一些错误的json。再一次,你的问题没有包含足够的信息。我发现问题出在我的ISP上,它将我重定向到他们的网站,以显示有关互联网消费的消息,并卡在重定向中,当我使用数据或不同的WiFi运行应用程序时,它工作正常@greeble31@greeble31您认为我(用户)和服务器之间的握手是在发生此错误之前建立的吗?我正在尝试在stackoverflow上找到的所有东西来解决我的问题(
CertPathValidatorException:Trust anchor for certificate path not found
),现在我收到了这个错误(
javax.net.ssl.SSLException:Read error:ssl=0x717c368708:system调用期间的I/O错误,对等方重置连接
)我不知道是我让事情变得更糟还是解决了我的一部分问题。谢谢大家!@AndreiManolache调试SSL问题可能相当复杂,如果目前的答案对您不起作用,您应该针对您的具体情况发布一个新问题。这肯定会给你指明正确的方向。@AndreiManolache也检查一下这个问题,它可能会有帮助!