Uploaded image for project: 'Hadoop HDFS'
  1. Hadoop HDFS
  2. HDFS-155

StatusHttpServer is failing if trying to use hadoop as a standalone jar



    • Bug
    • Status: Resolved
    • Minor
    • Resolution: Cannot Reproduce
    • None
    • None
    • None
    • None
    • WinXP


      I just recently tried to upgrade from hadoop .2 and I am getting an error during the startup of StatusHttpServer. I did set my hadoop.log.dir, but there are still errros. Here is my stack below.

      java.io.FileNotFoundException: E:\projects\marzen\file:\E:\projects\marzen\web\WEB-INF\lib\hadoop.jar!\webapps\datanode
      at org.mortbay.jetty.servlet.WebApplicationContext.resolveWebApp(WebApplicationContext.java:266)
      at org.mortbay.jetty.servlet.WebApplicationContext.doStart(WebApplicationContext.java:449)
      at org.mortbay.util.Container.start(Container.java:72)
      at org.mortbay.http.HttpServer.doStart(HttpServer.java:753)
      at org.mortbay.util.Container.start(Container.java:72)
      at org.apache.hadoop.mapred.StatusHttpServer.start(StatusHttpServer.java:177)
      at org.apache.hadoop.dfs.DataNode.<init>(DataNode.java:167)
      at org.apache.hadoop.dfs.DataNode.makeInstance(DataNode.java:1069)
      at org.apache.hadoop.dfs.DataNode.run(DataNode.java:1003)
      ...rest of stack removed...

      The root of the issues seems to be in StatusHttpServer.getWebAppsPath(). Its possible that I am using hadoop differently than most people (as a standalone jar in another web app), but I'm not sure how this function could ever work if you were just using hadoop packaged as a standalone jar. Its trying to get the webapps path using this line:

      URL url = StatusHttpServer.class.getClassLoader().getResource("webapps");

      Which is returning the following path. This is a path within the hadoop jar: file:\E:\projects\marzen\web\WEB-INF\lib\hadoop.jar!\webapps

      It then tries to return the canonical path of that wich returns this path: E:\projects\marzen\file:\E:\projects\marzen\web\WEB-INF\lib\hadoop.jar!\webapps

      I don't even think that is a valid path, and the Jetty server certainly doesn't like it. Is there something I'm doing wrong? Is it possible nobody else is using hadoop as a standalone jar? Is this a windows specific bug?


        Issue Links



              sameerp Sameer Paranjpye
              pmalolepsy Paul Malolepsy
              0 Vote for this issue
              4 Start watching this issue