为什么会 远程主机强迫关闭了一个现有的连接

747 views
Skip to first unread message

niclau

unread,
Jun 6, 2010, 5:34:05 AM6/6/10
to hyk-proxy-discuss
java.io.IOException: 远程主机强迫关闭了一个现有的连接
之后要重新启动客户端才能打开网页。

日志如下:
1 fetch service is working.
Local Http Server Running...
at localhost:48100
2010-6-6 17:28:49 org.jboss.netty.channel.SimpleChannelUpstreamHandler
警告: EXCEPTION, please implement
com.hyk.proxy.client.application.gae.rpc.HttpC
lientRpcChannel$HttpResponseHandler.exceptionCaught() for proper
handling.
java.io.IOException: 远程主机强迫关闭了一个现有的连接。
at sun.nio.ch.SocketDispatcher.read0(Native Method)
at sun.nio.ch.SocketDispatcher.read(Unknown Source)
at sun.nio.ch.IOUtil.readIntoNativeBuffer(Unknown Source)
at sun.nio.ch.IOUtil.read(Unknown Source)
at sun.nio.ch.SocketChannelImpl.read(Unknown Source)
at
org.jboss.netty.buffer.HeapChannelBuffer.setBytes(HeapChannelBuffer.j
ava:156)
at
org.jboss.netty.buffer.AbstractChannelBuffer.writeBytes(AbstractChann
elBuffer.java:425)
at
org.jboss.netty.channel.socket.nio.NioWorker.read(NioWorker.java:305)

at
org.jboss.netty.channel.socket.nio.NioWorker.processSelectedKeys(NioW
orker.java:275)
at
org.jboss.netty.channel.socket.nio.NioWorker.run(NioWorker.java:196)
at
org.jboss.netty.util.internal.IoWorkerRunnable.run(IoWorkerRunnable.j
ava:46)
at
org.jboss.netty.handler.execution.MemoryAwareThreadPoolExecutor$Memor
yAwareRunnable.run(MemoryAwareThreadPoolExecutor.java:495)
at java.util.concurrent.ThreadPoolExecutor
$Worker.runTask(Unknown Source
)
at java.util.concurrent.ThreadPoolExecutor$Worker.run(Unknown
Source)
at java.lang.Thread.run(Unknown Source)
2010-6-6 17:29:45 org.jboss.netty.channel.SimpleChannelUpstreamHandler
警告: EXCEPTION, please implement
com.hyk.proxy.client.application.gae.rpc.HttpC
lientRpcChannel$HttpResponseHandler.exceptionCaught() for proper
handling.
java.io.IOException: 远程主机强迫关闭了一个现有的连接。
at sun.nio.ch.SocketDispatcher.read0(Native Method)
at sun.nio.ch.SocketDispatcher.read(Unknown Source)
at sun.nio.ch.IOUtil.readIntoNativeBuffer(Unknown Source)
at sun.nio.ch.IOUtil.read(Unknown Source)
at sun.nio.ch.SocketChannelImpl.read(Unknown Source)
at
org.jboss.netty.buffer.HeapChannelBuffer.setBytes(HeapChannelBuffer.j
ava:156)
at
org.jboss.netty.buffer.AbstractChannelBuffer.writeBytes(AbstractChann
elBuffer.java:425)
at
org.jboss.netty.channel.socket.nio.NioWorker.read(NioWorker.java:305)

at
org.jboss.netty.channel.socket.nio.NioWorker.processSelectedKeys(NioW
orker.java:275)
at
org.jboss.netty.channel.socket.nio.NioWorker.run(NioWorker.java:196)
at
org.jboss.netty.util.internal.IoWorkerRunnable.run(IoWorkerRunnable.j
ava:46)
at
org.jboss.netty.handler.execution.MemoryAwareThreadPoolExecutor$Memor
yAwareRunnable.run(MemoryAwareThreadPoolExecutor.java:495)
at java.util.concurrent.ThreadPoolExecutor
$Worker.runTask(Unknown Source
)
at java.util.concurrent.ThreadPoolExecutor$Worker.run(Unknown
Source)
at java.lang.Thread.run(Unknown Source)
2010-06-06 17:30:48,921 ERROR
[com.hyk.proxy.client.application.gae.event.Google
AppEngineHttpProxyEventService.callBack(GoogleAppEngineHttpProxyEventService.jav
a:376)] - Encounter error for request:http://twitter.com/Lockestek?
max_id=155379
15444&page=2&twttr=true&authenticity_token=9b7f5fc88e435f9f2f502e566b8edfab2d222
8cf
com.hyk.rpc.core.Rpctimeout:
at com.hyk.rpc.core.session.Session
$SessionTimeoutTask.run(Session.java:
233)
at com.hyk.timer.standard.StandardTimer
$1.run(StandardTimer.java:34)
at java.util.TimerThread.mainLoop(Unknown Source)
at java.util.TimerThread.run(Unknown Source)

yinqiwen

unread,
Jun 6, 2010, 5:57:05 AM6/6/10
to hyk-...@googlegroups.com
这个只是现象,而不是起因,和“重新启动客户端才能打开网页”没有任何关系

估计和网络中断相关,具体原因参看http://groups.google.com/group/hyk-proxy/browse_thread/thread/59d6df879f8829a
--
yinqiwen(隐其闻)

niclau

unread,
Jun 6, 2010, 6:13:18 AM6/6/10
to hyk-proxy-discuss
谢谢回答。但我的宽带连接此过程中没有断开。我也一直在浏览网页/WEBQQ,电脑没休眠。

niclau

unread,
Jun 6, 2010, 6:15:35 AM6/6/10
to hyk-proxy-discuss
哦。。原来是长时间不通信,appengine会主动断开。

On 6月6日, 下午6时13分, niclau <titanium98...@gmail.com> wrote:
> 谢谢回答。但我的宽带连接此过程中没有断开。我也一直在浏览网页/WEBQQ,电脑没休眠。

yinqiwen

unread,
Jun 6, 2010, 6:22:52 AM6/6/10
to hyk-...@googlegroups.com
不过这种这种正常断开是不影响hyk-proxy的运行的
另外一个可以把配置文件中threadPoolSize的大小改成50试一下,线程不够的情况下也有这个现象

在 2010年6月6日 下午6:15,niclau <titani...@gmail.com>写道:



--
yinqiwen(隐其闻)

niclau

unread,
Jun 8, 2010, 12:07:38 AM6/8/10
to hyk-proxy-discuss
发现用gui版,程序容易自动关闭。
201005301708

yinqiwen

unread,
Jun 8, 2010, 12:32:40 AM6/8/10
to hyk-...@googlegroups.com
这个理论上没有可能,GUI和CLI的在启动后运行的代码是一样的

在 2010年6月8日 下午12:07,niclau <titani...@gmail.com>写道:
发现用gui版,程序容易自动关闭。
201005301708



--
yinqiwen(隐其闻)

ym

unread,
Jun 8, 2010, 12:52:28 AM6/8/10
to hyk-...@googlegroups.com
我star.bat,有时也出现"远程主机强迫关闭了一个现有的连接"的提示,有什么解决办法吗

yinqiwen

unread,
Jun 8, 2010, 1:31:56 AM6/8/10
to hyk-...@googlegroups.com
为什么要解决呢?
因为是长连接机制,这个只是显示某个连接不是正常关闭;hyk-proxy-client会自动重连的
--
yinqiwen(隐其闻)
Reply all
Reply to author
Forward
0 new messages