Unexplained Timeouts (Netty 3.2.4.Final)
B.L. Zeebub
roger.varley at googlemail.com
Fri Aug 5 07:18:49 EDT 2011
Hi
I've got a Netty Client & Server which are configured for stayawake. The
client is built as
bootstrap.setPipelineFactory(new
ClientPipelineFactory(executor,timer,listener));
bootstrap.setOption("keepAlive", true);
// Make a new connection.
ChannelFuture future = bootstrap.connect(new InetSocketAddress(
host, 5956));
and the server us built with;
bootstrap.setPipelineFactory(new
ServerPipelineFactory(connectionManager));
bootstrap.setOption("child.tcpNoDelay", true);
bootstrap.setOption("child.keepAlive", true);
When I have both client & server running on localhost on a Windows box, the
connection remains open indefinitely.
However, I've now moved the server to a remote server running CentOS 5. Now,
the server side connection closes after approximately 20 minutes of
inactivity. However, the Netty Server doesn't seem to notice until it tries
to send something to the client after the closure event happens.
When the Netty server trys to send, I see an IOException Connection Reset by
Peer message and then the ChannelDisconnected event is fired. Even when this
happens the client does not receive any notification that the channel has
closed.
Two questions.
I'm assuming that the socket closure is being done by CentOS rather than
Netty? If so, does anyone with Centos (or general Linux) experience have any
idea what I should be looking for to find out why the socket is being
closed?
Secondly, why doesn't the client pickup on the fact that the server has
closed the channel - either at the point that the socket is actually closed
or at the point that the server notices? Do I need to do anything in the
server-side ChannelDisconnected event (at the moment I'm simply logging the
fact that it has been fired)?
--
View this message in context: http://netty-forums-and-mailing-lists.685743.n2.nabble.com/Unexplained-Timeouts-Netty-3-2-4-Final-tp6656144p6656144.html
Sent from the Netty User Group mailing list archive at Nabble.com.
More information about the netty-users
mailing list