Qian Ye commented on ZOOKEEPER-662:
I'm using the c client, and there is also a monitor process using "echo stat |
nc zookeeper 8181" every 20 seconds to get the status of the servers. If the
monitor process failed to get a valid reply, it would send a sms alarm to my
cell phone. When the problem happened, I received such an alarm. It said
connection refused. I haven't found the backlog for the client port in the
source code. If it used the default value 128, then so many CLOSE_WAIT states
would prevent the kernel from accepting new connection, right?
P.S. I cannot tell why the client keep reconnect with the same error, I will
take a look at it and append more information if I can find something.
> Too many CLOSE_WAIT socket state on a server
> Key: ZOOKEEPER-662
> URL: https://issues.apache.org/jira/browse/ZOOKEEPER-662
> Project: Zookeeper
> Issue Type: Bug
> Components: quorum
> Affects Versions: 3.2.1
> Environment: Linux 2.6.9
> Reporter: Qian Ye
> Fix For: 3.3.0
> Attachments: zookeeper.log.2010020105, zookeeper.log.2010020106
> I have a zookeeper cluster with 5 servers, zookeeper version 3.2.1, here is
> the content in the configure file, zoo.cfg
> # The number of milliseconds of each tick
> # The number of ticks that the initial
> # synchronization phase can take
> # The number of ticks that can pass between
> # sending a request and getting an acknowledgement
> # the directory where the snapshot is stored.
> # the port at which the clients will connect
> # zookeeper cluster list
> Before the problem happened, the server.200 was the leader. Yesterday
> morning, I found the there were many sockets with the state of CLOSE_WAIT on
> the clientPort (8181), the total was over about 120. Because of these
> CLOSE_WAIT, the server.200 could not accept more connections from the
> clients. The only thing I can do under this situation is restart the
> server.200, at about 2010-02-01 06:06:35. The related log is attached to the
This message is automatically generated by JIRA.
You can reply to this email to add a comment to the issue online.