burakturk1994 / ksoap2-android

Automatically exported from code.google.com/p/ksoap2-android
0 stars 0 forks source link

I/O error during system call, Connection reset by peer #212

Open GoogleCodeExporter opened 8 years ago

GoogleCodeExporter commented 8 years ago
What steps will reproduce the problem?
1.While Using 2G (Pocket Data)
2.Its a obvious struggle in earlier android OS say Ginger Bread
3.With WiFI its working 100% fine

What is the expected output? What do you see instead?

We have been successfully fetching data from a web server with HTTP url for 
almost 2 years without any hiccups.

In recent past we have migrated to HTTPS for some security reason.And that's 
when the problem blossomed.

With WiFi everything works fine,When I connect to 2G pocket data periodically 
I'm getting connection reset by server issue.

I'm using DefaultHttpClient to connect to the server.

What version of the product are you using? On what operating system?
With all version of android OS i could able to reproduce this but only with 
slow network connection.

Please provide any additional information below.

I have tried many work around but nothing rescued me.

javax.net.ssl.SSLException: Read error: ssl=0x56e63588: I/O error during system 
call, Connection reset by peer

I have applied all the available properties to HttpConnectionParams

HttpConnectionParams.setConnectionTimeout(httpClient.getParams(),120000);
HttpConnectionParams.setSoTimeout(httpClient.getParams(), 120000);
HttpConnectionParams.setLinger(httpClient.getParams(), 120000);
HttpConnectionParams.setTcpNoDelay(httpClient.getParams(), true);
HttpConnectionParams.setStaleCheckingEnabled(httpClient.getParams(),
        false);

And another google group discussion suggested that this issue could be a cause 
of ideal state of an activity.So I implemented something like this to keep the 
screen awake.

powerManager = (PowerManager) getSystemService(Context.POWER_SERVICE);
    wakeLock = powerManager.newWakeLock(PowerManager.FULL_WAKE_LOCK,"My Tag");
    wakeLock.acquire();

And At the onDestroy() I released it with wakeLock.release();

But that too didn't help.

And is there is anything else I need to check at server end?

Original issue reported on code.google.com by smohanra...@gmail.com on 31 Mar 2015 at 5:21

GoogleCodeExporter commented 8 years ago
The project is migrating to github. If you believe this issue is still valid 
and should be tracked please file a new issue at 
https://github.com/simpligility/ksoap2-android/issues

Original comment by mosa...@gmail.com on 7 Aug 2015 at 5:35