java.nio.channels.ClosedChannelException

Oracle Community | lukjel | 9 years ago
  1. 0

    doRead - ClosedChannelException

    Oracle Community | 9 years ago | lukjel
    java.nio.channels.ClosedChannelException
  2. 0

    [ZOOKEEPER-1115] follower can not sync with leader - ASF JIRA

    apache.org | 12 months ago
    java.nio.channels.ClosedChannelException
  3. Speed up your debug routine!

    Automated exception search integrated into your IDE

  4. 0

    exception causing shutdownthere are 5 members in the quorum. one follower can not sync with leader after restart. it seems leader has close the data connection with this follower because of read timeout. here is the key log in follower: {noformat} 2011-06-30 22:14:45,069 - WARN [Thread-17:QuorumCnxManager$RecvWorker@658] - Connection broken: java.nio.channels.ClosedChannelException at sun.nio.ch.SocketChannelImpl.ensureReadOpen(SocketChannelImpl.java:113) at sun.nio.ch.SocketChannelImpl.read(SocketChannelImpl.java:156) at org.apache.zookeeper.server.quorum.QuorumCnxManager$RecvWorker.run(QuorumCnxManager.java:629) 2011-06-30 22:14:45,069 - INFO [QuorumPeer:/0.0.0.0:2181:FastLeaderElection@689] - Notification: 3, 17198470148, 3, 3, LOOKING, LOOKING, 3 2011-06-30 22:14:45,070 - ERROR [Thread-16:QuorumCnxManager$SendWorker@559] - Failed to send last message. Shutting down thread. java.nio.channels.ClosedChannelException at sun.nio.ch.SocketChannelImpl.ensureWriteOpen(SocketChannelImpl.java:126) at sun.nio.ch.SocketChannelImpl.write(SocketChannelImpl.java:324) at org.apache.zookeeper.server.quorum.QuorumCnxManager$SendWorker.send(QuorumCnxManager.java:548) at org.apache.zookeeper.server.quorum.QuorumCnxManager$SendWorker.run(QuorumCnxManager.java:557) 2011-06-30 22:14:45,082 - INFO [QuorumPeer:/0.0.0.0:2181:Learner@282] - Getting a diff from the leader 0x4011bd462 2011-06-30 22:14:45,083 - WARN [Thread-18:QuorumCnxManager$SendWorker@589] - Send worker leaving thread 2011-06-30 22:14:45,085 - WARN [QuorumPeer:/0.0.0.0:2181:Follower@116] - Got zxid 0x4011bd405 expected 0x1 2011-06-30 22:14:45,090 - INFO [QuorumPeer:/0.0.0.0:2181:FileTxnSnapLog@208] - Snapshotting: 4011bd462 2011-06-30 22:14:53,397 - WARN [SyncThread:3:SendAckRequestProcessor@63] - Closing connection to leader, exception during packet send java.net.SocketException: Broken pipe at java.net.SocketOutputStream.socketWrite0(Native Method) at java.net.SocketOutputStream.socketWrite(SocketOutputStream.java:92) at java.net.SocketOutputStream.write(SocketOutputStream.java:136) at java.io.BufferedOutputStream.flushBuffer(BufferedOutputStream.java:65) at java.io.BufferedOutputStream.flush(BufferedOutputStream.java:123) at org.apache.zookeeper.server.quorum.Learner.writePacket(Learner.java:126) at org.apache.zookeeper.server.quorum.SendAckRequestProcessor.flush(SendAckRequestProcessor.java:61) at org.apache.zookeeper.server.SyncRequestProcessor.flush(SyncRequestProcessor.java:164) at org.apache.zookeeper.server.SyncRequestProcessor.run(SyncRequestProcessor.java:98) 2011-06-30 22:14:53,398 - WARN [QuorumPeer:/0.0.0.0:2181:Follower@82] - Exception when following the leader java.net.SocketException: Socket closed at java.net.SocketOutputStream.socketWrite(SocketOutputStream.java:99) at java.net.SocketOutputStream.write(SocketOutputStream.java:136) at java.io.BufferedOutputStream.flushBuffer(BufferedOutputStream.java:65) at java.io.BufferedOutputStream.flush(BufferedOutputStream.java:123) at org.apache.zookeeper.server.quorum.Learner.writePacket(Learner.java:126) at org.apache.zookeeper.server.quorum.Learner.ping(Learner.java:358) at org.apache.zookeeper.server.quorum.Follower.processPacket(Follower.java:108) at org.apache.zookeeper.server.quorum.Follower.followLeader(Follower.java:79) at org.apache.zookeeper.server.quorum.QuorumPeer.run(QuorumPeer.java:634) 2011-06-30 22:14:53,398 - WARN [SyncThread:3:SendAckRequestProcessor@63] - Closing connection to leader, exception during packet send java.net.SocketException: Socket closed at java.net.SocketOutputStream.socketWrite(SocketOutputStream.java:99) at java.net.SocketOutputStream.write(SocketOutputStream.java:136) at java.io.BufferedOutputStream.flushBuffer(BufferedOutputStream.java:65) at java.io.BufferedOutputStream.flush(BufferedOutputStream.java:123) at org.apache.zookeeper.server.quorum.Learner.writePacket(Learner.java:126) at org.apache.zookeeper.server.quorum.SendAckRequestProcessor.flush(SendAckRequestProcessor.java:61) at org.apache.zookeeper.server.SyncRequestProcessor.flush(SyncRequestProcessor.java:164) at org.apache.zookeeper.server.SyncRequestProcessor.run(SyncRequestProcessor.java:98) 2011-06-30 22:14:53,399 - INFO [QuorumPeer:/0.0.0.0:2181:Follower@166] - shutdown called java.lang.Exception: shutdown Follower at org.apache.zookeeper.server.quorum.Follower.shutdown(Follower.java:166) at org.apache.zookeeper.server.quorum.QuorumPeer.run(QuorumPeer.java:638) and these are the leader's: 2011-06-30 22:14:35,943 - ERROR [LearnerHandler-/10.23.247.163:14975:LearnerHandler@444] - Unexpected exception causing shutdown while sock still open java.net.SocketTimeoutException: Read timed out at java.net.SocketInputStream.socketRead0(Native Method) at java.net.SocketInputStream.read(SocketInputStream.java:129) at java.io.BufferedInputStream.fill(BufferedInputStream.java:218) at java.io.BufferedInputStream.read(BufferedInputStream.java:237) at java.io.DataInputStream.readInt(DataInputStream.java:370) at org.apache.jute.BinaryInputArchive.readInt(BinaryInputArchive.java:63) at org.apache.zookeeper.server.quorum.QuorumPacket.deserialize(QuorumPacket.java:84) at org.apache.jute.BinaryInputArchive.readRecord(BinaryInputArchive.java:108) at org.apache.zookeeper.server.quorum.LearnerHandler.run(LearnerHandler.java:358) 2011-06-30 22:14:35,943 - WARN [LearnerHandler-/10.23.247.163:14975:LearnerHandler@457] - ******* GOODBYE /10.23.247.163:14975 ******** 2011-06-30 22:14:48,943 - ERROR [CommitProcessor:4:NIOServerCnxn@422] - Unexpected Exception: java.nio.channels.CancelledKeyException at sun.nio.ch.SelectionKeyImpl.ensureValid(SelectionKeyImpl.java:55) at sun.nio.ch.SelectionKeyImpl.interestOps(SelectionKeyImpl.java:59) at org.apache.zookeeper.server.NIOServerCnxn.sendBuffer(NIOServerCnxn.java:395) at org.apache.zookeeper.server.NIOServerCnxn.sendResponse(NIOServerCnxn.java:1360) at org.apache.zookeeper.server.FinalRequestProcessor.processRequest(FinalRequestProcessor.java:367) at org.apache.zookeeper.server.quorum.Leader$ToBeAppliedRequestProcessor.processRequest(Leader.java:535) at org.apache.zookeeper.server.quorum.CommitProcessor.run(CommitProcessor.java:73) 2011-06-30 22:14:49,084 - ERROR [LearnerHandler-/10.23.247.163:14998:LearnerHandler@444] - Unexpected exception causing shutdown while sock still open java.net.SocketTimeoutException: Read timed out at java.net.SocketInputStream.socketRead0(Native Method) at java.net.SocketInputStream.read(SocketInputStream.java:129) at java.io.BufferedInputStream.fill(BufferedInputStream.java:218) at java.io.BufferedInputStream.read(BufferedInputStream.java:237) at java.io.DataInputStream.readInt(DataInputStream.java:370) at org.apache.jute.BinaryInputArchive.readInt(BinaryInputArchive.java:63) at org.apache.zookeeper.server.quorum.QuorumPacket.deserialize(QuorumPacket.java:84) at org.apache.jute.BinaryInputArchive.readRecord(BinaryInputArchive.java:108) at org.apache.zookeeper.server.quorum.LearnerHandler.run(LearnerHandler.java:358) 2011-06-30 22:14:49,084 - WARN [LearnerHandler-/10.23.247.163:14998:LearnerHandler@457] - ******* GOODBYE /10.23.247.163:14998 ******** {noformat}

    Apache's JIRA Issue Tracker | 5 years ago | helei
    java.nio.channels.ClosedChannelException
  5. 0

    I'm using Glassfish V2 (build b58g-fcs) running on sun-jdk-1.6.0_02 jvm (Gentoo Linux OS) to host a J2EE application (JSPs + Google Web Toolkit + EJBs) in production environment. After a period of time one of the httpSSLWorkerThreads starts throwing java.nio.channels.ClosedChannelException. The exception seems to be thrown in a loop which immediately causes 100% CPU load. At this point server needs to be restarted. The situation happens quite regularly (once every 48 hours on average). Below are server logs captured right before the situation happened. The webcontainer log level was set to FINEST and com.sun.enterprise.web.connector.grizzly.enableSnoop jvm option was enabled (as suggested by Jeanfrancois Arcand) [#|2007-09-27T16:10:03.122+0200|INFO|sun-appserver9.1|javax.enterprise.system.container.web|_ThreadID=35;_ThreadName=httpSSLWorkerThread-8443-4;|SocketChannel headersjava.nio.channels.SocketChannel[connected local=/91.121.67.52:8443 remote=/83.238.224.201:1459] are: === MimeHeaders === accept = */* referer = https://***************/app accept-language = pl accept-encoding = gzip, deflate if-modified-since = Thu, 23 Aug 2007 02:52:13 GMT if-none-match = W/"1622-1187837533000" user-agent = Mozilla/4.0 (compatible; MSIE 6.0; Windows 98) host = *************** connection = Keep-Alive cookie = __utma=169627747.1442040372.1175202954.1185982204.1186597748.40; __utmz=169627747.1175202954.1.1.utmccn=(direct)|utmcsr=(direct)|utmcmd=(none); JSESSIONID=748cb971b0ee6e599e25d541eaea |#] [#|2007-09-27T16:10:03.122+0200|FINE|sun-appserver9.1|org.apache.coyote.tomcat5.CoyoteRequest|_ThreadID=35;_ThreadName=httpSSLWorkerThread-8443-4;ClassName=org.apache.coyote.tomcat5.CoyoteRequest;MethodName=parseSessionCookiesId;_RequestID=5421ab6b-7f2f-48ed-a6f1-4f0755616d9c;|Requested cookie session id is 748cb971b0ee6e599e25d541eaea|#] [#|2007-09-27T16:10:03.122+0200|FINE|sun-appserver9.1|org.apache.catalina.authenticator.AuthenticatorBase|_ThreadID=35;_ThreadName=httpSSLWorkerThread-8443-4;ClassName=org.apache.catalina.authenticator.AuthenticatorBase;MethodName=invoke;_RequestID=5421ab6b-7f2f-48ed-a6f1-4f0755616d9c;|Security checking request GET /images/pdf_icon.gif|#] [#|2007-09-27T16:10:03.123+0200|FINE|sun-appserver9.1|org.apache.catalina.authenticator.AuthenticatorBase|_ThreadID=35;_ThreadName=httpSSLWorkerThread-8443-4;ClassName=org.apache.catalina.authenticator.AuthenticatorBase;MethodName=invoke;_RequestID=5421ab6b-7f2f-48ed-a6f1-4f0755616d9c;|We have cached auth type PROGRAMMATIC for principal ertrans|#] [#|2007-09-27T16:10:03.123+0200|FINE|sun-appserver9.1|org.apache.catalina.authenticator.AuthenticatorBase|_ThreadID=35;_ThreadName=httpSSLWorkerThread-8443-4;ClassName=org.apache.catalina.authenticator.AuthenticatorBase;MethodName=invoke;_RequestID=5421ab6b-7f2f-48ed-a6f1-4f0755616d9c;| Not subject to any constraint|#] [#|2007-09-27T16:10:03.123+0200|FINEST|sun-appserver9.1|org.apache.catalina.core.StandardWrapper|_ThreadID=35;_ThreadName=httpSSLWorkerThread-8443-4;ClassName=org.apache.catalina.core.StandardWrapper;MethodName=allocate;_RequestID=5421ab6b-7f2f-48ed-a6f1-4f0755616d9c;| Returning non-STM instance|#] [#|2007-09-27T16:10:03.123+0200|FINEST|sun-appserver9.1|javax.enterprise.system.container.web|_ThreadID=35;_ThreadName=httpSSLWorkerThread-8443-4;ClassName=com.sun.web.server.J2EEInstanceListener;MethodName=instanceEvent;_RequestID=5421ab6b-7f2f-48ed-a6f1-4f0755616d9c;|*** InstanceEvent: beforeFilter|#] [#|2007-09-27T16:10:03.123+0200|FINEST|sun-appserver9.1|javax.enterprise.system.container.web|_ThreadID=35;_ThreadName=httpSSLWorkerThread-8443-4;ClassName=com.sun.web.server.J2EEInstanceListener;MethodName=instanceEvent;_RequestID=5421ab6b-7f2f-48ed-a6f1-4f0755616d9c;|*** InstanceEvent: beforeService|#] [#|2007-09-27T16:10:03.124+0200|FINE|sun-appserver9.1|org.apache.coyote.tomcat5.OutputBuffer|_ThreadID=35;_ThreadName=httpSSLWorkerThread-8443-4;ClassName=org.apache.coyote.tomcat5.OutputBuffer;MethodName=writeBytes;_RequestID=5421ab6b-7f2f-48ed-a6f1-4f0755616d9c;|write(b,off,len)|#] [#|2007-09-27T16:10:03.124+0200|FINEST|sun-appserver9.1|javax.enterprise.system.container.web|_ThreadID=35;_ThreadName=httpSSLWorkerThread-8443-4;ClassName=com.sun.web.server.J2EEInstanceListener;MethodName=instanceEvent;_RequestID=5421ab6b-7f2f-48ed-a6f1-4f0755616d9c;|*** InstanceEvent: afterService|#] [#|2007-09-27T16:10:03.124+0200|FINEST|sun-appserver9.1|javax.enterprise.system.container.web|_ThreadID=35;_ThreadName=httpSSLWorkerThread-8443-4;ClassName=com.sun.web.server.J2EEInstanceListener;MethodName=instanceEvent;_RequestID=5421ab6b-7f2f-48ed-a6f1-4f0755616d9c;|*** InstanceEvent: afterFilter|#] [#|2007-09-27T16:10:03.124+0200|FINE|sun-appserver9.1|org.apache.coyote.tomcat5.OutputBuffer|_ThreadID=35;_ThreadName=httpSSLWorkerThread-8443-4;ClassName=org.apache.coyote.tomcat5.OutputBuffer;MethodName=realWriteBytes;_RequestID=5421ab6b-7f2f-48ed-a6f1-4f0755616d9c;|realWrite(b, 0, 1622) org.apache.coyote.Response@a506|#] [#|2007-09-27T16:10:03.124+0200|FINEST|sun-appserver9.1|org.apache.coyote.tomcat5.InputBuffer|_ThreadID=35;_ThreadName=httpSSLWorkerThread-8443-4;ClassName=org.apache.coyote.tomcat5.InputBuffer;MethodName=recycle;_RequestID=5421ab6b-7f2f-48ed-a6f1-4f0755616d9c;|recycle()|#] [#|2007-09-27T16:10:03.124+0200|FINE|sun-appserver9.1|org.apache.coyote.tomcat5.OutputBuffer|_ThreadID=35;_ThreadName=httpSSLWorkerThread-8443-4;ClassName=org.apache.coyote.tomcat5.OutputBuffer;MethodName=recycle;_RequestID=5421ab6b-7f2f-48ed-a6f1-4f0755616d9c;|recycle()|#] [#|2007-09-27T16:10:03.125+0200|FINEST|sun-appserver9.1|javax.enterprise.system.container.web|_ThreadID=35;_ThreadName=httpSSLWorkerThread-8443-4;ClassName=com.sun.enterprise.web.connector.grizzly.DefaultReadTask;MethodName=registerKey;_RequestID=5421ab6b-7f2f-48ed-a6f1-4f0755616d9c;|registerKey|#] [#|2007-09-27T16:10:03.125+0200|INFO|sun-appserver9.1|javax.enterprise.system.container.web|_ThreadID=35;_ThreadName=httpSSLWorkerThread-8443-4;|Registering SocketChannel for keep alive java.nio.channels.SocketChannel[connected local=/91.121.67.52:8443 remote=/83.238.224.201:1459]|#] [#|2007-09-27T16:10:04.587+0200|INFO|sun-appserver9.1|javax.enterprise.system.container.web|_ThreadID=19;_ThreadName=SelectorThread-8443;|Handling OP_READ on SocketChannel java.nio.channels.SocketChannel[connected local=/91.121.67.52:8443 remote=/212.2.99.90:20576]|#] [#|2007-09-27T16:10:04.587+0200|FINEST|sun-appserver9.1|javax.enterprise.system.container.web|_ThreadID=25;_ThreadName=httpSSLWorkerThread-8443-1;ClassName=com.sun.enterprise.web.connector.grizzly.DefaultReadTask;MethodName=executeProcessorTask;_RequestID=4105076a-0ec6-4661-8777-56fec92fdab3;|executeProcessorTask|#] [#|2007-09-27T16:10:04.587+0200|INFO|sun-appserver9.1|javax.enterprise.system.container.web|_ThreadID=25;_ThreadName=httpSSLWorkerThread-8443-1;|SocketChannel request linejava.nio.channels.SocketChannel[connected local=/91.121.67.52:8443 remote=/212.2.99.90:20576] is: R( /images/gray_border_lt.png)|#] [#|2007-09-27T16:10:04.587+0200|INFO|sun-appserver9.1|javax.enterprise.system.container.web|_ThreadID=25;_ThreadName=httpSSLWorkerThread-8443-1;|SocketChannel headersjava.nio.channels.SocketChannel[connected local=/91.121.67.52:8443 remote=/212.2.99.90:20576] are: === MimeHeaders === user-agent = Opera/9.23 (Windows NT 5.1; U; pl) host = *************** accept = text/html, application/xml;q=0.9, application/xhtml+xml, image/png, image/jpeg, image/gif, image/x-xbitmap, */*;q=0.1 accept-language = pl-PL,pl;q=0.9,en;q=0.8 accept-charset = iso-8859-1, utf-8, utf-16, *;q=0.1 accept-encoding = deflate, gzip, x-gzip, identity, *;q=0 referer = https://***************/app?action=logout cookie = __utmz=169627747.1181814128.1.1.utmccn=(direct)|utmcsr=(direct)|utmcmd=(none); __utma=169627747.1914298456.1181814128.1186755597.1186945438.47; JSESSIONID=74c3d626731310e4fdfb1e09c086 cookie2 = $Version=1 connection = Keep-Alive, TE te = deflate, gzip, chunked, identity, trailers |#] [#|2007-09-27T16:10:04.588+0200|FINE|sun-appserver9.1|org.apache.coyote.tomcat5.CoyoteRequest|_ThreadID=25;_ThreadName=httpSSLWorkerThread-8443-1;ClassName=org.apache.coyote.tomcat5.CoyoteRequest;MethodName=parseSessionCookiesId;_RequestID=4105076a-0ec6-4661-8777-56fec92fdab3;|Requested cookie session id is 74c3d626731310e4fdfb1e09c086|#] [#|2007-09-27T16:10:04.588+0200|FINE|sun-appserver9.1|org.apache.catalina.authenticator.AuthenticatorBase|_ThreadID=25;_ThreadName=httpSSLWorkerThread-8443-1;ClassName=org.apache.catalina.authenticator.AuthenticatorBase;MethodName=invoke;_RequestID=4105076a-0ec6-4661-8777-56fec92fdab3;|Security checking request GET /images/gray_border_lt.png|#] [#|2007-09-27T16:10:04.588+0200|FINE|sun-appserver9.1|org.apache.catalina.authenticator.AuthenticatorBase|_ThreadID=25;_ThreadName=httpSSLWorkerThread-8443-1;ClassName=org.apache.catalina.authenticator.AuthenticatorBase;MethodName=invoke;_RequestID=4105076a-0ec6-4661-8777-56fec92fdab3;| Not subject to any constraint|#] [#|2007-09-27T16:10:04.588+0200|FINEST|sun-appserver9.1|org.apache.catalina.core.StandardWrapper|_ThreadID=25;_ThreadName=httpSSLWorkerThread-8443-1;ClassName=org.apache.catalina.core.StandardWrapper;MethodName=allocate;_RequestID=4105076a-0ec6-4661-8777-56fec92fdab3;| Returning non-STM instance|#] [#|2007-09-27T16:10:04.588+0200|FINEST|sun-appserver9.1|javax.enterprise.system.container.web|_ThreadID=25;_ThreadName=httpSSLWorkerThread-8443-1;ClassName=com.sun.web.server.J2EEInstanceListener;MethodName=instanceEvent;_RequestID=4105076a-0ec6-4661-8777-56fec92fdab3;|*** InstanceEvent: beforeFilter|#] [#|2007-09-27T16:10:04.588+0200|FINEST|sun-appserver9.1|javax.enterprise.system.container.web|_ThreadID=25;_ThreadName=httpSSLWorkerThread-8443-1;ClassName=com.sun.web.server.J2EEInstanceListener;MethodName=instanceEvent;_RequestID=4105076a-0ec6-4661-8777-56fec92fdab3;|*** InstanceEvent: beforeService|#] [#|2007-09-27T16:10:04.589+0200|FINE|sun-appserver9.1|org.apache.coyote.tomcat5.OutputBuffer|_ThreadID=25;_ThreadName=httpSSLWorkerThread-8443-1;ClassName=org.apache.coyote.tomcat5.OutputBuffer;MethodName=writeBytes;_RequestID=4105076a-0ec6-4661-8777-56fec92fdab3;|write(b,off,len)|#] [#|2007-09-27T16:10:04.589+0200|FINEST|sun-appserver9.1|javax.enterprise.system.container.web|_ThreadID=25;_ThreadName=httpSSLWorkerThread-8443-1;ClassName=com.sun.web.server.J2EEInstanceListener;MethodName=instanceEvent;_RequestID=4105076a-0ec6-4661-8777-56fec92fdab3;|*** InstanceEvent: afterService|#] [#|2007-09-27T16:10:04.589+0200|FINEST|sun-appserver9.1|javax.enterprise.system.container.web|_ThreadID=25;_ThreadName=httpSSLWorkerThread-8443-1;ClassName=com.sun.web.server.J2EEInstanceListener;MethodName=instanceEvent;_RequestID=4105076a-0ec6-4661-8777-56fec92fdab3;|*** InstanceEvent: afterFilter|#] [#|2007-09-27T16:10:04.589+0200|FINE|sun-appserver9.1|org.apache.coyote.tomcat5.OutputBuffer|_ThreadID=25;_ThreadName=httpSSLWorkerThread-8443-1;ClassName=org.apache.coyote.tomcat5.OutputBuffer;MethodName=realWriteBytes;_RequestID=4105076a-0ec6-4661-8777-56fec92fdab3;|realWrite(b, 0, 136) org.apache.coyote.Response@1152127|#] [#|2007-09-27T16:10:04.590+0200|FINEST|sun-appserver9.1|org.apache.coyote.tomcat5.InputBuffer|_ThreadID=25;_ThreadName=httpSSLWorkerThread-8443-1;ClassName=org.apache.coyote.tomcat5.InputBuffer;MethodName=recycle;_RequestID=4105076a-0ec6-4661-8777-56fec92fdab3;|recycle()|#] [#|2007-09-27T16:10:04.590+0200|FINE|sun-appserver9.1|org.apache.coyote.tomcat5.OutputBuffer|_ThreadID=25;_ThreadName=httpSSLWorkerThread-8443-1;ClassName=org.apache.coyote.tomcat5.OutputBuffer;MethodName=recycle;_RequestID=4105076a-0ec6-4661-8777-56fec92fdab3;|recycle()|#] [#|2007-09-27T16:10:04.590+0200|FINEST|sun-appserver9.1|javax.enterprise.system.container.web|_ThreadID=25;_ThreadName=httpSSLWorkerThread-8443-1;ClassName=com.sun.enterprise.web.connector.grizzly.DefaultReadTask;MethodName=registerKey;_RequestID=4105076a-0ec6-4661-8777-56fec92fdab3;|registerKey|#] [#|2007-09-27T16:10:04.590+0200|INFO|sun-appserver9.1|javax.enterprise.system.container.web|_ThreadID=25;_ThreadName=httpSSLWorkerThread-8443-1;|Registering SocketChannel for keep alive java.nio.channels.SocketChannel[connected local=/91.121.67.52:8443 remote=/212.2.99.90:20576]|#] [#|2007-09-27T16:10:04.938+0200|INFO|sun-appserver9.1|javax.enterprise.system.container.web|_ThreadID=19;_ThreadName=SelectorThread-8443;|Handling OP_READ on SocketChannel java.nio.channels.SocketChannel[connected local=/91.121.67.52:8443 remote=/81.190.105.116:58618]|#] [#|2007-09-27T16:10:04.938+0200|FINEST|sun-appserver9.1|javax.enterprise.system.container.web|_ThreadID=24;_ThreadName=httpSSLWorkerThread-8443-0;ClassName=com.sun.enterprise.web.connector.grizzly.DefaultReadTask;MethodName=executeProcessorTask;_RequestID=89973d4b-2e4d-414f-86ed-3c79c3febc15;|executeProcessorTask|#] [#|2007-09-27T16:10:04.938+0200|INFO|sun-appserver9.1|javax.enterprise.system.container.web|_ThreadID=24;_ThreadName=httpSSLWorkerThread-8443-0;|SocketChannel request linejava.nio.channels.SocketChannel[connected local=/91.121.67.52:8443 remote=/81.190.105.116:58618] is: R( //controller)|#] [#|2007-09-27T16:10:04.939+0200|INFO|sun-appserver9.1|javax.enterprise.system.container.web|_ThreadID=24;_ThreadName=httpSSLWorkerThread-8443-0;|SocketChannel headersjava.nio.channels.SocketChannel[connected local=/91.121.67.52:8443 remote=/81.190.105.116:58618] are: === MimeHeaders === host = *************** user-agent = Mozilla/5.0 (Windows; U; Windows NT 6.0; pl; rv:1.8.1.7) Gecko/20070914 Firefox/2.0.0.7 accept = text/xml,application/xml,application/xhtml+xml,text/html;q=0.9,text/plain;q=0.8,image/png,*/*;q=0.5 accept-language = pl,en-us;q=0.7,en;q=0.3 accept-encoding = gzip,deflate accept-charset = ISO-8859-2,utf-8;q=0.7,*;q=0.7 keep-alive = 300 connection = keep-alive content-type = text/plain; charset=utf-8 referer = https://***************/0AC7B16D37EE460FC4836284DACD8752.cache.html content-length = 254 cookie = JSESSIONID=74ca69c3905b109d86ab7ab703b5; __utma=169627747.645914524.1190806432.1190806432.1190808688.2; __utmc=169627747; __utmz=169627747.1190806432.1.1.utmccn=(direct)|utmcsr=(direct)|utmcmd=(none) pragma = no-cache cache-control = no-cache |#] [#|2007-09-27T16:10:04.939+0200|FINE|sun-appserver9.1|org.apache.coyote.tomcat5.CoyoteRequest|_ThreadID=24;_ThreadName=httpSSLWorkerThread-8443-0;ClassName=org.apache.coyote.tomcat5.CoyoteRequest;MethodName=parseSessionCookiesId;_RequestID=89973d4b-2e4d-414f-86ed-3c79c3febc15;|Requested cookie session id is 74ca69c3905b109d86ab7ab703b5|#] [#|2007-09-27T16:10:04.939+0200|FINE|sun-appserver9.1|org.apache.catalina.authenticator.AuthenticatorBase|_ThreadID=24;_ThreadName=httpSSLWorkerThread-8443-0;ClassName=org.apache.catalina.authenticator.AuthenticatorBase;MethodName=invoke;_RequestID=89973d4b-2e4d-414f-86ed-3c79c3febc15;|Security checking request POST //controller|#] [#|2007-09-27T16:10:04.939+0200|FINE|sun-appserver9.1|org.apache.catalina.authenticator.AuthenticatorBase|_ThreadID=24;_ThreadName=httpSSLWorkerThread-8443-0;ClassName=org.apache.catalina.authenticator.AuthenticatorBase;MethodName=invoke;_RequestID=89973d4b-2e4d-414f-86ed-3c79c3febc15;|We have cached auth type PROGRAMMATIC for principal shmayek1|#] [#|2007-09-27T16:10:04.939+0200|FINE|sun-appserver9.1|org.apache.catalina.authenticator.AuthenticatorBase|_ThreadID=24;_ThreadName=httpSSLWorkerThread-8443-0;ClassName=org.apache.catalina.authenticator.AuthenticatorBase;MethodName=invoke;_RequestID=89973d4b-2e4d-414f-86ed-3c79c3febc15;| Not subject to any constraint|#] [#|2007-09-27T16:10:04.939+0200|FINEST|sun-appserver9.1|org.apache.catalina.core.StandardWrapper|_ThreadID=24;_ThreadName=httpSSLWorkerThread-8443-0;ClassName=org.apache.catalina.core.StandardWrapper;MethodName=allocate;_RequestID=89973d4b-2e4d-414f-86ed-3c79c3febc15;| Returning non-STM instance|#] [#|2007-09-27T16:10:04.939+0200|FINEST|sun-appserver9.1|javax.enterprise.system.container.web|_ThreadID=24;_ThreadName=httpSSLWorkerThread-8443-0;ClassName=com.sun.web.server.J2EEInstanceListener;MethodName=instanceEvent;_RequestID=89973d4b-2e4d-414f-86ed-3c79c3febc15;|*** InstanceEvent: beforeFilter|#] [#|2007-09-27T16:10:04.939+0200|FINEST|sun-appserver9.1|javax.enterprise.system.container.web|_ThreadID=24;_ThreadName=httpSSLWorkerThread-8443-0;ClassName=com.sun.web.server.J2EEInstanceListener;MethodName=instanceEvent;_RequestID=89973d4b-2e4d-414f-86ed-3c79c3febc15;|*** InstanceEvent: beforeService|#] [#|2007-09-27T16:10:04.940+0200|FINE|sun-appserver9.1|org.apache.coyote.tomcat5.InputBuffer|_ThreadID=24;_ThreadName=httpSSLWorkerThread-8443-0;ClassName=org.apache.coyote.tomcat5.InputBuffer;MethodName=realReadBytes;_RequestID=89973d4b-2e4d-414f-86ed-3c79c3febc15;|realRead() R( //controller)|#] [#|2007-09-27T16:10:05.020+0200|FINE|sun-appserver9.1|org.apache.coyote.tomcat5.OutputBuffer|_ThreadID=24;_ThreadName=httpSSLWorkerThread-8443-0;ClassName=org.apache.coyote.tomcat5.OutputBuffer;MethodName=writeBytes;_RequestID=89973d4b-2e4d-414f-86ed-3c79c3febc15;|write(b,off,len)|#] [#|2007-09-27T16:10:05.020+0200|FINEST|sun-appserver9.1|javax.enterprise.system.container.web|_ThreadID=24;_ThreadName=httpSSLWorkerThread-8443-0;ClassName=com.sun.web.server.J2EEInstanceListener;MethodName=instanceEvent;_RequestID=89973d4b-2e4d-414f-86ed-3c79c3febc15;|*** InstanceEvent: afterService|#] [#|2007-09-27T16:10:05.020+0200|FINEST|sun-appserver9.1|javax.enterprise.system.container.web|_ThreadID=24;_ThreadName=httpSSLWorkerThread-8443-0;ClassName=com.sun.web.server.J2EEInstanceListener;MethodName=instanceEvent;_RequestID=89973d4b-2e4d-414f-86ed-3c79c3febc15;|*** InstanceEvent: afterFilter|#] [#|2007-09-27T16:10:05.021+0200|FINE|sun-appserver9.1|org.apache.coyote.tomcat5.OutputBuffer|_ThreadID=24;_ThreadName=httpSSLWorkerThread-8443-0;ClassName=org.apache.coyote.tomcat5.OutputBuffer;MethodName=realWriteBytes;_RequestID=89973d4b-2e4d-414f-86ed-3c79c3febc15;|realWrite(b, 0, 732) org.apache.coyote.Response@1f89b42|#] [#|2007-09-27T16:10:05.021+0200|FINEST|sun-appserver9.1|org.apache.coyote.tomcat5.InputBuffer|_ThreadID=24;_ThreadName=httpSSLWorkerThread-8443-0;ClassName=org.apache.coyote.tomcat5.InputBuffer;MethodName=recycle;_RequestID=89973d4b-2e4d-414f-86ed-3c79c3febc15;|recycle()|#] [#|2007-09-27T16:10:05.021+0200|FINE|sun-appserver9.1|org.apache.coyote.tomcat5.OutputBuffer|_ThreadID=24;_ThreadName=httpSSLWorkerThread-8443-0;ClassName=org.apache.coyote.tomcat5.OutputBuffer;MethodName=recycle;_RequestID=89973d4b-2e4d-414f-86ed-3c79c3febc15;|recycle()|#] [#|2007-09-27T16:10:05.021+0200|FINEST|sun-appserver9.1|javax.enterprise.system.container.web|_ThreadID=24;_ThreadName=httpSSLWorkerThread-8443-0;ClassName=com.sun.enterprise.web.connector.grizzly.DefaultReadTask;MethodName=registerKey;_RequestID=89973d4b-2e4d-414f-86ed-3c79c3febc15;|registerKey|#] [#|2007-09-27T16:10:05.021+0200|INFO|sun-appserver9.1|javax.enterprise.system.container.web|_ThreadID=24;_ThreadName=httpSSLWorkerThread-8443-0;|Registering SocketChannel for keep alive java.nio.channels.SocketChannel[connected local=/91.121.67.52:8443 remote=/81.190.105.116:58618]|#] [#|2007-09-27T16:10:08.052+0200|FINEST|sun-appserver9.1|javax.enterprise.system.container.web|_ThreadID=32;_ThreadName=httpSSLWorkerThread-8443-3;ClassName=com.sun.enterprise.web.connector.grizzly.ssl.SSLUtils;MethodName=doHandshakeRead;_RequestID=b6f38050-8c00-4bf7-aeaa-71cf3cb0bf32;|doRead java.nio.channels.CancelledKeyException at sun.nio.ch.SelectionKeyImpl.ensureValid(SelectionKeyImpl.java:55) at sun.nio.ch.SelectionKeyImpl.interestOps(SelectionKeyImpl.java:59) at com.sun.enterprise.web.connector.grizzly.ssl.SSLUtils.doHandshakeRead(SSLUtils.java:236) at com.sun.enterprise.web.connector.grizzly.ssl.SSLByteBufferInputStream.doRead(SSLByteBufferInputStream.java:70) at com.sun.enterprise.web.connector.grizzly.ByteBufferInputStream.read(ByteBufferInputStream.java:167) at org.apache.coyote.http11.InternalInputBuffer.fill(InternalInputBuffer.java:743) at org.apache.coyote.http11.InternalInputBuffer$InputStreamInputBuffer.doRead(InternalInputBuffer.java:772) at org.apache.coyote.http11.filters.IdentityInputFilter.end(IdentityInputFilter.java:184) at org.apache.coyote.http11.InternalInputBuffer.endRequest(InternalInputBuffer.java:374) at com.sun.enterprise.web.connector.grizzly.DefaultProcessorTask.postResponse(DefaultProcessorTask.java:591) at com.sun.enterprise.web.connector.grizzly.DefaultProcessorTask.doProcess(DefaultProcessorTask.java:569) at com.sun.enterprise.web.connector.grizzly.DefaultProcessorTask.process(DefaultProcessorTask.java:813) at com.sun.enterprise.web.connector.grizzly.DefaultReadTask.executeProcessorTask(DefaultReadTask.java:339) at com.sun.enterprise.web.connector.grizzly.ssl.SSLReadTask.process(SSLReadTask.java:440) at com.sun.enterprise.web.connector.grizzly.ssl.SSLReadTask.doTask(SSLReadTask.java:228) at com.sun.enterprise.web.connector.grizzly.TaskBase.run(TaskBase.java:265) at com.sun.enterprise.web.connector.grizzly.ssl.SSLWorkerThread.run(SSLWorkerThread.java:106) |#] [#|2007-09-27T16:10:08.053+0200|FINEST|sun-appserver9.1|javax.enterprise.system.container.web|_ThreadID=32;_ThreadName=httpSSLWorkerThread-8443-3;ClassName=com.sun.enterprise.web.connector.grizzly.ssl.SSLUtils;MethodName=doHandshakeRead;_RequestID=b6f38050-8c00-4bf7-aeaa-71cf3cb0bf32;|doRead java.nio.channels.ClosedChannelException at sun.nio.ch.SocketChannelImpl.ensureReadOpen(SocketChannelImpl.java:113) at sun.nio.ch.SocketChannelImpl.read(SocketChannelImpl.java:156) at com.sun.enterprise.web.connector.grizzly.ssl.SSLUtils.doHandshakeRead(SSLUtils.java:206) at com.sun.enterprise.web.connector.grizzly.ssl.SSLByteBufferInputStream.doRead(SSLByteBufferInputStream.java:70) at com.sun.enterprise.web.connector.grizzly.ByteBufferInputStream.read(ByteBufferInputStream.java:167) at org.apache.coyote.http11.InternalInputBuffer.fill(InternalInputBuffer.java:743) at org.apache.coyote.http11.InternalInputBuffer$InputStreamInputBuffer.doRead(InternalInputBuffer.java:772) at org.apache.coyote.http11.filters.IdentityInputFilter.end(IdentityInputFilter.java:184) at org.apache.coyote.http11.InternalInputBuffer.endRequest(InternalInputBuffer.java:374) at com.sun.enterprise.web.connector.grizzly.DefaultProcessorTask.postResponse(DefaultProcessorTask.java:591) at com.sun.enterprise.web.connector.grizzly.DefaultProcessorTask.doProcess(DefaultProcessorTask.java:569) at com.sun.enterprise.web.connector.grizzly.DefaultProcessorTask.process(DefaultProcessorTask.java:813) at com.sun.enterprise.web.connector.grizzly.DefaultReadTask.executeProcessorTask(DefaultReadTask.java:339) at com.sun.enterprise.web.connector.grizzly.ssl.SSLReadTask.process(SSLReadTask.java:440) at com.sun.enterprise.web.connector.grizzly.ssl.SSLReadTask.doTask(SSLReadTask.java:228) at com.sun.enterprise.web.connector.grizzly.TaskBase.run(TaskBase.java:265) at com.sun.enterprise.web.connector.grizzly.ssl.SSLWorkerThread.run(SSLWorkerThread.java:106) |#] [#|2007-09-27T16:10:08.053+0200|FINEST|sun-appserver9.1|javax.enterprise.system.container.web|_ThreadID=32;_ThreadName=httpSSLWorkerThread-8443-3;ClassName=com.sun.enterprise.web.connector.grizzly.ssl.SSLUtils;MethodName=doHandshakeRead;_RequestID=b6f38050-8c00-4bf7-aeaa-71cf3cb0bf32;|doRead java.nio.channels.ClosedChannelException at sun.nio.ch.SocketChannelImpl.ensureReadOpen(SocketChannelImpl.java:113) at sun.nio.ch.SocketChannelImpl.read(SocketChannelImpl.java:156) at com.sun.enterprise.web.connector.grizzly.ssl.SSLUtils.doHandshakeRead(SSLUtils.java:206) at com.sun.enterprise.web.connector.grizzly.ssl.SSLByteBufferInputStream.doRead(SSLByteBufferInputStream.java:70) at com.sun.enterprise.web.connector.grizzly.ByteBufferInputStream.read(ByteBufferInputStream.java:167) at org.apache.coyote.http11.InternalInputBuffer.fill(InternalInputBuffer.java:743) at org.apache.coyote.http11.InternalInputBuffer$InputStreamInputBuffer.doRead(InternalInputBuffer.java:772) at org.apache.coyote.http11.filters.IdentityInputFilter.end(IdentityInputFilter.java:184) at org.apache.coyote.http11.InternalInputBuffer.endRequest(InternalInputBuffer.java:374) at com.sun.enterprise.web.connector.grizzly.DefaultProcessorTask.postResponse(DefaultProcessorTask.java:591) at com.sun.enterprise.web.connector.grizzly.DefaultProcessorTask.doProcess(DefaultProcessorTask.java:569) at com.sun.enterprise.web.connector.grizzly.DefaultProcessorTask.process(DefaultProcessorTask.java:813) at com.sun.enterprise.web.connector.grizzly.DefaultReadTask.executeProcessorTask(DefaultReadTask.java:339) at com.sun.enterprise.web.connector.grizzly.ssl.SSLReadTask.process(SSLReadTask.java:440) at com.sun.enterprise.web.connector.grizzly.ssl.SSLReadTask.doTask(SSLReadTask.java:228) at com.sun.enterprise.web.connector.grizzly.TaskBase.run(TaskBase.java:265) at com.sun.enterprise.web.connector.grizzly.ssl.SSLWorkerThread.run(SSLWorkerThread.java:106) |#] [#|2007-09-27T16:10:08.053+0200|FINEST|sun-appserver9.1|javax.enterprise.system.container.web|_ThreadID=32;_ThreadName=httpSSLWorkerThread-8443-3;ClassName=com.sun.enterprise.web.connector.grizzly.ssl.SSLUtils;MethodName=doHandshakeRead;_RequestID=b6f38050-8c00-4bf7-aeaa-71cf3cb0bf32;|doRead java.nio.channels.ClosedChannelException at sun.nio.ch.SocketChannelImpl.ensureReadOpen(SocketChannelImpl.java:113) at sun.nio.ch.SocketChannelImpl.read(SocketChannelImpl.java:156) at com.sun.enterprise.web.connector.grizzly.ssl.SSLUtils.doHandshakeRead(SSLUtils.java:206) at com.sun.enterprise.web.connector.grizzly.ssl.SSLByteBufferInputStream.doRead(SSLByteBufferInputStream.java:70) at com.sun.enterprise.web.connector.grizzly.ByteBufferInputStream.read(ByteBufferInputStream.java:167) at org.apache.coyote.http11.InternalInputBuffer.fill(InternalInputBuffer.java:743) at org.apache.coyote.http11.InternalInputBuffer$InputStreamInputBuffer.doRead(InternalInputBuffer.java:772) at org.apache.coyote.http11.filters.IdentityInputFilter.end(IdentityInputFilter.java:184) at org.apache.coyote.http11.InternalInputBuffer.endRequest(InternalInputBuffer.java:374) at com.sun.enterprise.web.connector.grizzly.DefaultProcessorTask.postResponse(DefaultProcessorTask.java:591) at com.sun.enterprise.web.connector.grizzly.DefaultProcessorTask.doProcess(DefaultProcessorTask.java:569) at com.sun.enterprise.web.connector.grizzly.DefaultProcessorTask.process(DefaultProcessorTask.java:813) at com.sun.enterprise.web.connector.grizzly.DefaultReadTask.executeProcessorTask(DefaultReadTask.java:339) at com.sun.enterprise.web.connector.grizzly.ssl.SSLReadTask.process(SSLReadTask.java:440) at com.sun.enterprise.web.connector.grizzly.ssl.SSLReadTask.doTask(SSLReadTask.java:228) at com.sun.enterprise.web.connector.grizzly.TaskBase.run(TaskBase.java:265) at com.sun.enterprise.web.connector.grizzly.ssl.SSLWorkerThread.run(SSLWorkerThread.java:106) |#] ... the java.nio.channels.ClosedChannelException is thrown repeatedly from now on...

    Java.net JIRA | 9 years ago | olafos
    java.nio.channels.ClosedChannelException

  1. davidvanlaatum 6 times, last 6 months ago
