[Sakai Jira] Created: (KERN-1147) Exception in logs

5 views
Skip to first unread message

Oszkar Nagy (JIRA)

unread,
Sep 27, 2010, 7:09:32 AM9/27/10
to sakai-...@googlegroups.com
Exception in logs
-----------------

Key: KERN-1147
URL: http://jira.sakaiproject.org/browse/KERN-1147
Project: Nakamura
Issue Type: Bug
Components: System - other
Affects Versions: 0.8
Reporter: Oszkar Nagy


Saw this in logs today right after startup, when went to console to set up fsresource. Not sure what it affects as kernel started up and works as far as I can see.

27.09.2010 11:09:08.332 *ERROR* [127.0.0.1 [1285582148327] GET /sling.css HTTP/1.1] org.apache.sling.servlets.resolver.internal.SlingServletResolver Calling the error handler resulted in an error java.lang.IllegalStateException: NO CONTENT
at org.mortbay.jetty.HttpGenerator.addContent(HttpGenerator.java:106)
at org.mortbay.jetty.AbstractGenerator$Output.write(AbstractGenerator.java:644)
at org.mortbay.jetty.AbstractGenerator$Output.write(AbstractGenerator.java:579)
at java.io.ByteArrayOutputStream.writeTo(ByteArrayOutputStream.java:112)
at org.mortbay.jetty.AbstractGenerator$OutputWriter.write(AbstractGenerator.java:903)
at java.io.Writer.write(Writer.java:92)
at java.io.PrintWriter.write(PrintWriter.java:333)
at java.io.PrintWriter.write(PrintWriter.java:333)
at org.apache.sling.engine.impl.output.BufferedPrintWriter.write(BufferedPrintWriter.java:308)
at java.io.PrintWriter.write(PrintWriter.java:333)
at org.apache.sling.engine.impl.SlingHttpServletResponseImpl$LoggerResponseWriter.write(SlingHttpServletResponseImpl.java:538)
at org.apache.sling.api.request.ResponseUtil$XmlEscapingWriter.write(ResponseUtil.java:68)
at org.apache.sling.api.request.ResponseUtil$XmlEscapingWriter.write(ResponseUtil.java:50)
at org.apache.sling.api.request.ResponseUtil$XmlEscapingWriter.write(ResponseUtil.java:74)
at java.io.PrintWriter.write(PrintWriter.java:384)
at java.io.PrintWriter.write(PrintWriter.java:401)
at java.io.PrintWriter.print(PrintWriter.java:532)
at org.apache.sling.engine.impl.request.SlingRequestProgressTracker.dump(SlingRequestProgressTracker.java:196)
at org.apache.sling.servlets.resolver.internal.defaults.DefaultErrorHandlerServlet.service(DefaultErrorHandlerServlet.java:97)
at org.apache.sling.servlets.resolver.internal.SlingServletResolver.handleError(SlingServletResolver.java:750)
at org.apache.sling.servlets.resolver.internal.SlingServletResolver.handleError(SlingServletResolver.java:463)
at org.apache.sling.engine.impl.SlingHttpServletResponseImpl.sendError(SlingHttpServletResponseImpl.java:253)
at org.sakaiproject.nakamura.http.cache.CacheControlFilter.doFilter(CacheControlFilter.java:162)
at org.apache.sling.engine.impl.filter.AbstractSlingFilterChain.doFilter(AbstractSlingFilterChain.java:60)
at org.apache.sling.engine.impl.SlingMainServlet.service(SlingMainServlet.java:313)
at org.apache.sling.engine.impl.SlingMainServlet.service(SlingMainServlet.java:207)
at org.mortbay.jetty.servlet.ServletHolder.handle(ServletHolder.java:502)
at org.mortbay.jetty.servlet.ServletHandler.handle(ServletHandler.java:389)
at org.ops4j.pax.web.service.internal.HttpServiceServletHandler.handle(HttpServiceServletHandler.java:64)
at org.mortbay.jetty.servlet.SessionHandler.handle(SessionHandler.java:181)
at org.mortbay.jetty.handler.ContextHandler.handle(ContextHandler.java:765)
at org.ops4j.pax.web.service.internal.HttpServiceContext.handle(HttpServiceContext.java:111)
at org.ops4j.pax.web.service.internal.JettyServerHandlerCollection.handle(JettyServerHandlerCollection.java:64)
at org.mortbay.jetty.handler.HandlerWrapper.handle(HandlerWrapper.java:152)
at org.mortbay.jetty.Server.handle(Server.java:324)
at org.mortbay.jetty.HttpConnection.handleRequest(HttpConnection.java:535)
at org.mortbay.jetty.HttpConnection$RequestHandler.headerComplete(HttpConnection.java:865)
at org.mortbay.jetty.HttpParser.parseNext(HttpParser.java:539)
at org.mortbay.jetty.HttpParser.parseAvailable(HttpParser.java:212)
at org.mortbay.jetty.HttpConnection.handle(HttpConnection.java:404)
at org.mortbay.io.nio.SelectChannelEndPoint.run(SelectChannelEndPoint.java:409)
at org.mortbay.thread.QueuedThreadPool$PoolThread.run(QueuedThreadPool.java:520)
27.09.2010 11:09:08.334 *ERROR* [127.0.0.1 [1285582148327] GET /sling.css HTTP/1.1] org.apache.sling.servlets.resolver.internal.SlingServletResolver Original error null


--
This message is automatically generated by JIRA.
-
If you think it was sent incorrectly contact one of the administrators: http://jira.sakaiproject.org/secure/Administrators.jspa
-
For more information on JIRA, see: http://www.atlassian.com/software/jira


Ian Boston (JIRA)

unread,
Sep 27, 2010, 9:13:27 AM9/27/10
to sakai-...@googlegroups.com

[ http://jira.sakaiproject.org/browse/KERN-1147?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=108860#action_108860 ]

Ian Boston commented on KERN-1147:
----------------------------------

How long after the startup was finished did you go to the console ?

Oszkar Nagy (JIRA)

unread,
Sep 27, 2010, 9:45:27 AM9/27/10
to sakai-...@googlegroups.com

[ http://jira.sakaiproject.org/browse/KERN-1147?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=108867#action_108867 ]

Oszkar Nagy commented on KERN-1147:
-----------------------------------

I started up Nakamura at 10:22, it stood up under 2 mins, the error appeared as you at 11:09 - so the answer is about 50 mins.

Ian Boston (JIRA)

unread,
Sep 30, 2010, 3:45:27 AM9/30/10
to sakai-...@googlegroups.com

[ http://jira.sakaiproject.org/browse/KERN-1147?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=109396#action_109396 ]

Ian Boston commented on KERN-1147:
----------------------------------

I which case it has nothing to do with startup but has everything to do with some error somewhere. If we can reproduce we will fix in 0.9

> Exception in logs
> -----------------
>
> Key: KERN-1147
> URL: http://jira.sakaiproject.org/browse/KERN-1147
> Project: Nakamura
> Issue Type: Bug
> Components: System - other
> Affects Versions: 0.8
> Reporter: Oszkar Nagy

> Fix For: 0.9

Ian Boston (JIRA)

unread,
Sep 30, 2010, 3:45:36 AM9/30/10
to sakai-...@googlegroups.com

[ http://jira.sakaiproject.org/browse/KERN-1147?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Ian Boston updated KERN-1147:
-----------------------------

Fix Version/s: 0.9

> Exception in logs
> -----------------
>
> Key: KERN-1147
> URL: http://jira.sakaiproject.org/browse/KERN-1147
> Project: Nakamura
> Issue Type: Bug
> Components: System - other
> Affects Versions: 0.8
> Reporter: Oszkar Nagy

> Fix For: 0.9

Ian Boston (JIRA)

unread,
Sep 30, 2010, 3:51:28 AM9/30/10
to sakai-...@googlegroups.com

[ http://jira.sakaiproject.org/browse/KERN-1147?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Ian Boston reassigned KERN-1147:
--------------------------------

Assignee: Stuart Freeman

> Exception in logs
> -----------------
>
> Key: KERN-1147
> URL: http://jira.sakaiproject.org/browse/KERN-1147
> Project: Nakamura
> Issue Type: Bug
> Components: System - other
> Affects Versions: 0.8
> Reporter: Oszkar Nagy

> Assignee: Stuart Freeman
> Fix For: 0.9

Stuart Freeman (JIRA)

unread,
Oct 1, 2010, 12:28:27 PM10/1/10
to sakai-...@googlegroups.com

[ http://jira.sakaiproject.org/browse/KERN-1147?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=109607#action_109607 ]

Stuart Freeman commented on KERN-1147:
--------------------------------------

I've left an instance up for hours and even tried navigating into the console but haven't seen this error. Any clues toward reproducing it are welcome.

> Exception in logs
> -----------------
>
> Key: KERN-1147
> URL: http://jira.sakaiproject.org/browse/KERN-1147
> Project: Nakamura
> Issue Type: Bug
> Components: System - other
> Affects Versions: 0.8
> Reporter: Oszkar Nagy

> Assignee: Stuart Freeman
> Fix For: 0.9
>
>

Zach A. Thomas (JIRA)

unread,
Oct 4, 2010, 11:32:34 AM10/4/10
to sakai-...@googlegroups.com

[ http://jira.sakaiproject.org/browse/KERN-1147?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=109879#action_109879 ]

Zach A. Thomas commented on KERN-1147:
--------------------------------------

I'm getting this reproducibly when I use the servlet I created recently to check if a user exists:
curl http://localhost:8080/system/userManager/user.exists.hmlt?userid=zach

It's true that there is no content; The UX that relies on this only cares whether the HTTP status is OK or error.

I can easily add some boilerplate content. Since I haven't changed the servlet recently, and I didn't used to get this error, I conclude that something further down in the stack has changed that now cares about this. I would guess any servlet of ours that returns without writing anything to the output stream would generate this stack. Let me know if you'd like me to test my hypothesis.

> Exception in logs
> -----------------
>
> Key: KERN-1147
> URL: http://jira.sakaiproject.org/browse/KERN-1147
> Project: Nakamura
> Issue Type: Bug
> Components: System - other
> Affects Versions: 0.8
> Reporter: Oszkar Nagy

> Assignee: Stuart Freeman
> Fix For: 0.9
>
>

Zach A. Thomas (JIRA)

unread,
Oct 4, 2010, 11:34:34 AM10/4/10
to sakai-...@googlegroups.com

[ http://jira.sakaiproject.org/browse/KERN-1147?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=109879#action_109879 ]

Zach A. Thomas edited comment on KERN-1147 at 10/4/10 8:33 AM:
---------------------------------------------------------------

I'm getting this reproducibly when I use the servlet I created recently to check if a user exists:

curl http://localhost:8080/system/userManager/user.exists.hmll?userid=zach

It's true that there is no content; The UX that relies on this only cares whether the HTTP status is OK or error.

I can easily add some boilerplate content. Since I haven't changed the servlet recently, and I didn't used to get this error, I conclude that something further down in the stack has changed that now cares about this. I would guess any servlet of ours that returns without writing anything to the output stream would generate this stack. Let me know if you'd like me to test my hypothesis.

was (Author: zach....@txstate.edu):


I'm getting this reproducibly when I use the servlet I created recently to check if a user exists:
curl http://localhost:8080/system/userManager/user.exists.hmlt?userid=zach

It's true that there is no content; The UX that relies on this only cares whether the HTTP status is OK or error.

I can easily add some boilerplate content. Since I haven't changed the servlet recently, and I didn't used to get this error, I conclude that something further down in the stack has changed that now cares about this. I would guess any servlet of ours that returns without writing anything to the output stream would generate this stack. Let me know if you'd like me to test my hypothesis.

> Exception in logs
> -----------------
>
> Key: KERN-1147
> URL: http://jira.sakaiproject.org/browse/KERN-1147
> Project: Nakamura
> Issue Type: Bug
> Components: System - other
> Affects Versions: 0.8
> Reporter: Oszkar Nagy

> Assignee: Stuart Freeman
> Fix For: 0.9
>
>

Zach A. Thomas (JIRA)

unread,
Oct 4, 2010, 11:34:34 AM10/4/10
to sakai-...@googlegroups.com

[ http://jira.sakaiproject.org/browse/KERN-1147?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=109879#action_109879 ]

Zach A. Thomas edited comment on KERN-1147 at 10/4/10 8:34 AM:
---------------------------------------------------------------

I'm getting this reproducibly when I use the servlet I created recently to check if a user exists:

curl http://localhost:8080/system/userManager/user.exists.html?userid=zach

It's true that there is no content; The UX that relies on this only cares whether the HTTP status is OK or error.

I can easily add some boilerplate content. Since I haven't changed the servlet recently, and I didn't used to get this error, I conclude that something further down in the stack has changed that now cares about this. I would guess any servlet of ours that returns without writing anything to the output stream would generate this stack. Let me know if you'd like me to test my hypothesis.

was (Author: zach....@txstate.edu):
I'm getting this reproducibly when I use the servlet I created recently to check if a user exists:
curl http://localhost:8080/system/userManager/user.exists.hmll?userid=zach

It's true that there is no content; The UX that relies on this only cares whether the HTTP status is OK or error.

I can easily add some boilerplate content. Since I haven't changed the servlet recently, and I didn't used to get this error, I conclude that something further down in the stack has changed that now cares about this. I would guess any servlet of ours that returns without writing anything to the output stream would generate this stack. Let me know if you'd like me to test my hypothesis.

> Exception in logs
> -----------------
>
> Key: KERN-1147
> URL: http://jira.sakaiproject.org/browse/KERN-1147
> Project: Nakamura
> Issue Type: Bug
> Components: System - other
> Affects Versions: 0.8
> Reporter: Oszkar Nagy

> Assignee: Stuart Freeman
> Fix For: 0.9
>
>

Zach A. Thomas (JIRA)

unread,
Oct 4, 2010, 11:44:31 AM10/4/10
to sakai-...@googlegroups.com

[ http://jira.sakaiproject.org/browse/KERN-1147?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=109882#action_109882 ]

Zach A. Thomas commented on KERN-1147:
--------------------------------------

Confirmed that by adding response.getWriter().println(); at the end of my servlet doGet method, no more stack trace. Not sure what the "right" thing to do here is.

> Exception in logs
> -----------------
>
> Key: KERN-1147
> URL: http://jira.sakaiproject.org/browse/KERN-1147
> Project: Nakamura
> Issue Type: Bug
> Components: System - other
> Affects Versions: 0.8
> Reporter: Oszkar Nagy

> Assignee: Stuart Freeman
> Fix For: 0.9
>
>

Zach A. Thomas (JIRA)

unread,
Oct 4, 2010, 12:05:38 PM10/4/10
to sakai-...@googlegroups.com

[ http://jira.sakaiproject.org/browse/KERN-1147?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=109886#action_109886 ]

Zach A. Thomas commented on KERN-1147:
--------------------------------------

Having looked around a bit, your stack trace is beginning to make sense to me: in this case, it is the CacheControlFilter that sets the HTTP status:
sresponse.sendError(respCode,"Not Modified (Cache Control Filter)");

And the response never has anything written to its output stream. This angers Jetty in HttpGenerator.java:

public void addContent(Buffer content, boolean last) throws IOException
{
if (_noContent)
throw new IllegalStateException("NO CONTENT");
…

I still don't know why this only started biting us now, and like I said before, I don't know what the elegant solution is.

> Exception in logs
> -----------------
>
> Key: KERN-1147
> URL: http://jira.sakaiproject.org/browse/KERN-1147
> Project: Nakamura
> Issue Type: Bug
> Components: System - other
> Affects Versions: 0.8
> Reporter: Oszkar Nagy

> Assignee: Stuart Freeman
> Fix For: 0.9
>
>

Stuart Freeman (JIRA)

unread,
Oct 5, 2010, 9:45:33 AM10/5/10
to sakai-...@googlegroups.com

[ http://jira.sakaiproject.org/browse/KERN-1147?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=110244#action_110244 ]

Stuart Freeman commented on KERN-1147:
--------------------------------------

I think the elegant solution is that when there's no content we use the 204 result code instead of the 200. A 200 implies that there will be content, so I think Felix is correct in throwing an exception in this case.

> Exception in logs
> -----------------
>
> Key: KERN-1147
> URL: http://jira.sakaiproject.org/browse/KERN-1147
> Project: Nakamura
> Issue Type: Bug
> Components: System - other
> Affects Versions: 0.8
> Reporter: Oszkar Nagy

> Assignee: Stuart Freeman
> Fix For: 0.9
>
>

Stuart Freeman (JIRA)

unread,
Oct 5, 2010, 9:53:33 AM10/5/10
to sakai-...@googlegroups.com

[ http://jira.sakaiproject.org/browse/KERN-1147?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Stuart Freeman resolved KERN-1147.
----------------------------------

Resolution: Fixed

This particular stacktrace should be addressed by Zach's commit at http://github.com/sakaiproject/nakamura/commit/98a45e61317affbd8e9992684d43834d0854cc94

Feel free to re-open if there are other places that we set a 200 response code and don't return content.

> Exception in logs
> -----------------
>
> Key: KERN-1147
> URL: http://jira.sakaiproject.org/browse/KERN-1147
> Project: Nakamura
> Issue Type: Bug
> Components: System - other
> Affects Versions: 0.8
> Reporter: Oszkar Nagy

> Assignee: Stuart Freeman
> Fix For: 0.9
>
>

Zach A. Thomas (JIRA)

unread,
Oct 5, 2010, 10:45:32 AM10/5/10
to sakai-...@googlegroups.com

[ http://jira.sakaiproject.org/browse/KERN-1147?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Zach A. Thomas reopened KERN-1147:
----------------------------------


Sorry, but the commit you link to doesn't touch anything in this stack trace. The code at issue here is CacheControlFilter, and the response code is 304, not 200.

> Exception in logs
> -----------------
>
> Key: KERN-1147
> URL: http://jira.sakaiproject.org/browse/KERN-1147
> Project: Nakamura
> Issue Type: Bug
> Components: System - other
> Affects Versions: 0.8
> Reporter: Oszkar Nagy

> Assignee: Stuart Freeman
> Fix For: 0.9
>
>

Stuart Freeman (JIRA)

unread,
Oct 6, 2010, 12:57:31 PM10/6/10
to sakai-...@googlegroups.com

[ http://jira.sakaiproject.org/browse/KERN-1147?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=110376#action_110376 ]

Stuart Freeman commented on KERN-1147:
--------------------------------------

OK, sorry about that, I misunderstood our conversation about this on irc. The 304 response is interesting because the rfc says "The 304 response MUST NOT contain a message-body,".

> Exception in logs
> -----------------
>
> Key: KERN-1147
> URL: http://jira.sakaiproject.org/browse/KERN-1147
> Project: Nakamura
> Issue Type: Bug
> Components: System - other
> Affects Versions: 0.8
> Reporter: Oszkar Nagy

> Assignee: Stuart Freeman
> Fix For: 0.9
>
>

Stuart Freeman (JIRA)

unread,
Oct 7, 2010, 2:10:31 PM10/7/10
to sakai-...@googlegroups.com

[ http://jira.sakaiproject.org/browse/KERN-1147?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=110540#action_110540 ]

Stuart Freeman commented on KERN-1147:
--------------------------------------

I've discovered that I can reliably trigger the exception by running 'curl -w %{http_code} -z "$(date)" http://localhost:8080/dev/index.html'

> Exception in logs
> -----------------
>
> Key: KERN-1147
> URL: http://jira.sakaiproject.org/browse/KERN-1147
> Project: Nakamura
> Issue Type: Bug
> Components: System - other
> Affects Versions: 0.8
> Reporter: Oszkar Nagy

> Assignee: Stuart Freeman
> Fix For: 0.9
>
>

Stuart Freeman (JIRA)

unread,
Oct 7, 2010, 2:10:31 PM10/7/10
to sakai-...@googlegroups.com

[ http://jira.sakaiproject.org/browse/KERN-1147?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=110540#action_110540 ]

Stuart Freeman edited comment on KERN-1147 at 10/7/10 11:10 AM:
----------------------------------------------------------------

I've discovered that I can reliably trigger the exception by running ' curl -w %{http_code} -z "$(date)" http://localhost:8080/dev/index.html '

was (Author: stuart):


I've discovered that I can reliably trigger the exception by running 'curl -w %{http_code} -z "$(date)" http://localhost:8080/dev/index.html'

> Exception in logs
> -----------------
>
> Key: KERN-1147
> URL: http://jira.sakaiproject.org/browse/KERN-1147
> Project: Nakamura
> Issue Type: Bug
> Components: System - other
> Affects Versions: 0.8
> Reporter: Oszkar Nagy

> Assignee: Stuart Freeman
> Fix For: 0.9
>
>

Stuart Freeman (JIRA)

unread,
Oct 7, 2010, 3:44:31 PM10/7/10
to sakai-...@googlegroups.com

[ http://jira.sakaiproject.org/browse/KERN-1147?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Stuart Freeman resolved KERN-1147.
----------------------------------

Resolution: Fixed

Fix pushed at http://github.com/sakaiproject/nakamura/commit/12eca8a9acafc721df93a98707704d054c49812a

> Exception in logs
> -----------------
>
> Key: KERN-1147
> URL: http://jira.sakaiproject.org/browse/KERN-1147
> Project: Nakamura
> Issue Type: Bug
> Components: System - other
> Affects Versions: 0.8
> Reporter: Oszkar Nagy

> Assignee: Stuart Freeman
> Fix For: 0.9
>
>

Reply all
Reply to author
Forward
0 new messages