Friday, February 7, 2014

Android network communication error Connection Reset By Peers


            
Server using SSH, Android received a request sent by the client.
When Android using WIFI, Unicom 3G, both send and receive normal Telecom 3G, the client can receive the server response data

But after using the China Mobile on the question is:
Data can be sent to the server, but the client can not receive the response data on the server side, the error Conneciton Reset By Peers.

Android side is beginning to suspect a problem, the use of several types of network connections to achieve were not resolved.
Then test the client to connect to other sites such as Baidu, both return successfully (in mobile networks), but access to my own server returns an error.

So there may well be a problem with the server configuration, there is no one to know?
Reply:
This is generally a resource server IO is not closed, to check the file operations.
Reply:
cited a floor birdsaction reply:
this is generally a resource server IO is not closed, to check the file operations.


The server returns the code below:
 

private void setResponse (HttpServletResponse res, String msg) {
try {

res.setHeader (HTTP_PARAM_RESPONSE, URLEncoder.encode (msg, "UTF-8"));
} Catch (Exception e) {
System.out.println ("transcoding error return value when writing!");
e.printStackTrace ();
}
}



Such a problem you tried res.flush ();? Still does not work, hope to guide!
Reply:
Recommended to check whether the server has not closed the file IO operations.
Reply:
The landlord did not solve, I have encountered similar problems. The 2G mobile network is not normal. That put the URL in your phone's browser tried it found wifi can be opened with 2g network would not open. I think it is moving on some websites blocked.
Reply:
references, 4th Floor BBLD_ reply:
resolve landlord did not, I have encountered similar problems. The 2G mobile network is not normal. That put the URL in your phone's browser tried it found wifi can be opened with 2g network would not open. I think it is moving on some websites blocked.


Not to get rid of.
Shielding problems should not be moved.
Test: In mobile networks, ordinary browser, Chrome were unable to open the server request address, but UC Web can
.
I think it is a problem with the server configuration. Still under study, mad to
Did you solve?
Reply:
references, 5th Floor doudoubeer reply:
Quote: references to the 4th floor BBLD_ reply:

The landlord did not solve, I have encountered similar problems. The 2G mobile network is not normal. That put the URL in your phone's browser tried it found wifi can be opened with 2g network would not open. I think it is moving on some websites blocked.


Not to get rid of.
Shielding problems should not be moved.
Test: In mobile networks, ordinary browser, Chrome were unable to open the server request address, but UC Web can
.
I think it is a problem with the server configuration. Still under study, mad to
Did you solve?


references, 5th Floor doudoubeer reply:
Quote: references to the 4th floor BBLD_ reply:

The landlord did not solve, I have encountered similar problems. The 2G mobile network is not normal. That put the URL in your phone's browser tried it found wifi can be opened with 2g network would not open. I think it is moving on some websites blocked.


Not to get rid of.
Shielding problems should not be moved.
Test: In mobile networks, ordinary browser, Chrome were unable to open the server request address, but UC Web can
.
I think it is a problem with the server configuration. Still under study, mad to
Did you solve?


Landlord facie this: http://dev.10086.cn/cmdn/wiki/index.php?doc-view-5454.html
My question to you is somewhat different reasons, or reasons for moving the shield web server is possible, at present I do not know how to solve.
Reply:
Has been resolved. My own network is a problem ~

Network:
PC -> Route A -> Route B -> Telecom Routing -> Internet
It is said that mobile Internet has gateways, mobile environment is as follows:
Mobile -> Mobile Gateway -> XX Gateway Routing -> Internet
Then I used the binding domain tools, mapping from the PC directly to a static URL, so use the 2G network access, should be forwarded too many layers, not directly to the source IP of the reason, that there is no specific mobile response directly to the request broken up (by the way, move TM sick ah)

Test methods:
Direct dial Internet using a PC, so PC can get to the real IP addresses can be accessed from anywhere on the Internet. Using the mobile network to access the IP successfully!

Next will need to address the problem of dynamic binding domain, another tool, or have to spend money to buy it directly connected IP servers, sigh

No comments:

Post a Comment