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 12:26:21 UTC

[GitHub] [hadoop-ozone] ChenSammi opened a new pull request #445: HDDS-2849. OM and SCM Web-server report HTTP 404 error when accessing…

ChenSammi opened a new 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
 
 
   https://issues.apache.org/jira/browse/HDDS-2849 

----------------------------------------------------------------
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


[GitHub] [hadoop-ozone] elek closed pull request #445: HDDS-2849. OM and SCM Web-server report HTTP 404 error when accessing…

Posted by GitBox <gi...@apache.org>.
elek closed 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
 
 
   

----------------------------------------------------------------
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


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

Posted by GitBox <gi...@apache.org>.
elek 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_r368480036
 
 

 ##########
 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:
   Let me know if you are happy with this approach @xiaoyuyao and I will commit the patch...

----------------------------------------------------------------
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


[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…

Posted by GitBox <gi...@apache.org>.
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_r369175867
 
 

 ##########
 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:
   Sounds good to me. Agree that could be a problem when /tmp is cleaned up more frequently. 

----------------------------------------------------------------
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


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

Posted by GitBox <gi...@apache.org>.
elek 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_r368479586
 
 

 ##########
 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:
   From an offline discussion I learned the problem: In some environments the `/tmp` cleaned up regularly (For me it's just at the restart but in some environments it's cleaned up more frequently). In these environments the web UI is not available after a while (when jetty temporary files are deleted).
    
   I am fine with this patch. We can remove this configuration setting long-term as we are planning to unify all the webui under the recon. Until that we can make it configurable...

----------------------------------------------------------------
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


[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…

Posted by GitBox <gi...@apache.org>.
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