Connection reset :

0 votes
Getting this error when trying to read from a socket. I'm doing a readInt() on that InputStream, and I am getting this error. Going through the documentation this suggests that the client part of the connection closed the connection. In this scenario, I am the server.

I have access to the client log files and it is not closing the connection, and also, its log files suggest I am closing the connection.

So does anybody have an idea why this is happening? What else to check for? Does this arise when there are local resources that are perhaps reaching thresholds?
May 30, 2018 in Java by Daisy
• 8,050 points

2 answers to this question.

0 votes

We had this problem with a SOA system written in Java. we were running both the client and the server on different machines and they worked fine for a long time, then those weird connection resets appeared in the client log and there was not anything strange in the server log. Restarting both client and server didn't solve the problem.

Finally, we discovered that the heap on the server side was rather full so we increased the memory available to the JVM: problem solved!

answered May 30, 2018 by parth295
• 4,620 points
0 votes

You should check whether the client program is finishing before server read the streams.

answered Sep 6, 2018 by Sushmita
• 6,880 points

Related Questions In Java

+1 vote
10 answers

How does Connection reset happen ?

You can use wireshark to view the ...READ MORE

answered Dec 7, 2018 in Java by tushh
0 votes
1 answer

How to resolve the in Java?

If you are getting, it means ...READ MORE

answered Jun 4, 2018 in Java by Akrati
• 3,150 points
+5 votes
3 answers

How to execute a python file with few arguments in java?

You can use Java Runtime.exec() to run python script, ...READ MORE

answered Mar 27, 2018 in Java by DragonLord999
• 8,380 points

edited Nov 6, 2018 by Omkar 8,209 views
+1 vote
3 answers

What is the syntax to declare and initialize an array in java?

You can use this method: String[] strs = ...READ MORE

answered Jul 25, 2018 in Java by samarth295
• 2,190 points
+1 vote
2 answers

How to use try & catch block in Java?

Hey @Jino, Using try catch block for your ...READ MORE

answered Dec 21, 2018 in Java by Nabarupa
0 votes
1 answer

What is ArrayIndexOutOfBoundsException ?

If You check System.out.print(names.length); you will get 3 ...READ MORE

answered May 11, 2018 in Java by sharth
• 3,320 points
0 votes
2 answers

How can I solve java.lang.NoClassDefFoundError in Java?

NoClassDefFoundError means that the class is present ...READ MORE

answered Sep 11, 2018 in Java by Sushmita
• 6,880 points
0 votes
1 answer

What is a StackOverflow Error

Parameters and local variables are allocated on ...READ MORE

answered May 21, 2018 in Java by parth295
• 4,620 points
0 votes
5 answers

How to compare Strings in Java?

String fooString1 = new String("foo"); String fooString2 = ...READ MORE

answered Jul 12, 2018 in Java by Daisy
• 8,050 points
0 votes
2 answers

How to round any number to n decimal places in Java?

new BigDecimal(String.valueOf(double)).setScale(yourScale, BigDecimal.ROUND_HALF_UP); will get you a BigDecimal. To ...READ MORE

answered Aug 26 in Java by Sirajul
• 25,700 points