java.nio.channels.ClosedChannelException

There are no available Samebug tips for this exception. Do you have an idea how to solve this issue? A short tip would help users who saw this issue last week.

  • restart-domain in b47 failed on me and apparently the jvm process died too. $ bin/asadmin restart-domain domain1 Timed out waiting for the server to restart Command restart-domain failed. $ ps -ef | grep glassfish 501 58372 7844 0 0:00.00 ttys002 0:00.00 grep glassfish $ tail -45 glassfish/domains/domain1/logs/server.log [#|2009-05-04T03:58:55.040-0700|INFO|glassfish|org.jvnet.hk2.osgiadapter|_ThreadID=19;_ThreadName=Thread-1;org.glassfish.common.amx-ext-impl [28];|Started bundle org.glassfish.common.amx-ext-impl [28]|#] [#|2009-05-04T04:00:46.991-0700|INFO|glassfish|javax.enterprise.system.tools.admin.org.glassfish.server|_ThreadID=20;_ThreadName=Thread-1;|Server restart initiated|#] [#|2009-05-04T04:00:47.605-0700|SEVERE|glassfish|com.sun.grizzly.config.GrizzlyServiceListener|_ThreadID=18;_ThreadName=Thread-1;|service exception java.lang.RuntimeException: ClientAbortException: java.nio.channels.ClosedChannelException at com.sun.enterprise.v3.admin.AdminAdapter.service(AdminAdapter.java:212) at com.sun.grizzly.tcp.http11.GrizzlyAdapter.service(GrizzlyAdapter.java:165) at com.sun.enterprise.v3.server.HK2Dispatcher.dispath(HK2Dispatcher.java:100) at com.sun.enterprise.v3.services.impl.ContainerMapper.service(ContainerMapper.java:202) at com.sun.grizzly.http.ProcessorTask.invokeAdapter(ProcessorTask.java:740) at com.sun.grizzly.http.ProcessorTask.doProcess(ProcessorTask.java:631) at com.sun.grizzly.http.ProcessorTask.process(ProcessorTask.java:900) at com.sun.grizzly.http.DefaultProtocolFilter.execute(DefaultProtocolFilter.java:162) at com.sun.grizzly.DefaultProtocolChain.executeProtocolFilter(DefaultProtocolChain.java:136) at com.sun.grizzly.DefaultProtocolChain.execute(DefaultProtocolChain.java:103) at com.sun.grizzly.DefaultProtocolChain.execute(DefaultProtocolChain.java:89) at com.sun.grizzly.http.HttpProtocolChain.execute(HttpProtocolChain.java:76) at com.sun.grizzly.ProtocolChainContextTask.doCall(ProtocolChainContextTask.java:53) at com.sun.grizzly.SelectionKeyContextTask.call(SelectionKeyContextTask.java:57) at com.sun.grizzly.ContextTask.run(ContextTask.java:69) at java.util.concurrent.ThreadPoolExecutor$Worker.runTask(ThreadPoolExecutor.java:885) at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:907) at java.lang.Thread.run(Thread.java:637) Caused by: ClientAbortException: java.nio.channels.ClosedChannelException at com.sun.grizzly.tcp.http11.GrizzlyOutputBuffer.doFlush(GrizzlyOutputBuffer.java:437) at com.sun.grizzly.tcp.http11.GrizzlyOutputBuffer.flush(GrizzlyOutputBuffer.java:403) at com.sun.grizzly.tcp.http11.GrizzlyOutputStream.flush(GrizzlyOutputStream.java:138) at com.sun.enterprise.v3.admin.AdminAdapter.service(AdminAdapter.java:209) ... 17 more Caused by: java.nio.channels.ClosedChannelException at sun.nio.ch.SocketChannelImpl.ensureWriteOpen(SocketChannelImpl.java:126) at sun.nio.ch.SocketChannelImpl.write(SocketChannelImpl.java:324) at com.sun.grizzly.util.OutputWriter.flushChannel(OutputWriter.java:106) at com.sun.grizzly.util.OutputWriter.flushChannel(OutputWriter.java:73) at com.sun.grizzly.http.SocketChannelOutputBuffer.flushChannel(SocketChannelOutputBuffer.java:309) at com.sun.grizzly.http.SocketChannelOutputBuffer.flushBuffer(SocketChannelOutputBuffer.java:374) at com.sun.grizzly.http.SocketChannelOutputBuffer.flush(SocketChannelOutputBuffer.java:352) at com.sun.grizzly.http.ProcessorTask.action(ProcessorTask.java:1125) at com.sun.grizzly.tcp.Response.action(Response.java:257) at com.sun.grizzly.tcp.http11.GrizzlyOutputBuffer.doFlush(GrizzlyOutputBuffer.java:432) ... 20 more |#]
    via by iminar,
  • when domain restart is attempted using restart-domain command the following exception is seen in server.log. This doesnot happen when the domain is stopped/started using stop/start-domain commands. [#|2009-06-17T05:22:11.921-0700|INFO|glassfish|javax.enterprise.system.tools.admin.org.glassfish.server|_ThreadID=17;_ThreadName=Thread-1;|Server restart initiated|#] [#|2009-06-17T05:22:12.546-0700|SEVERE|glassfish|com.sun.grizzly.config.GrizzlyServiceListener|_ThreadID=18;_ThreadName=Thread-1;|service exception java.lang.RuntimeException: ClientAbortException: java.nio.channels.ClosedChannelException at com.sun.enterprise.v3.admin.AdminAdapter.service(AdminAdapter.java:212) at com.sun.grizzly.tcp.http11.GrizzlyAdapter.service(GrizzlyAdapter.java:165) at com.sun.enterprise.v3.server.HK2Dispatcher.dispath(HK2Dispatcher.java:100) at com.sun.enterprise.v3.services.impl.ContainerMapper.service(ContainerMapper.java:209) at com.sun.grizzly.http.ProcessorTask.invokeAdapter(ProcessorTask.java:746) at com.sun.grizzly.http.ProcessorTask.doProcess(ProcessorTask.java:655) at com.sun.grizzly.http.ProcessorTask.process(ProcessorTask.java:905) at com.sun.grizzly.http.DefaultProtocolFilter.execute(DefaultProtocolFilter.java:161) at com.sun.grizzly.DefaultProtocolChain.executeProtocolFilter(DefaultProtocolChain.java:136) at com.sun.grizzly.DefaultProtocolChain.execute(DefaultProtocolChain.java:103) at com.sun.grizzly.DefaultProtocolChain.execute(DefaultProtocolChain.java:89) at com.sun.grizzly.http.HttpProtocolChain.execute(HttpProtocolChain.java:76) at com.sun.grizzly.ProtocolChainContextTask.doCall(ProtocolChainContextTask.java:53) at com.sun.grizzly.SelectionKeyContextTask.call(SelectionKeyContextTask.java:57) at com.sun.grizzly.ContextTask.run(ContextTask.java:69) at java.util.concurrent.ThreadPoolExecutor$Worker.runTask(ThreadPoolExecutor.java:885) at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:907) at java.lang.Thread.run(Thread.java:619) Caused by: ClientAbortException: java.nio.channels.ClosedChannelException at com.sun.grizzly.tcp.http11.GrizzlyOutputBuffer.doFlush(GrizzlyOutputBuffer.java:436) at com.sun.grizzly.tcp.http11.GrizzlyOutputBuffer.flush(GrizzlyOutputBuffer.java:402) at com.sun.grizzly.tcp.http11.GrizzlyOutputStream.flush(GrizzlyOutputStream.java:138) at com.sun.enterprise.v3.admin.AdminAdapter.service(AdminAdapter.java:209) ... 17 more Caused by: java.nio.channels.ClosedChannelException at sun.nio.ch.SocketChannelImpl.ensureWriteOpen(SocketChannelImpl.java:126) at sun.nio.ch.SocketChannelImpl.write(SocketChannelImpl.java:324) at com.sun.grizzly.util.OutputWriter.flushChannel(OutputWriter.java:106) at com.sun.grizzly.util.OutputWriter.flushChannel(OutputWriter.java:73) at com.sun.grizzly.http.SocketChannelOutputBuffer.flushChannel(SocketChannelOutputBuffer.java:325) at com.sun.grizzly.http.SocketChannelOutputBuffer.flushBuffer(SocketChannelOutputBuffer.java:390) at com.sun.grizzly.http.SocketChannelOutputBuffer.flush(SocketChannelOutputBuffer.java:368) at com.sun.grizzly.http.ProcessorTask.action(ProcessorTask.java:1121) at com.sun.grizzly.tcp.Response.action(Response.java:257) at com.sun.grizzly.tcp.http11.GrizzlyOutputBuffer.doFlush(GrizzlyOutputBuffer.java:431) ... 20 more |#]
    via by sankarpn,
  • B47a The command simply timesout after shutting down the domain. jps -lm 5563 com.sun.enterprise.glassfish.bootstrap.ASMain -domainname domain1 -asadmin-args start-domain -instancename server -verbose false -debug false -asadmin-classpath bin/../glassfish/modules/admin-cli.jar -asadmin-classname com.sun.enterprise.admin.cli.AsadminMain -domaindir /export/home/user/sankar/ws/v3/glassfishv3/glassfish/domains/domain1 5610 sun.tools.jps.Jps -lm aroot@easqeopt18:/export/home/user/sankar/ws/v3/glassfishv3# aroot@easqeopt18:/export/home/user/sankar/ws/v3/glassfishv3# bin/asadmin restart-domain Timed out waiting for the server to restart Command restart-domain failed. This is the server.log contents [#|2009-05-05T17:13:08.569-0700|INFO|glassfish|javax.enterprise.system.tools.admin.org.glassfish.server|_ThreadID=17;_ThreadName=Thread-1;|Server restart initiated|#] [#|2009-05-05T17:13:08.884-0700|SEVERE|glassfish|grizzly|_ThreadID=18;_ThreadName=Thread-1;|service exception java.lang.RuntimeException: ClientAbortException: java.nio.channels.ClosedChannelException at com.sun.enterprise.v3.admin.AdminAdapter.service(AdminAdapter.java:212) at com.sun.grizzly.tcp.http11.GrizzlyAdapter.service(GrizzlyAdapter.java:165) at com.sun.enterprise.v3.server.HK2Dispatcher.dispath(HK2Dispatcher.java:100) at com.sun.enterprise.v3.services.impl.ContainerMapper.service(ContainerMapper.java:202) at com.sun.grizzly.http.ProcessorTask.invokeAdapter(ProcessorTask.java:746) at com.sun.grizzly.http.ProcessorTask.doProcess(ProcessorTask.java:655) at com.sun.grizzly.http.ProcessorTask.process(ProcessorTask.java:905) at com.sun.grizzly.http.DefaultProtocolFilter.execute(DefaultProtocolFilter.java:161) at com.sun.grizzly.DefaultProtocolChain.executeProtocolFilter(DefaultProtocolChain.java:136) at com.sun.grizzly.DefaultProtocolChain.execute(DefaultProtocolChain.java:103) at com.sun.grizzly.DefaultProtocolChain.execute(DefaultProtocolChain.java:89) at com.sun.grizzly.http.HttpProtocolChain.execute(HttpProtocolChain.java:76) at com.sun.grizzly.ProtocolChainContextTask.doCall(ProtocolChainContextTask.java:53) at com.sun.grizzly.SelectionKeyContextTask.call(SelectionKeyContextTask.java:57) at com.sun.grizzly.ContextTask.run(ContextTask.java:69) at java.util.concurrent.ThreadPoolExecutor$Worker.runTask(ThreadPoolExecutor.java:886) at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:908) at java.lang.Thread.run(Thread.java:619) Caused by: ClientAbortException: java.nio.channels.ClosedChannelException at com.sun.grizzly.tcp.http11.GrizzlyOutputBuffer.doFlush(GrizzlyOutputBuffer.java:436) at com.sun.grizzly.tcp.http11.GrizzlyOutputBuffer.flush(GrizzlyOutputBuffer.java:402) at com.sun.grizzly.tcp.http11.GrizzlyOutputStream.flush(GrizzlyOutputStream.java:138) at com.sun.enterprise.v3.admin.AdminAdapter.service(AdminAdapter.java:209) ... 17 more Caused by: java.nio.channels.ClosedChannelException at sun.nio.ch.SocketChannelImpl.ensureWriteOpen(SocketChannelImpl.java:126) at sun.nio.ch.SocketChannelImpl.write(SocketChannelImpl.java:324) at com.sun.grizzly.util.OutputWriter.flushChannel(OutputWriter.java:106) at com.sun.grizzly.util.OutputWriter.flushChannel(OutputWriter.java:73) at com.sun.grizzly.http.SocketChannelOutputBuffer.flushChannel(SocketChannelOutputBuffer.java:325) at com.sun.grizzly.http.SocketChannelOutputBuffer.flushBuffer(SocketChannelOutputBuffer.java:390) at com.sun.grizzly.http.SocketChannelOutputBuffer.flush(SocketChannelOutputBuffer.java:368) at com.sun.grizzly.http.ProcessorTask.action(ProcessorTask.java:1121) at com.sun.grizzly.tcp.Response.action(Response.java:257) at com.sun.grizzly.tcp.http11.GrizzlyOutputBuffer.doFlush(GrizzlyOutputBuffer.java:431) ... 20 more |#] [#|2009-05-05T17:13:08.923-0700|INFO|glassfish|javax.enterprise.resource.jta.com.sun.enterprise.transaction|_ThreadID=17;_ThreadName=Thread-1;|Using com.sun.enterprise.transaction.jts.JavaEETransactionManagerJTSDelegate as the delegate|#] [#|2009-05-05T17:13:08.941-0700|INFO|glassfish|org.jvnet.hk2.osgiadapter|_ThreadID=17;_ThreadName=Thread-1;org.glassfish.connectors.work-management [57];|Started bundle org.glassfish.connectors.work-management [57]|#] [#|2009-05-05T17:13:08.943-0700|INFO|glassfish|org.jvnet.hk2.osgiadapter|_ThreadID=17;_ThreadName=Thread-1;org.glassfish.connectors.internal-api [82];|Started bundle org.glassfish.connectors.internal-api [82]|#]
    via by sankarpn,
  • Running web devtest readerThreadsConfig and readerSelectorsConfig causes [echo] asadmin set --user admin --passwordfile /Users/Amy/glassfish-v3/v3/appserv-tests/config/adminpassword.txt --host localhost --port 4848 --echo=true --terse=true configs.config.server-config.network-config.transports.transport.tcp.acceptor-threads=5 [exec] set --echo=true --terse=true --port=4848 --host=localhost --passwordfile=/Users/Amy/glassfish-v3/v3/appserv-tests/config/adminpassword.txt --user=admin configs.config.server-config.network-config.transports.transport.tcp.acceptor-threads=5 [exec] Remote server does not listen for requests on [localhost:4848]. [exec] Is the server up? [exec] No such local command, set. To run remote commands, start the application server (e.g. asadmin start-domain). [exec] Result: 2 deploy: deploy-war-common: setOSConditions: setToolWin: setToolUnix: setToolProperty: setS1ASclassPath: init-common: deploy-war-commonpe: [exec] deploy --echo=true --terse=true --port=4848 --precompilejsp=true --contextroot=/web-readerThreadsConfig --host=localhost --passwordfile=/Users/Amy/glassfish-v3/v3/appserv-tests/config/adminpassword.txt --target=server --force=false --user=admin --upload=true [exec] Remote server does not listen for requests on [localhost:4848]. [exec] Is the server up? [exec] No such local command, deploy. To run remote commands, start the application server (e.g. asadmin start-domain). [exec] Result: 2 server.log ===== [#|2009-05-11T14:35:57.188-0700|SEVERE|glassfish|grizzly|_ThreadID=17;_ThreadName=Thread-1;|service exception java.lang.RuntimeException: ClientAbortException: java.nio.channels.ClosedChannelException at com.sun.enterprise.v3.admin.AdminAdapter.service(AdminAdapter.java:212) at com.sun.grizzly.tcp.http11.GrizzlyAdapter.service(GrizzlyAdapter.java:165) at com.sun.enterprise.v3.server.HK2Dispatcher.dispath(HK2Dispatcher.java:100) at com.sun.enterprise.v3.services.impl.ContainerMapper.service(ContainerMapper.java:209) at com.sun.grizzly.http.ProcessorTask.invokeAdapter(ProcessorTask.java:746) at com.sun.grizzly.http.ProcessorTask.doProcess(ProcessorTask.java:655) at com.sun.grizzly.http.ProcessorTask.process(ProcessorTask.java:905) at com.sun.grizzly.http.DefaultProtocolFilter.execute(DefaultProtocolFilter.java:161) at com.sun.grizzly.DefaultProtocolChain.executeProtocolFilter(DefaultProtocolChain.java:136) at com.sun.grizzly.DefaultProtocolChain.execute(DefaultProtocolChain.java:103) at com.sun.grizzly.DefaultProtocolChain.execute(DefaultProtocolChain.java:89) at com.sun.grizzly.http.HttpProtocolChain.execute(HttpProtocolChain.java:76) at com.sun.grizzly.ProtocolChainContextTask.doCall(ProtocolChainContextTask.java:53) at com.sun.grizzly.SelectionKeyContextTask.call(SelectionKeyContextTask.java:57) at com.sun.grizzly.ContextTask.run(ContextTask.java:69) at java.util.concurrent.ThreadPoolExecutor$Worker.runTask(ThreadPoolExecutor.java:885) at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:907) at java.lang.Thread.run(Thread.java:637) Caused by: ClientAbortException: java.nio.channels.ClosedChannelException at com.sun.grizzly.tcp.http11.GrizzlyOutputBuffer.doFlush(GrizzlyOutputBuffer.java:436) at com.sun.grizzly.tcp.http11.GrizzlyOutputBuffer.flush(GrizzlyOutputBuffer.java:402) at com.sun.grizzly.tcp.http11.GrizzlyOutputStream.flush(GrizzlyOutputStream.java:138) at com.sun.enterprise.v3.admin.AdminAdapter.service(AdminAdapter.java:209) ... 17 more Caused by: java.nio.channels.ClosedChannelException at sun.nio.ch.SocketChannelImpl.ensureWriteOpen(SocketChannelImpl.java:126) at sun.nio.ch.SocketChannelImpl.write(SocketChannelImpl.java:324) at com.sun.grizzly.util.OutputWriter.flushChannel(OutputWriter.java:106) at com.sun.grizzly.util.OutputWriter.flushChannel(OutputWriter.java:73) at com.sun.grizzly.http.SocketChannelOutputBuffer.flushChannel(SocketChannelOutputBuffer.java:325) at com.sun.grizzly.http.SocketChannelOutputBuffer.flushBuffer(SocketChannelOutputBuffer.java:390) at com.sun.grizzly.http.SocketChannelOutputBuffer.flush(SocketChannelOutputBuffer.java:368) at com.sun.grizzly.http.ProcessorTask.action(ProcessorTask.java:1121) at com.sun.grizzly.tcp.Response.action(Response.java:257) at com.sun.grizzly.tcp.http11.GrizzlyOutputBuffer.doFlush(GrizzlyOutputBuffer.java:431) ... 20 more |#]
    via by Amy Roh,
    • java.nio.channels.ClosedChannelException at com.sun.enterprise.v3.admin.AdminAdapter.service(AdminAdapter.java:212) at com.sun.grizzly.tcp.http11.GrizzlyAdapter.service(GrizzlyAdapter.java:165) at com.sun.enterprise.v3.server.HK2Dispatcher.dispath(HK2Dispatcher.java:100)
    No Bugmate found.