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

Unchecked CancelledKeyException when client disconnects from cluster #8681

Closed
alparslanavci opened this issue Aug 8, 2016 · 1 comment

Comments

Projects
None yet
5 participants
@alparslanavci
Copy link

commented Aug 8, 2016

Users can get CancelledKeyException when the client disconnects from the cluster. Here is the related stacktrace:

2016-07-26 09:09:49:981 [hz._hzInstance_1_dev.IO.thread-out-1] WARN c.h.n.t.n.NonBlockingSocketWriter - [example.hazelcast.com]:10330 [dev] [3.6.2] hz._hzInstance_1_dev.IO.thread-out-1 Closing socket to endpoint Address[10.98.205.19]:56160, Cause:java.nio.channels.CancelledKeyException

java.nio.channels.CancelledKeyException: null

at sun.nio.ch.SelectionKeyImpl.ensureValid(SelectionKeyImpl.java:73) ~[na:1.8.0_91]

at sun.nio.ch.SelectionKeyImpl.interestOps(SelectionKeyImpl.java:77) ~[na:1.8.0_91]

at com.hazelcast.nio.tcp.nonblocking.AbstractHandler.unregisterOp(AbstractHandler.java:73) ~[hazelcast-all-3.6.2.jar:3.6.2]

at com.hazelcast.nio.tcp.nonblocking.NonBlockingSocketWriter.unschedule(NonBlockingSocketWriter.java:295) ~[hazelcast-all-3.6.2.jar:3.6.2]

at com.hazelcast.nio.tcp.nonblocking.NonBlockingSocketWriter.handle(NonBlockingSocketWriter.java:344) ~[hazelcast-all-3.6.2.jar:3.6.2]

at com.hazelcast.nio.tcp.nonblocking.NonBlockingSocketWriter.run(NonBlockingSocketWriter.java:423) ~[hazelcast-all-3.6.2.jar:3.6.2]

at com.hazelcast.nio.tcp.nonblocking.NonBlockingIOThread.executeTask(NonBlockingIOThread.java:236) [hazelcast-all-3.6.2.jar:3.6.2]

at com.hazelcast.nio.tcp.nonblocking.NonBlockingIOThread.processTaskQueue(NonBlockingIOThread.java:229) [hazelcast-all-3.6.2.jar:3.6.2]

at com.hazelcast.nio.tcp.nonblocking.NonBlockingIOThread.runSelectLoop(NonBlockingIOThread.java:201) [hazelcast-all-3.6.2.jar:3.6.2]

at com.hazelcast.nio.tcp.nonblocking.NonBlockingIOThread.run(NonBlockingIOThread.java:163) [hazelcast-all-3.6.2.jar:3.6.2]

The warning seems harmless, but the printed log should be prettified for better user experience.

@jerrinot jerrinot modified the milestones: 3.7.1, 3.8 Aug 8, 2016

@lu-ko

This comment has been minimized.

Copy link

commented Oct 14, 2016

Similar exception in 3.6.3:

[hz._hzInstance_1_dev.IO.thread-in-2] 2016-10-13T19:24:49.13+02:00 WARNING [com.hazelcast.nio.tcp.nonblocking.NonBlockingSocketReader]  [127.0.0.1]:5704 [dev] [3.6.3] hz._hzInstance_1_dev.IO.thread-in-2 Closing socket to endpoint Address[127.0.0.1]:5703, Cause:java.nio.channels.CancelledKeyException
java.nio.channels.CancelledKeyException
    at com.hazelcast.nio.tcp.nonblocking.NonBlockingIOThread.handleSelectionKey(NonBlockingIOThread.java:323)
    at com.hazelcast.nio.tcp.nonblocking.NonBlockingIOThread.handleSelectionKeys(NonBlockingIOThread.java:314)
    at com.hazelcast.nio.tcp.nonblocking.NonBlockingIOThread.selectLoop(NonBlockingIOThread.java:234)
    at com.hazelcast.nio.tcp.nonblocking.NonBlockingIOThread.run(NonBlockingIOThread.java:187)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
You can’t perform that action at this time.