java.net.SocketException:软件导致连接中止:recv失败,java.net.SocketException:连接重置 [英] java.net.SocketException: Software caused connection abort: recv failed, with java.net.SocketException: Connection reset

查看:348
本文介绍了java.net.SocketException:软件导致连接中止:recv失败,java.net.SocketException:连接重置的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我在Netbeans IDE中的Java,Hibernate,MySQL项目中遇到异常。

I'm getting an exception in my Java, Hibernate, MySQL project within Netbeans IDE.

我已经做了一些挖掘尝试修复这个奇怪的Socket异常,无济于事。

I've done some digging to try and fix this strange Socket exception, to no avail.

一些论坛解决方案建议为Hibernate实现一个c3p0连接池。没有修复。

Some forum solutions suggested implementing a c3p0 connection pool for Hibernate. No fix.

其他人建议禁用AV和防火墙(!!),因为这些可能会干扰套接字连接。没有修复。

Others suggested disabling AV and firewall (!!) as these could interfere with the socket connection. No fix.

我用Hibernate标记了这个问题,因为我不确定hibernate是什么原因,但Hibernate调用会出现异常(运行一个查询)。应用程序中的其他Hibernate代码工作正常。 Hibernate版本是3.2。

I've tagged this question with Hibernate, as I'm not certain that hibernate is the cause, but the exceptions occur on a Hibernate call (running a query). Other Hibernate code in the app works fine. The Hibernate version is 3.2 .

例外:

NotifyUtil::java.net.SocketException: Software caused connection abort: recv failed
at java.net.SocketInputStream.socketRead0(Native Method)
at java.net.SocketInputStream.read(SocketInputStream.java:129)
at java.io.BufferedInputStream.fill(BufferedInputStream.java:218)
at java.io.BufferedInputStream.read1(BufferedInputStream.java:258)
at java.io.BufferedInputStream.read(BufferedInputStream.java:317)
at java.io.FilterInputStream.read(FilterInputStream.java:116)
at     sun.net.www.protocol.http.HttpURLConnection$HttpInputStream.read(HttpURLConnection.java:2676)
at sun.nio.cs.StreamDecoder.readBytes(StreamDecoder.java:264)
at sun.nio.cs.StreamDecoder.implRead(StreamDecoder.java:306)
at sun.nio.cs.StreamDecoder.read(StreamDecoder.java:158)
at java.io.InputStreamReader.read(InputStreamReader.java:167)
at java.io.BufferedReader.fill(BufferedReader.java:136)
at java.io.BufferedReader.readLine(BufferedReader.java:299)
at java.io.BufferedReader.readLine(BufferedReader.java:362)
at org.netbeans.modules.web.monitor.server.NotifyUtil$RecordSender.run(NotifyUtil.java:299)

此异常可能发生一次或几次,后面跟着没有或几个异常:

This exception may occur once, or a few times, and be followed by none or a few of this exception:

NotifyUtil::java.net.SocketException: Connection reset
at java.net.SocketInputStream.read(SocketInputStream.java:168)
at java.io.BufferedInputStream.fill(BufferedInputStream.java:218)
at java.io.BufferedInputStream.read1(BufferedInputStream.java:258)
at java.io.BufferedInputStream.read(BufferedInputStream.java:317)
at java.io.FilterInputStream.read(FilterInputStream.java:116)
at sun.net.www.protocol.http.HttpURLConnection$HttpInputStream.read(HttpURLConnection.java:2676)
at sun.nio.cs.StreamDecoder.readBytes(StreamDecoder.java:264)
at sun.nio.cs.StreamDecoder.implRead(StreamDecoder.java:306)
at sun.nio.cs.StreamDecoder.read(StreamDecoder.java:158)
at java.io.InputStreamReader.read(InputStreamReader.java:167)
at java.io.BufferedReader.fill(BufferedReader.java:136)
at java.io.BufferedReader.readLine(BufferedReader.java:299)
at java.io.BufferedReader.readLine(BufferedReader.java:362)
at org.netbeans.modules.web.monitor.server.NotifyUtil$RecordSender.run(NotifyUtil.java:299)

非常感谢帮助。这有点奇怪。

Help would be much appreciated. This is a bit of a strange one.

谢谢。

推荐答案

有关于此的Microsoft知识库文章,请查看是否可以找到它。基本上,这是由获得异常的对等体写入网络的先前错误的结果。表示网络问题而不是软件。

There's a Microsoft Knowledge Base article about this, see if you can find it. Basically this is a result of prior errors writing to the network by the peer that gets the exception. Indicates a network problem rather than software.

这篇关于java.net.SocketException:软件导致连接中止:recv失败,java.net.SocketException:连接重置的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
相关文章
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