Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Closing Connection Properly? #26

Open
moilanen opened this issue Aug 30, 2013 · 2 comments
Open

Closing Connection Properly? #26

moilanen opened this issue Aug 30, 2013 · 2 comments

Comments

@moilanen
Copy link

I'm seeing an exception on the Zookeeper side about the client closing the connection:

[2013-08-30 14:54:44,560] INFO Accepted socket connection from /10.0.0.108:60358 (org.apache.zookeeper.server.NIOServerCnxn)
[2013-08-30 14:54:44,561] INFO Client attempting to establish new session at /10.0.0.108:60358 (org.apache.zookeeper.server.NIOServerCnxn)
[2013-08-30 14:54:44,568] INFO Established session 0x140cfa4ae54000c with negotiated timeout 10000 for client /10.0.0.108:60358 (org.apache.zookeeper.server.NIOServerCnxn)
[2013-08-30 14:54:44,705] INFO Processed session termination for sessionid: 0x140cfa4ae54000c (org.apache.zookeeper.server.PrepRequestProcessor)
[2013-08-30 14:54:44,705] WARN EndOfStreamException: Unable to read additional data from client sessionid 0x140cfa4ae54000c, likely client has closed socket (org.apache.zookeeper.server.NIOServerCnxn)
[2013-08-30 14:54:44,706] INFO Closed socket connection for client /10.0.0.108:60358 which had sessionid 0x140cfa4ae54000c (org.apache.zookeeper.server.NIOServerCnxn)
[2013-08-30 14:54:44,714] ERROR Unexpected Exception:  (org.apache.zookeeper.server.NIOServerCnxn)
java.nio.channels.CancelledKeyException
        at sun.nio.ch.SelectionKeyImpl.ensureValid(SelectionKeyImpl.java:73)
        at sun.nio.ch.SelectionKeyImpl.interestOps(SelectionKeyImpl.java:77)
        at org.apache.zookeeper.server.NIOServerCnxn.sendBuffer(NIOServerCnxn.java:418)
        at org.apache.zookeeper.server.NIOServerCnxn.sendResponse(NIOServerCnxn.java:1509)
        at org.apache.zookeeper.server.FinalRequestProcessor.processRequest(FinalRequestProcessor.java:367)
        at org.apache.zookeeper.server.SyncRequestProcessor.flush(SyncRequestProcessor.java:161)
        at org.apache.zookeeper.server.SyncRequestProcessor.run(SyncRequestProcessor.java:98)

Is there a more graceful way we can close explictly close the connection so not cause an exception on the Zookeeper side?

Thanks,
Jake

@ebuzzz
Copy link

ebuzzz commented Dec 31, 2014

Just for the record: the zk-ruby module has the same problem. It seems to be a server side issue
For more information, see zk-ruby/zookeeper#54

It does not seem to have any negative effect (apart from creating large logfiles).

@Timandes
Copy link
Contributor

Timandes commented Jun 2, 2015

This is a C Client issue.
See: https://issues.apache.org/jira/browse/ZOOKEEPER-1105

Maybe it'll be fixed in version 3.5.2 or 3.6.0 ...

Please close the issue. Thx.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants