[GLASSFISH-18113] IOException in server.log when selecting server instance for collecting logs Created: 04/Jan/12  Updated: 20/Mar/13  Resolved: 20/Mar/13

Status: Resolved
Project: glassfish
Component/s: admin_gui
Affects Version/s: 3.1.2_b16
Fix Version/s: None

Type: Bug Priority: Minor
Reporter: lidiam Assignee: andriy.zhdanov
Resolution: Won't Fix Votes: 1
Labels: None
Remaining Estimate: Not Specified
Time Spent: Not Specified
Original Estimate: Not Specified
Environment:

ogs-3.1.2-b16.zip


Attachments: Text File server.log.txt    
Tags: 312_gui_new, 312_qa, 3_1_2-exclude

 Description   

Steps to reproduce:

1. Create a standalone instance and start it.
2. Go to Domain -> Domain Logs page and as soon as it displays select the newly created instance in the drop down box. The following exception is printed to the DAS server.log when the hour glass on the page disappears:

[#|2012-01-03T15:50:08.681-0800|INFO|glassfish3.1.2|javax.enterprise.resource.webcontainer.jsf.context|_ThreadID=80;_ThreadName=Thread-2;|Exception when handling error trying to reset the response.
org.apache.catalina.connector.ClientAbortException: java.io.IOException: Broken pipe
at org.apache.catalina.connector.OutputBuffer.realWriteBytes(OutputBuffer.java:430)
at com.sun.grizzly.util.buf.ByteChunk.append(ByteChunk.java:356)
at org.apache.catalina.connector.OutputBuffer.writeBytes(OutputBuffer.java:455)
at org.apache.catalina.connector.OutputBuffer.write(OutputBuffer.java:442)
at org.apache.catalina.connector.CoyoteOutputStream.write(CoyoteOutputStream.java:160)
at sun.nio.cs.StreamEncoder.writeBytes(StreamEncoder.java:202)
at sun.nio.cs.StreamEncoder.implWrite(StreamEncoder.java:263)
at sun.nio.cs.StreamEncoder.write(StreamEncoder.java:106)
at java.io.OutputStreamWriter.write(OutputStreamWriter.java:190)
at com.sun.faces.renderkit.html_basic.HtmlResponseWriter.flushAttributes(HtmlResponseWriter.java:1093)
at com.sun.faces.renderkit.html_basic.HtmlResponseWriter.closeStartIfNecessary(HtmlResponseWriter.java:1043)
at com.sun.faces.renderkit.html_basic.HtmlResponseWriter.startElement(HtmlResponseWriter.java:599)
at com.sun.webui.jsf.renderkit.html.ImageRenderer.renderStart(ImageRenderer.java:86)
at com.sun.webui.jsf.renderkit.html.AbstractRenderer.encodeBegin(AbstractRenderer.java:138)
at javax.faces.component.UIComponentBase.encodeBegin(UIComponentBase.java:820)
at com.sun.webui.jsf.util.RenderingUtilities.renderComponent(RenderingUtilities.java:89)
at com.sun.webui.jsf.renderkit.html.ImageHyperlinkRenderer.finishRenderAttributes(ImageHyperlinkRenderer.java:85)
at com.sun.webui.jsf.renderkit.html.HyperlinkRenderer.renderLink(HyperlinkRenderer.java:320)
at com.sun.webui.jsf.renderkit.html.HyperlinkRenderer.renderEnd(HyperlinkRenderer.java:184)
at com.sun.webui.jsf.renderkit.html.AbstractRenderer.encodeEnd(AbstractRenderer.java:225)
at javax.faces.component.UIComponentBase.encodeEnd(UIComponentBase.java:875)
at com.sun.webui.jsf.util.RenderingUtilities.renderComponent(RenderingUtilities.java:99)
at com.sun.webui.jsf.renderkit.html.TreeNodeRenderer.renderTreeRow(TreeNodeRenderer.java:262)
at com.sun.webui.jsf.renderkit.html.TreeNodeRenderer.encodeEnd(TreeNodeRenderer.java:177)
at javax.faces.component.UIComponentBase.encodeEnd(UIComponentBase.java:875)
at com.sun.webui.jsf.util.RenderingUtilities.renderComponent(RenderingUtilities.java:99)
at com.sun.webui.jsf.renderkit.html.TreeNodeRenderer.encodeEnd(TreeNodeRenderer.java:206)
at javax.faces.component.UIComponentBase.encodeEnd(UIComponentBase.java:875)
at com.sun.webui.jsf.util.RenderingUtilities.renderComponent(RenderingUtilities.java:99)
at com.sun.webui.jsf.renderkit.html.TreeNodeRenderer.encodeEnd(TreeNodeRenderer.java:206)
at javax.faces.component.UIComponentBase.encodeEnd(UIComponentBase.java:875)
at com.sun.webui.jsf.util.RenderingUtilities.renderComponent(RenderingUtilities.java:99)
at com.sun.webui.jsf.renderkit.html.TreeRenderer.encodeEnd(TreeRenderer.java:196)
at javax.faces.component.UIComponentBase.encodeEnd(UIComponentBase.java:875)
at com.sun.jsftemplating.layout.descriptors.LayoutElementBase.encodeChild(LayoutElementBase.java:558)
at com.sun.jsftemplating.layout.descriptors.LayoutElementBase.encodeChild(LayoutElementBase.java:555)
at com.sun.jsftemplating.layout.descriptors.LayoutElementBase.encodeChild(LayoutElementBase.java:555)
at com.sun.jsftemplating.layout.descriptors.LayoutElementBase.encodeChild(LayoutElementBase.java:555)
at com.sun.jsftemplating.layout.descriptors.LayoutElementBase.encodeChild(LayoutElementBase.java:555)
at com.sun.jsftemplating.layout.descriptors.LayoutComponent.encode(LayoutComponent.java:243)
at com.sun.jsftemplating.layout.descriptors.LayoutComposition.encodeThis(LayoutComposition.java:161)
at com.sun.jsftemplating.layout.descriptors.LayoutElementBase.encode(LayoutElementBase.java:330)
at com.sun.jsftemplating.layout.descriptors.LayoutComposition.encodeThis(LayoutComposition.java:161)
at com.sun.jsftemplating.layout.descriptors.LayoutElementBase.encode(LayoutElementBase.java:330)
at com.sun.jsftemplating.layout.descriptors.LayoutComposition.encodeThis(LayoutComposition.java:161)
at com.sun.jsftemplating.layout.descriptors.LayoutElementBase.encode(LayoutElementBase.java:330)
at com.sun.jsftemplating.layout.descriptors.LayoutElementBase.encode(LayoutElementBase.java:348)
at com.sun.jsftemplating.layout.descriptors.LayoutDefinition.encode(LayoutDefinition.java:246)
at com.sun.jsftemplating.layout.LayoutViewHandler.renderView(LayoutViewHandler.java:683)
at com.sun.faces.lifecycle.RenderResponsePhase.execute(RenderResponsePhase.java:121)
at com.sun.faces.lifecycle.Phase.doPhase(Phase.java:101)
at com.sun.faces.lifecycle.LifecycleImpl.render(LifecycleImpl.java:139)
at javax.faces.webapp.FacesServlet.service(FacesServlet.java:594)
at org.apache.catalina.core.StandardWrapper.service(StandardWrapper.java:1542)
at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:343)
at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:217)
at com.sun.webui.jsf.util.UploadFilter.doFilter(UploadFilter.java:233)
at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:256)
at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:217)
at org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:279)
at org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:175)
at org.apache.catalina.core.StandardPipeline.doInvoke(StandardPipeline.java:655)
at org.apache.catalina.core.StandardPipeline.invoke(StandardPipeline.java:595)
at org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:161)
at org.apache.catalina.connector.CoyoteAdapter.doService(CoyoteAdapter.java:331)
at org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.java:231)
at com.sun.enterprise.v3.services.impl.ContainerMapper.service(ContainerMapper.java:232)
at com.sun.grizzly.http.ProcessorTask.invokeAdapter(ProcessorTask.java:849)
at com.sun.grizzly.http.ProcessorTask.doProcess(ProcessorTask.java:746)
at com.sun.grizzly.http.ProcessorTask.process(ProcessorTask.java:1045)
at com.sun.grizzly.http.DefaultProtocolFilter.execute(DefaultProtocolFilter.java:228)
at com.sun.grizzly.DefaultProtocolChain.executeProtocolFilter(DefaultProtocolChain.java:137)
at com.sun.grizzly.DefaultProtocolChain.execute(DefaultProtocolChain.java:104)
at com.sun.grizzly.DefaultProtocolChain.execute(DefaultProtocolChain.java:90)
at com.sun.grizzly.http.HttpProtocolChain.execute(HttpProtocolChain.java:79)
at com.sun.grizzly.ProtocolChainContextTask.doCall(ProtocolChainContextTask.java:54)
at com.sun.grizzly.SelectionKeyContextTask.call(SelectionKeyContextTask.java:59)
at com.sun.grizzly.ContextTask.run(ContextTask.java:71)
at com.sun.grizzly.util.AbstractThreadPool$Worker.doWork(AbstractThreadPool.java:532)
at com.sun.grizzly.util.AbstractThreadPool$Worker.run(AbstractThreadPool.java:513)
at java.lang.Thread.run(Thread.java:662)
Caused by: java.io.IOException: Broken pipe
at sun.nio.ch.FileDispatcher.write0(Native Method)
at sun.nio.ch.SocketDispatcher.write(SocketDispatcher.java:29)
at sun.nio.ch.IOUtil.writeFromNativeBuffer(IOUtil.java:69)
at sun.nio.ch.IOUtil.write(IOUtil.java:40)
at sun.nio.ch.SocketChannelImpl.write(SocketChannelImpl.java:334)
at com.sun.grizzly.util.OutputWriter.flushChannel(OutputWriter.java:108)
at com.sun.grizzly.util.OutputWriter.flushChannel(OutputWriter.java:76)
at com.sun.grizzly.util.SSLOutputWriter.flushChannel(SSLOutputWriter.java:102)
at com.sun.grizzly.ssl.SSLOutputBuffer.flushChannel(SSLOutputBuffer.java:138)
at com.sun.grizzly.http.SocketChannelOutputBuffer.flushBuffer(SocketChannelOutputBuffer.java:489)
at com.sun.grizzly.http.SocketChannelOutputBuffer.realWriteBytes(SocketChannelOutputBuffer.java:373)
at com.sun.grizzly.tcp.http11.InternalOutputBuffer$OutputStreamOutputBuffer.doWrite(InternalOutputBuffer.java:894)
at com.sun.grizzly.tcp.http11.filters.ChunkedOutputFilter.doWrite(ChunkedOutputFilter.java:167)
at com.sun.grizzly.tcp.http11.InternalOutputBuffer.doWrite(InternalOutputBuffer.java:661)
at com.sun.grizzly.tcp.Response.doWrite(Response.java:685)
at org.apache.catalina.connector.OutputBuffer.realWriteBytes(OutputBuffer.java:425)
... 80 more

#]

This exception is due to some timing issue on this page. If I go to Domain Logs page and wait for the hour glass to disappear and THEN select the new server instance, the exception is not printed. However, if I select the instance while the hour glass is still displayed, the exception appears in the server.log. Therefore this issue may not be noticeable on a fast machine.



 Comments   
Comment by andriy.zhdanov [ 04/Jan/12 ]

Can not reproduce: when starting an instance, I can't get to Domain Logs page, I click Domain and then Domain Logs tab, but "Long running process" pop up appears and as soon as it's over, Stanadlone Instances page is displayed, and it's too late to go to Domain Logs tab again.

Comment by lidiam [ 04/Jan/12 ]

This will always happen on a slower system (happens all the time for me). I'll send you machine details so you can see it/test.

Comment by lidiam [ 06/Jan/12 ]

This issue should not be assigned to me.

There is another side effect of this screen still loading after it is displayed: the next action does not take place. Here is how to reproduce:

1. Go to Domain Logs page and then click on server node BEFORE the hour glass disappears (while the page is still doing something).
2. Click on Rotate Log button. A "long process" message is displayed but once it is gone, DAS server.log is not rotated and the above mentioned exception is written to the log file.

If I click on Rotate Log button again, it is rotated then. Perhaps we should have a "long process is running" message displayed on Domain Logs page as well till it's done loading?

Comment by Anissa Lam [ 13/Jan/12 ]

This bug is hard to reproduce and is not a frequent operation.
Downgrade to P4 and exclude from 3.1.2 release as we have passed HCF and only show stopper bug will be addressed.

Comment by Anissa Lam [ 20/Mar/13 ]

From previous comment, this is a hard to reproduce bug, and i cannot reproduce this even on the slowest machine i can find.
This isn't a frequent operation either.
Marking as won't fix.

Generated at Tue May 05 06:44:34 UTC 2015 using JIRA 6.2.3#6260-sha1:63ef1d6dac3f4f4d7db4c1effd405ba38ccdc558.