简体   繁体   中英

Jobtracker UI not working properly on osx

Hadoop itself (ie hdfs and map/reduce) is working - and brew-installed hive as well (which validates the first two). Just the GUI is weird: see the attached screenshot: the webserver is up but the JobTracker is not providing any useful info

jobtracker.jsp not found:

在此处输入图片说明

Anyone home at all on port 50030 (yes!)

在此处输入图片说明

What about namenode ui?

在此处输入图片说明

I was getting the same error on hadoop-2.0.0-cdh4.5.0 installation. After spending some time looking into the code, I managed to get this working by applying following patch to hadoop-common-2.0.0-cdh4.5.0.jar:

diff --git a/org/apache/hadoop/http/HttpServer.java b/org/apache/hadoop/http/HttpServer.java
index 25b4c75..1896623 100644
--- a/org/apache/hadoop/http/HttpServer.java
+++ b/org/apache/hadoop/http/HttpServer.java
@@ -237,6 +237,10 @@ public class HttpServer implements FilterContainer {
     webAppContext.setDisplayName(name);
     webAppContext.setContextPath("/");
     webAppContext.setWar(appDir + "/" + name);
+
+    webAppContext.setDescriptor(appDir + "/" + name + "/WEB-INF/web.xml");
+    webAppContext.setResourceBase(appDir + "/" + name);
+
     webAppContext.getServletContext().setAttribute(CONF_CONTEXT_ATTRIBUTE, conf);
     webAppContext.getServletContext().setAttribute(ADMINS_ACL, adminsAcl);
     addNoCacheFilter(webAppContext);

basically the jobtracker/tasktracker webapp initialization using Jetty WebAppContext was missing the web.xml location, adding it there using setDescriptor() and setting resourceBase correctly using setResourceBase() solves the problem.

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM