You are viewing a plain text version of this content. The canonical link for it is here.
Posted to common-dev@hadoop.apache.org by "Hairong Kuang (JIRA)" <ji...@apache.org> on 2008/10/28 01:13:44 UTC
[jira] Commented: (HADOOP-4530) In fsck, HttpServletResponse
sendError fails with IllegalStateException
[ https://issues.apache.org/jira/browse/HADOOP-4530?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=12643105#action_12643105 ]
Hairong Kuang commented on HADOOP-4530:
---------------------------------------
This is because NameNodeFsck already closed the response stream. Errror handling should be done in NamenodeFsck not in FsckServlet.
> In fsck, HttpServletResponse sendError fails with IllegalStateException
> -----------------------------------------------------------------------
>
> Key: HADOOP-4530
> URL: https://issues.apache.org/jira/browse/HADOOP-4530
> Project: Hadoop Core
> Issue Type: Bug
> Components: dfs
> Affects Versions: 0.18.1
> Reporter: Koji Noguchi
>
> When looking at HADOOP-4526, I tried using sendError at line:53.
> {code:title=FsckServlet.java|borderStyle=solid} _
> 49 } catch (IOException ie) {
> 50 StringUtils.stringifyException(ie);
> 51 LOG.warn(ie);
> 52 String errMsg = "Fsck on path " + pmap.get("path") + " failed.";
> 53 response.sendError(HttpServletResponse.SC_GONE, errMsg);
> 54 throw ie;
> 55 }
> {code}
> However, it always failed with
> {noformat}
> 2008-10-27 22:39:07,359 WARN /: /fsck?path=%2Fuser:
> java.lang.IllegalStateException: Committed
> at org.mortbay.jetty.servlet.ServletHttpResponse.resetBuffer(ServletHttpResponse.java:212)
> at org.mortbay.jetty.servlet.ServletHttpResponse.sendError(ServletHttpResponse.java:375)
> at org.apache.hadoop.dfs.FsckServlet.doGet(FsckServlet.java:54)
> at javax.servlet.http.HttpServlet.service(HttpServlet.java:689)
> at javax.servlet.http.HttpServlet.service(HttpServlet.java:802)
> at org.mortbay.jetty.servlet.ServletHolder.handle(ServletHolder.java:427)
> at org.mortbay.jetty.servlet.WebApplicationHandler.dispatch(WebApplicationHandler.java:475)
> at org.mortbay.jetty.servlet.ServletHandler.handle(ServletHandler.java:567)
> at org.mortbay.http.HttpContext.handle(HttpContext.java:1565)
> at org.mortbay.jetty.servlet.WebApplicationContext.handle(WebApplicationContext.java:635)
> at org.mortbay.http.HttpContext.handle(HttpContext.java:1517)
> at org.mortbay.http.HttpServer.service(HttpServer.java:954)
> at org.mortbay.http.HttpConnection.service(HttpConnection.java:814)
> at org.mortbay.http.HttpConnection.handleNext(HttpConnection.java:981)
> at org.mortbay.http.HttpConnection.handle(HttpConnection.java:831)
> at org.mortbay.http.SocketListener.handleConnection(SocketListener.java:244)
> at org.mortbay.util.ThreadedServer.handle(ThreadedServer.java:357)
> at org.mortbay.util.ThreadPool$PoolThread.run(ThreadPool.java:534)
> {noformat}
> And client wasn't seeing the error.
--
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.