4 unregistered visitors
Not finding the right solution?
Take a tour to get the most out of Samebug.

Tired of useless tips?

Automated exception search integrated into your IDE

Root Cause Analysis

  1. java.nio.channels.ClosedChannelException

    No message provided

    at sun.nio.ch.SocketChannelImpl.ensureReadOpen()
  2. Java RT
    SocketChannelImpl.read
    1. sun.nio.ch.SocketChannelImpl.ensureReadOpen(SocketChannelImpl.java:113)
    2. sun.nio.ch.SocketChannelImpl.read(SocketChannelImpl.java:156)
    2 frames
  3. Grizzly HTTP
    SSLByteBufferInputStream.doRead
    1. com.sun.enterprise.web.connector.grizzly.ssl.SSLUtils.doRead(SSLUtils.java:106)
    2. com.sun.enterprise.web.connector.grizzly.ssl.SSLByteBufferInputStream.doRead(SSLByteBufferInputStream.java:70)
    2 frames
  4. Glassfish Core
    ByteBufferInputStream.read
    1. com.sun.enterprise.web.connector.grizzly.ByteBufferInputStream.read(ByteBufferInputStream.java:167)
    1 frame
  5. Grizzly HTTP
    InternalInputBuffer.parseRequestLine
    1. org.apache.coyote.http11.InternalInputBuffer.fill(InternalInputBuffer.java:727)
    2. org.apache.coyote.http11.InternalInputBuffer.parseRequestLine(InternalInputBuffer.java:401)
    2 frames
  6. Glassfish Core
    DefaultReadTask.executeProcessorTask
    1. com.sun.enterprise.web.connector.grizzly.DefaultProcessorTask.parseRequest(DefaultProcessorTask.java:684)
    2. com.sun.enterprise.web.connector.grizzly.DefaultProcessorTask.doProcess(DefaultProcessorTask.java:566)
    3. com.sun.enterprise.web.connector.grizzly.DefaultProcessorTask.process(DefaultProcessorTask.java:813)
    4. com.sun.enterprise.web.connector.grizzly.DefaultReadTask.executeProcessorTask(DefaultReadTask.java:339)
    4 frames
  7. Grizzly HTTP
    SSLReadTask.doTask
    1. com.sun.enterprise.web.connector.grizzly.ssl.SSLReadTask.process(SSLReadTask.java:440)
    2. com.sun.enterprise.web.connector.grizzly.ssl.SSLReadTask.doTask(SSLReadTask.java:228)
    2 frames
  8. Glassfish Core
    TaskBase.run
    1. com.sun.enterprise.web.connector.grizzly.TaskBase.run(TaskBase.java:265)
    1 frame
  9. Grizzly HTTP
    SSLWorkerThread.run
    1. com.sun.enterprise.web.connector.grizzly.ssl.SSLWorkerThread.run(SSLWorkerThread.java:106)
    1 frame