You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@ozone.apache.org by GitBox <gi...@apache.org> on 2020/01/15 19:17:25 UTC

[GitHub] [hadoop-ozone] xiaoyuyao commented on a change in pull request #445: HDDS-2849. OM and SCM Web-server report HTTP 404 error when accessing…

xiaoyuyao commented on a change in pull request #445: HDDS-2849. OM and SCM Web-server report HTTP 404 error when accessing…
URL: https://github.com/apache/hadoop-ozone/pull/445#discussion_r367058682
 
 

 ##########
 File path: hadoop-hdds/framework/src/main/java/org/apache/hadoop/hdds/server/BaseHttpServer.java
 ##########
 @@ -114,8 +118,13 @@ public BaseHttpServer(Configuration conf, String name) throws IOException {
                 + "production!");
         httpServer.addServlet("profile", "/prof", ProfileServlet.class);
       }
-    }
 
+      String baseDir = conf.get(OzoneConfigKeys.OZONE_HTTP_BASEDIR);
+      if (!StringUtils.isEmpty(baseDir)) {
+        httpServer.getWebAppContext().setAttribute(JETTY_BASETMPDIR, baseDir);
 
 Review comment:
   Thanks @ChenSammi  for reporting the issue and working on the fix. 
   
   According to jetty document [here](https://www.eclipse.org/jetty/documentation/current/ref-temporary-directories.html): 
   
   "By default, Jetty will create this directory inside the directory named by the java.io.tmpdir System property. You can instruct Jetty to use a different parent directory by setting the context attribute org.eclipse.jetty.webapp.basetempdir to the name of the desired parent directory. The directory named by this attribute must exist and be writeable."
   
   Given the behavior without specifying basetmpdir explicitly, jetty will automatically create the dir under java.io.tempdir, which should work. Can you elaborate on the proposed fix?
   
   

----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
 
For queries about this service, please contact Infrastructure at:
users@infra.apache.org


With regards,
Apache Git Services

---------------------------------------------------------------------
To unsubscribe, e-mail: ozone-issues-unsubscribe@hadoop.apache.org
For additional commands, e-mail: ozone-issues-help@hadoop.apache.org