qpid-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Keith Wall (JIRA)" <j...@apache.org>
Subject [jira] [Commented] (QPID-6761) Broken pipe in http management results in alerting error messages in the logs
Date Wed, 11 Nov 2015 08:31:11 GMT

    [ https://issues.apache.org/jira/browse/QPID-6761?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=15000114#comment-15000114
] 

Keith Wall commented on QPID-6761:
----------------------------------

I don't think this is practical with the code in it current form.  The difficulty stems from
our use of {{Subject.doAs}} (used to temporarily associate the Subject with the running thread).
  Any exceptions during the course of the privileged action are propagated as PrivilegedActionException.
 This will include org.eclipse.jetty.io.EofExceptions,  Our code used to log the PAE, unwrapped
it, and rethrew as a CSRE. The filter would have been seeing a CSRE and would would have to
unwrap it itself to know that it special.

I think in the long term, the Subject.doAs should possible be pushed up into a filter.  I
think that would allow exception handling to be unified in ExceptionHandlingFilter .

> Broken pipe in http management results in alerting error messages in the logs
> -----------------------------------------------------------------------------
>
>                 Key: QPID-6761
>                 URL: https://issues.apache.org/jira/browse/QPID-6761
>             Project: Qpid
>          Issue Type: Improvement
>          Components: Java Broker
>    Affects Versions: 0.32
>            Reporter: Lorenz Quack
>            Assignee: Keith Wall
>            Priority: Minor
>             Fix For: qpid-java-6.0
>
>
> It seems that a connection to a http session that closes unexpectedly can lead to a ConnectionScopedRuntimeException
which is logged as ERROR in the log files with full stack trace which is more alarming than
it needs to be.
> {code}
> 2015-09-28 10:14:31,172 ERROR [HttpManagement-2190] rest.AbstractServlet (AbstractServlet.java:219)
- Unable to perform action
> java.security.PrivilegedActionException: org.eclipse.jetty.io.EofException: timeout
> 	at java.security.AccessController.doPrivileged(Native Method)
> 	at javax.security.auth.Subject.doAs(Subject.java:415)
> 	at org.apache.qpid.server.management.plugin.servlet.rest.AbstractServlet.doWithSubjectAndActor(AbstractServlet.java:210)
> 	at org.apache.qpid.server.management.plugin.servlet.rest.AbstractServlet.doGet(AbstractServlet.java:73)
> 	at javax.servlet.http.HttpServlet.service(HttpServlet.java:575)
> 	at javax.servlet.http.HttpServlet.service(HttpServlet.java:668)
> 	at org.eclipse.jetty.servlet.ServletHolder.handle(ServletHolder.java:684)
> 	at org.eclipse.jetty.servlet.ServletHandler$CachedChain.doFilter(ServletHandler.java:1496)
> 	at org.apache.qpid.server.management.plugin.filter.ForbiddingAuthorisationFilter.doFilter(ForbiddingAuthorisationFilter.java:90)
> 	at org.eclipse.jetty.servlet.ServletHandler$CachedChain.doFilter(ServletHandler.java:1467)
> 	at org.apache.qpid.server.management.plugin.filter.ForbiddingTraceFilter.doFilter(ForbiddingTraceFilter.java:65)
> 	at org.eclipse.jetty.servlet.ServletHandler$CachedChain.doFilter(ServletHandler.java:1467)
> 	at org.eclipse.jetty.servlet.ServletHandler.doHandle(ServletHandler.java:499)
> 	at org.eclipse.jetty.server.session.SessionHandler.doHandle(SessionHandler.java:229)
> 	at org.eclipse.jetty.server.handler.ContextHandler.doHandle(ContextHandler.java:1086)
> 	at org.eclipse.jetty.servlet.ServletHandler.doScope(ServletHandler.java:428)
> 	at org.eclipse.jetty.server.session.SessionHandler.doScope(SessionHandler.java:193)
> 	at org.eclipse.jetty.server.handler.ContextHandler.doScope(ContextHandler.java:1020)
> 	at org.eclipse.jetty.server.handler.ScopedHandler.handle(ScopedHandler.java:135)
> 	at org.eclipse.jetty.server.handler.HandlerWrapper.handle(HandlerWrapper.java:116)
> 	at org.eclipse.jetty.server.Server.handle(Server.java:370)
> 	at org.eclipse.jetty.server.AbstractHttpConnection.handleRequest(AbstractHttpConnection.java:494)
> 	at org.eclipse.jetty.server.AbstractHttpConnection.headerComplete(AbstractHttpConnection.java:971)
> 	at org.eclipse.jetty.server.AbstractHttpConnection$RequestHandler.headerComplete(AbstractHttpConnection.java:1033)
> 	at org.eclipse.jetty.http.HttpParser.parseNext(HttpParser.java:644)
> 	at org.eclipse.jetty.http.HttpParser.parseAvailable(HttpParser.java:235)
> 	at org.eclipse.jetty.server.AsyncHttpConnection.handle(AsyncHttpConnection.java:82)
> 	at org.eclipse.jetty.io.nio.SelectChannelEndPoint.handle(SelectChannelEndPoint.java:667)
> 	at org.eclipse.jetty.io.nio.SelectChannelEndPoint$1.run(SelectChannelEndPoint.java:52)
> 	at org.eclipse.jetty.util.thread.QueuedThreadPool.runJob(QueuedThreadPool.java:608)
> 	at org.eclipse.jetty.util.thread.QueuedThreadPool$3.run(QueuedThreadPool.java:543)
> 	at java.lang.Thread.run(Thread.java:724)
> Caused by: org.eclipse.jetty.io.EofException: timeout
> 	at org.eclipse.jetty.http.AbstractGenerator.blockForOutput(AbstractGenerator.java:520)
> 	at org.eclipse.jetty.server.HttpOutput.write(HttpOutput.java:170)
> 	at org.eclipse.jetty.server.HttpOutput.write(HttpOutput.java:107)
> 	at sun.nio.cs.StreamEncoder.writeBytes(StreamEncoder.java:221)
> 	at sun.nio.cs.StreamEncoder.implWrite(StreamEncoder.java:282)
> 	at sun.nio.cs.StreamEncoder.write(StreamEncoder.java:125)
> 	at java.io.OutputStreamWriter.write(OutputStreamWriter.java:207)
> 	at java.io.BufferedWriter.flushBuffer(BufferedWriter.java:129)
> 	at java.io.BufferedWriter.write(BufferedWriter.java:199)
> 	at org.codehaus.jackson.impl.WriterBasedGenerator._writeString2(WriterBasedGenerator.java:1028)
> 	at org.codehaus.jackson.impl.WriterBasedGenerator._writeString(WriterBasedGenerator.java:996)
> 	at org.codehaus.jackson.impl.WriterBasedGenerator.writeString(WriterBasedGenerator.java:448)
> 	at org.codehaus.jackson.map.ser.std.StringSerializer.serialize(StringSerializer.java:28)
> 	at org.codehaus.jackson.map.ser.std.StringSerializer.serialize(StringSerializer.java:18)
> 	at org.codehaus.jackson.map.ser.std.MapSerializer.serializeFields(MapSerializer.java:262)
> 	at org.codehaus.jackson.map.ser.std.MapSerializer.serialize(MapSerializer.java:186)
> 	at org.codehaus.jackson.map.ser.std.MapSerializer.serialize(MapSerializer.java:23)
> 	at org.codehaus.jackson.map.ser.std.MapSerializer.serializeFields(MapSerializer.java:262)
> 	at org.codehaus.jackson.map.ser.std.MapSerializer.serialize(MapSerializer.java:186)
> 	at org.codehaus.jackson.map.ser.std.MapSerializer.serialize(MapSerializer.java:23)
> 	at org.codehaus.jackson.map.ser.std.StdContainerSerializers$IndexedListSerializer.serializeContents(StdContainerSerializers.java:122)
> 	at org.codehaus.jackson.map.ser.std.StdContainerSerializers$IndexedListSerializer.serializeContents(StdContainerSerializers.java:71)
> 	at org.codehaus.jackson.map.ser.std.AsArraySerializerBase.serialize(AsArraySerializerBase.java:86)
> 	at org.codehaus.jackson.map.ser.std.MapSerializer.serializeFields(MapSerializer.java:262)
> 	at org.codehaus.jackson.map.ser.std.MapSerializer.serialize(MapSerializer.java:186)
> 	at org.codehaus.jackson.map.ser.std.MapSerializer.serialize(MapSerializer.java:23)
> 	at org.codehaus.jackson.map.ser.std.StdContainerSerializers$IndexedListSerializer.serializeContents(StdContainerSerializers.java:122)
> 	at org.codehaus.jackson.map.ser.std.StdContainerSerializers$IndexedListSerializer.serializeContents(StdContainerSerializers.java:71)
> 	at org.codehaus.jackson.map.ser.std.AsArraySerializerBase.serialize(AsArraySerializerBase.java:86)
> 	at org.codehaus.jackson.map.ser.StdSerializerProvider._serializeValue(StdSerializerProvider.java:610)
> 	at org.codehaus.jackson.map.ser.StdSerializerProvider.serializeValue(StdSerializerProvider.java:256)
> 	at org.codehaus.jackson.map.ObjectMapper._configAndWriteValue(ObjectMapper.java:2566)
> 	at org.codehaus.jackson.map.ObjectMapper.writeValue(ObjectMapper.java:2072)
> 	at org.apache.qpid.server.management.plugin.servlet.rest.RestServlet.doGetWithSubjectAndActor(RestServlet.java:381)
> 	at org.apache.qpid.server.management.plugin.servlet.rest.AbstractServlet$1.run(AbstractServlet.java:79)
> 	at org.apache.qpid.server.management.plugin.servlet.rest.AbstractServlet$1.run(AbstractServlet.java:75)
> 	... 32 more
> {code}



--
This message was sent by Atlassian JIRA
(v6.3.4#6332)

---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@qpid.apache.org
For additional commands, e-mail: dev-help@qpid.apache.org


Mime
View raw message