You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@ozone.apache.org by "ArafatKhan2198 (via GitHub)" <gi...@apache.org> on 2023/02/24 08:21:59 UTC

[GitHub] [ozone] ArafatKhan2198 opened a new pull request, #4308: HDDS-6176. Ozone service WebUI is not accessible with 404 error.

ArafatKhan2198 opened a new pull request, #4308:
URL: https://github.com/apache/ozone/pull/4308

   ## What changes were proposed in this pull request?
   
   A lot of customers were facing issues Ozone service-related WebUI not opening with a 404 error. The issue can be fixed by restarting, but during the restart, a `jetty-0_0_0_0-*/webapp` folder is created, and the customer noticed that such a folder does not exist on the host with access issues. The customer performed manual restarts on each node and observed that the problem was resolved by creating a new `jetty-0_0_0_0-*/webapp` folder. 
   
   After investigating we can confirm that the ozone code is not responsible for the deletion of the contents in the tmp directory. It appears that an external program is responsible for the deletion.
   
   The main culprit for deletion is the Linux program called `systemd-tmpfiles-clean.timer` . This program is designed to clean up temporary files that are generated by the system. By default, it runs daily and removes files and directories that are older than 3 days.
   
   To avoid this issue, it is recommended to configure Jetty to use a dedicated directory for its temporary files and directories, rather than the system's temporary directory. We can do this by changing the `ozone.http.basedir` property in the Ozone Service Advanced Configuration Snippet for the `ozone-conf/ozone-site.xml` file. It is suggested that this property should be set to a directory such as `/data/ozone` that already exists and has sufficient permissions in HDFS.
   
   In case if this property is not set, then fall back to the default property.
   
   ## What is the link to the Apache JIRA
   https://issues.apache.org/jira/browse/HDDS-6176
   
   ## How was this patch tested?
   
   The Jetty directory got created in the desired location


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

To unsubscribe, e-mail: issues-unsubscribe@ozone.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


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


[GitHub] [ozone] ArafatKhan2198 commented on pull request #4308: HDDS-6176. Ozone service WebUI is not accessible with 404 error.

Posted by "ArafatKhan2198 (via GitHub)" <gi...@apache.org>.
ArafatKhan2198 commented on PR #4308:
URL: https://github.com/apache/ozone/pull/4308#issuecomment-1443128870

   @sadanand48 @ChenSammi @jojochuang can you please take a look!


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

To unsubscribe, e-mail: issues-unsubscribe@ozone.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


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


[GitHub] [ozone] jojochuang commented on pull request #4308: HDDS-6176. Ozone service WebUI is not accessible with 404 error.

Posted by "jojochuang (via GitHub)" <gi...@apache.org>.
jojochuang commented on PR #4308:
URL: https://github.com/apache/ozone/pull/4308#issuecomment-1452342428

   Review comments are addressed and test checks all came back green. I'll merging this PR now.


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

To unsubscribe, e-mail: issues-unsubscribe@ozone.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


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


[GitHub] [ozone] ArafatKhan2198 commented on a diff in pull request #4308: HDDS-6176. Ozone service WebUI is not accessible with 404 error.

Posted by "ArafatKhan2198 (via GitHub)" <gi...@apache.org>.
ArafatKhan2198 commented on code in PR #4308:
URL: https://github.com/apache/ozone/pull/4308#discussion_r1117192982


##########
hadoop-hdds/framework/src/main/java/org/apache/hadoop/hdds/server/http/BaseHttpServer.java:
##########
@@ -178,11 +178,13 @@ public BaseHttpServer(MutableConfigurationSource conf, String name)
       }
 
       String baseDir = conf.get(OzoneConfigKeys.OZONE_HTTP_BASEDIR);
-      if (!StringUtils.isEmpty(baseDir)) {
-        createDir(baseDir);
-        httpServer.getWebAppContext().setAttribute(JETTY_BASETMPDIR, baseDir);
-        LOG.info("HTTP server of {} uses base directory {}", name, baseDir);
+
+      if (StringUtils.isEmpty(baseDir)) {
+        baseDir = conf.get(OzoneConfigKeys.OZONE_METADATA_DIRS) + "/webserver";

Review Comment:
   @ChenSammi  suggested that if the ozone.http.basedir property is not defined, we should fall back to using `ozone.metadata.dirs`. Falling back to "ozone.metadata.dirs" is a common practice in Ozone when a more specific property is not set by the user.
   
   
   



##########
hadoop-hdds/common/src/main/resources/ozone-default.xml:
##########
@@ -2935,7 +2935,7 @@
     <description>
       The base dir for HTTP Jetty server to extract contents. If this property
       is not configured, by default, Jetty will create a directory inside the
-      directory named by the java.io.tmpdir System property(/tmp by default).
+      directory named by the ozone.metadata.dirs(/tmp/metadata)

Review Comment:
   Thanks for the suggestion. I'll make the changes to the description. 



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

To unsubscribe, e-mail: issues-unsubscribe@ozone.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


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


[GitHub] [ozone] sadanand48 commented on a diff in pull request #4308: HDDS-6176. Ozone service WebUI is not accessible with 404 error.

Posted by "sadanand48 (via GitHub)" <gi...@apache.org>.
sadanand48 commented on code in PR #4308:
URL: https://github.com/apache/ozone/pull/4308#discussion_r1122802736


##########
hadoop-hdds/common/src/main/resources/ozone-default.xml:
##########
@@ -2935,11 +2935,10 @@
     <description>
       The base dir for HTTP Jetty server to extract contents. If this property
       is not configured, by default, Jetty will create a directory inside the
-      directory named by the java.io.tmpdir System property(/tmp by default).

Review Comment:
   I think what @jojochuang meant is to increase the value of the property and not description.



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

To unsubscribe, e-mail: issues-unsubscribe@ozone.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


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


[GitHub] [ozone] sadanand48 commented on a diff in pull request #4308: HDDS-6176. Ozone service WebUI is not accessible with 404 error.

Posted by "sadanand48 (via GitHub)" <gi...@apache.org>.
sadanand48 commented on code in PR #4308:
URL: https://github.com/apache/ozone/pull/4308#discussion_r1116996230


##########
hadoop-hdds/framework/src/main/java/org/apache/hadoop/hdds/server/http/BaseHttpServer.java:
##########
@@ -178,11 +178,13 @@ public BaseHttpServer(MutableConfigurationSource conf, String name)
       }
 
       String baseDir = conf.get(OzoneConfigKeys.OZONE_HTTP_BASEDIR);
-      if (!StringUtils.isEmpty(baseDir)) {
-        createDir(baseDir);
-        httpServer.getWebAppContext().setAttribute(JETTY_BASETMPDIR, baseDir);
-        LOG.info("HTTP server of {} uses base directory {}", name, baseDir);
+
+      if (StringUtils.isEmpty(baseDir)) {
+        baseDir = conf.get(OzoneConfigKeys.OZONE_METADATA_DIRS) + "/webserver";

Review Comment:
   nit : use String literal for `webserver` folder?



##########
hadoop-hdds/common/src/main/resources/ozone-default.xml:
##########
@@ -2935,7 +2935,7 @@
     <description>
       The base dir for HTTP Jetty server to extract contents. If this property
       is not configured, by default, Jetty will create a directory inside the
-      directory named by the java.io.tmpdir System property(/tmp by default).
+      directory named by the ozone.metadata.dirs(/tmp/metadata)

Review Comment:
   can remove (/tmp/metadata) part as its not the default location.



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

To unsubscribe, e-mail: issues-unsubscribe@ozone.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


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


[GitHub] [ozone] ArafatKhan2198 commented on a diff in pull request #4308: HDDS-6176. Ozone service WebUI is not accessible with 404 error.

Posted by "ArafatKhan2198 (via GitHub)" <gi...@apache.org>.
ArafatKhan2198 commented on code in PR #4308:
URL: https://github.com/apache/ozone/pull/4308#discussion_r1117193393


##########
hadoop-hdds/common/src/main/resources/ozone-default.xml:
##########
@@ -2935,7 +2935,7 @@
     <description>
       The base dir for HTTP Jetty server to extract contents. If this property
       is not configured, by default, Jetty will create a directory inside the
-      directory named by the java.io.tmpdir System property(/tmp by default).
+      directory named by the ozone.metadata.dirs(/tmp/metadata)

Review Comment:
   Thanks for the suggestion. I'll make the changes to the description.



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

To unsubscribe, e-mail: issues-unsubscribe@ozone.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


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


[GitHub] [ozone] ArafatKhan2198 commented on a diff in pull request #4308: HDDS-6176. Ozone service WebUI is not accessible with 404 error.

Posted by "ArafatKhan2198 (via GitHub)" <gi...@apache.org>.
ArafatKhan2198 commented on code in PR #4308:
URL: https://github.com/apache/ozone/pull/4308#discussion_r1122290086


##########
hadoop-hdds/framework/src/main/java/org/apache/hadoop/hdds/server/http/BaseHttpServer.java:
##########
@@ -178,11 +180,14 @@ public BaseHttpServer(MutableConfigurationSource conf, String name)
       }
 
       String baseDir = conf.get(OzoneConfigKeys.OZONE_HTTP_BASEDIR);
-      if (!StringUtils.isEmpty(baseDir)) {
-        createDir(baseDir);
-        httpServer.getWebAppContext().setAttribute(JETTY_BASETMPDIR, baseDir);
-        LOG.info("HTTP server of {} uses base directory {}", name, baseDir);
+
+      if (StringUtils.isEmpty(baseDir)) {
+        baseDir =
+            conf.get(String.valueOf(getOzoneMetaDirPath(conf))) + serverDir;

Review Comment:
   Thanks @ChenSammi I have made the changes and added the UT in the `TestOzoneManagerHttpServer` that overrides the `BaseHttpServer`



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

To unsubscribe, e-mail: issues-unsubscribe@ozone.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


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


[GitHub] [ozone] ChenSammi commented on a diff in pull request #4308: HDDS-6176. Ozone service WebUI is not accessible with 404 error.

Posted by "ChenSammi (via GitHub)" <gi...@apache.org>.
ChenSammi commented on code in PR #4308:
URL: https://github.com/apache/ozone/pull/4308#discussion_r1118394617


##########
hadoop-hdds/framework/src/main/java/org/apache/hadoop/hdds/server/http/BaseHttpServer.java:
##########
@@ -178,11 +178,13 @@ public BaseHttpServer(MutableConfigurationSource conf, String name)
       }
 
       String baseDir = conf.get(OzoneConfigKeys.OZONE_HTTP_BASEDIR);
-      if (!StringUtils.isEmpty(baseDir)) {
-        createDir(baseDir);
-        httpServer.getWebAppContext().setAttribute(JETTY_BASETMPDIR, baseDir);
-        LOG.info("HTTP server of {} uses base directory {}", name, baseDir);
+
+      if (StringUtils.isEmpty(baseDir)) {
+        baseDir = conf.get(OzoneConfigKeys.OZONE_METADATA_DIRS) + "/webserver";

Review Comment:
   Sorry @ArafatKhan2198 ,  just missed one comment here.  Please use getOzoneMetaDirPath#ServerUtils to get the metadata dir. 



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

To unsubscribe, e-mail: issues-unsubscribe@ozone.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


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


[GitHub] [ozone] ArafatKhan2198 commented on a diff in pull request #4308: HDDS-6176. Ozone service WebUI is not accessible with 404 error.

Posted by "ArafatKhan2198 (via GitHub)" <gi...@apache.org>.
ArafatKhan2198 commented on code in PR #4308:
URL: https://github.com/apache/ozone/pull/4308#discussion_r1118848470


##########
hadoop-hdds/framework/src/main/java/org/apache/hadoop/hdds/server/http/BaseHttpServer.java:
##########
@@ -178,11 +178,13 @@ public BaseHttpServer(MutableConfigurationSource conf, String name)
       }
 
       String baseDir = conf.get(OzoneConfigKeys.OZONE_HTTP_BASEDIR);
-      if (!StringUtils.isEmpty(baseDir)) {
-        createDir(baseDir);
-        httpServer.getWebAppContext().setAttribute(JETTY_BASETMPDIR, baseDir);
-        LOG.info("HTTP server of {} uses base directory {}", name, baseDir);
+
+      if (StringUtils.isEmpty(baseDir)) {
+        baseDir = conf.get(OzoneConfigKeys.OZONE_METADATA_DIRS) + "/webserver";

Review Comment:
   Thanks @ChenSammi , I have made the changes !!



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

To unsubscribe, e-mail: issues-unsubscribe@ozone.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


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


[GitHub] [ozone] ArafatKhan2198 commented on a diff in pull request #4308: HDDS-6176. Ozone service WebUI is not accessible with 404 error.

Posted by "ArafatKhan2198 (via GitHub)" <gi...@apache.org>.
ArafatKhan2198 commented on code in PR #4308:
URL: https://github.com/apache/ozone/pull/4308#discussion_r1116984502


##########
hadoop-hdds/common/src/main/resources/ozone-default.xml:
##########
@@ -2935,7 +2935,7 @@
     <description>
       The base dir for HTTP Jetty server to extract contents. If this property
       is not configured, by default, Jetty will create a directory inside the
-      directory named by the java.io.tmpdir System property(/tmp by default).
+      directory named by the ozone.metadata.dirs System property(/tmp/metadata by default).

Review Comment:
   Thanks for the review, I have made changes to it do take a look!



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

To unsubscribe, e-mail: issues-unsubscribe@ozone.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


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


[GitHub] [ozone] kerneltime commented on pull request #4308: HDDS-6176. Ozone service WebUI is not accessible with 404 error.

Posted by "kerneltime (via GitHub)" <gi...@apache.org>.
kerneltime commented on PR #4308:
URL: https://github.com/apache/ozone/pull/4308#issuecomment-1447601480

   One downside of this approach is that the directly is only cleaned up on clean exits (and if `persistTempDirectory` is false).
   Another alternative might be to set a base dir for jetty which is cleaned up on start and populated again.


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

To unsubscribe, e-mail: issues-unsubscribe@ozone.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


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


[GitHub] [ozone] ChenSammi commented on a diff in pull request #4308: HDDS-6176. Ozone service WebUI is not accessible with 404 error.

Posted by "ChenSammi (via GitHub)" <gi...@apache.org>.
ChenSammi commented on code in PR #4308:
URL: https://github.com/apache/ozone/pull/4308#discussion_r1122593592


##########
hadoop-hdds/framework/src/main/java/org/apache/hadoop/hdds/server/http/BaseHttpServer.java:
##########
@@ -178,14 +181,22 @@ public BaseHttpServer(MutableConfigurationSource conf, String name)
       }
 
       String baseDir = conf.get(OzoneConfigKeys.OZONE_HTTP_BASEDIR);
-      if (!StringUtils.isEmpty(baseDir)) {
-        createDir(baseDir);
-        httpServer.getWebAppContext().setAttribute(JETTY_BASETMPDIR, baseDir);
-        LOG.info("HTTP server of {} uses base directory {}", name, baseDir);
+
+      if (StringUtils.isEmpty(baseDir)) {
+        baseDir = getOzoneMetaDirPath(conf) + SERVER_DIR;
       }
+      createDir(baseDir);
+      httpServer.getWebAppContext().setAttribute(JETTY_BASETMPDIR, baseDir);
+      LOG.info("HTTP server of {} uses base directory {}", name, baseDir);
     }
   }
 
+  @VisibleForTesting
+  public String getJettyPath() {

Review Comment:
   getJettyPath -> getJettyBaseTmpDir



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

To unsubscribe, e-mail: issues-unsubscribe@ozone.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


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


[GitHub] [ozone] jojochuang merged pull request #4308: HDDS-6176. Ozone service WebUI is not accessible with 404 error.

Posted by "jojochuang (via GitHub)" <gi...@apache.org>.
jojochuang merged PR #4308:
URL: https://github.com/apache/ozone/pull/4308


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

To unsubscribe, e-mail: issues-unsubscribe@ozone.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


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


[GitHub] [ozone] ChenSammi commented on a diff in pull request #4308: HDDS-6176. Ozone service WebUI is not accessible with 404 error.

Posted by "ChenSammi (via GitHub)" <gi...@apache.org>.
ChenSammi commented on code in PR #4308:
URL: https://github.com/apache/ozone/pull/4308#discussion_r1118394617


##########
hadoop-hdds/framework/src/main/java/org/apache/hadoop/hdds/server/http/BaseHttpServer.java:
##########
@@ -178,11 +178,13 @@ public BaseHttpServer(MutableConfigurationSource conf, String name)
       }
 
       String baseDir = conf.get(OzoneConfigKeys.OZONE_HTTP_BASEDIR);
-      if (!StringUtils.isEmpty(baseDir)) {
-        createDir(baseDir);
-        httpServer.getWebAppContext().setAttribute(JETTY_BASETMPDIR, baseDir);
-        LOG.info("HTTP server of {} uses base directory {}", name, baseDir);
+
+      if (StringUtils.isEmpty(baseDir)) {
+        baseDir = conf.get(OzoneConfigKeys.OZONE_METADATA_DIRS) + "/webserver";

Review Comment:
   Sorry @ArafatKhan2198 ,  just missed one comment here.  Please use ServerUtils#getOzoneMetaDirPath to get the metadata dir. 



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

To unsubscribe, e-mail: issues-unsubscribe@ozone.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


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


[GitHub] [ozone] jojochuang commented on a diff in pull request #4308: HDDS-6176. Ozone service WebUI is not accessible with 404 error.

Posted by "jojochuang (via GitHub)" <gi...@apache.org>.
jojochuang commented on code in PR #4308:
URL: https://github.com/apache/ozone/pull/4308#discussion_r1122367905


##########
hadoop-hdds/common/src/main/resources/ozone-default.xml:
##########
@@ -2935,11 +2935,10 @@
     <description>
       The base dir for HTTP Jetty server to extract contents. If this property
       is not configured, by default, Jetty will create a directory inside the
-      directory named by the java.io.tmpdir System property(/tmp by default).

Review Comment:
   can you update the value of this property to `${ozone.metadata.dirs}/webserver`



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

To unsubscribe, e-mail: issues-unsubscribe@ozone.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


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


[GitHub] [ozone] sadanand48 commented on a diff in pull request #4308: HDDS-6176. Ozone service WebUI is not accessible with 404 error.

Posted by "sadanand48 (via GitHub)" <gi...@apache.org>.
sadanand48 commented on code in PR #4308:
URL: https://github.com/apache/ozone/pull/4308#discussion_r1122802736


##########
hadoop-hdds/common/src/main/resources/ozone-default.xml:
##########
@@ -2935,11 +2935,10 @@
     <description>
       The base dir for HTTP Jetty server to extract contents. If this property
       is not configured, by default, Jetty will create a directory inside the
-      directory named by the java.io.tmpdir System property(/tmp by default).

Review Comment:
   I think what @jojochuang meant is to update the value of the property and not description.



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

To unsubscribe, e-mail: issues-unsubscribe@ozone.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


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


[GitHub] [ozone] sadanand48 commented on a diff in pull request #4308: HDDS-6176. Ozone service WebUI is not accessible with 404 error.

Posted by "sadanand48 (via GitHub)" <gi...@apache.org>.
sadanand48 commented on code in PR #4308:
URL: https://github.com/apache/ozone/pull/4308#discussion_r1122802736


##########
hadoop-hdds/common/src/main/resources/ozone-default.xml:
##########
@@ -2935,11 +2935,10 @@
     <description>
       The base dir for HTTP Jetty server to extract contents. If this property
       is not configured, by default, Jetty will create a directory inside the
-      directory named by the java.io.tmpdir System property(/tmp by default).

Review Comment:
   I think what @jojochuang meant is to update the value of the property and not description.



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

To unsubscribe, e-mail: issues-unsubscribe@ozone.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


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


[GitHub] [ozone] ChenSammi commented on a diff in pull request #4308: HDDS-6176. Ozone service WebUI is not accessible with 404 error.

Posted by "ChenSammi (via GitHub)" <gi...@apache.org>.
ChenSammi commented on code in PR #4308:
URL: https://github.com/apache/ozone/pull/4308#discussion_r1119666632


##########
hadoop-hdds/framework/src/main/java/org/apache/hadoop/hdds/server/http/BaseHttpServer.java:
##########
@@ -178,11 +180,14 @@ public BaseHttpServer(MutableConfigurationSource conf, String name)
       }
 
       String baseDir = conf.get(OzoneConfigKeys.OZONE_HTTP_BASEDIR);
-      if (!StringUtils.isEmpty(baseDir)) {
-        createDir(baseDir);
-        httpServer.getWebAppContext().setAttribute(JETTY_BASETMPDIR, baseDir);
-        LOG.info("HTTP server of {} uses base directory {}", name, baseDir);
+
+      if (StringUtils.isEmpty(baseDir)) {
+        baseDir =
+            conf.get(String.valueOf(getOzoneMetaDirPath(conf))) + serverDir;

Review Comment:
   getOzoneMetaDirPath(conf) already returns the metadata path.  This path plus serverDir is the complete path. 
   
   Please add a unit test in TestBaseHttpServer to verify this. 



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

To unsubscribe, e-mail: issues-unsubscribe@ozone.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


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


[GitHub] [ozone] ChenSammi commented on a diff in pull request #4308: HDDS-6176. Ozone service WebUI is not accessible with 404 error.

Posted by "ChenSammi (via GitHub)" <gi...@apache.org>.
ChenSammi commented on code in PR #4308:
URL: https://github.com/apache/ozone/pull/4308#discussion_r1116785648


##########
hadoop-hdds/common/src/main/resources/ozone-default.xml:
##########
@@ -2935,7 +2935,7 @@
     <description>
       The base dir for HTTP Jetty server to extract contents. If this property
       is not configured, by default, Jetty will create a directory inside the
-      directory named by the java.io.tmpdir System property(/tmp by default).
+      directory named by the ozone.metadata.dirs System property(/tmp/metadata by default).

Review Comment:
   ozone.metadata.dirs doesn't have default value. It's a must configured property in Ozone, also not a  "System property".



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

To unsubscribe, e-mail: issues-unsubscribe@ozone.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


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


[GitHub] [ozone] devmadhuu commented on a diff in pull request #4308: HDDS-6176. Ozone service WebUI is not accessible with 404 error.

Posted by "devmadhuu (via GitHub)" <gi...@apache.org>.
devmadhuu commented on code in PR #4308:
URL: https://github.com/apache/ozone/pull/4308#discussion_r1117009920


##########
hadoop-hdds/framework/src/main/java/org/apache/hadoop/hdds/server/http/BaseHttpServer.java:
##########
@@ -178,11 +178,13 @@ public BaseHttpServer(MutableConfigurationSource conf, String name)
       }
 
       String baseDir = conf.get(OzoneConfigKeys.OZONE_HTTP_BASEDIR);
-      if (!StringUtils.isEmpty(baseDir)) {
-        createDir(baseDir);
-        httpServer.getWebAppContext().setAttribute(JETTY_BASETMPDIR, baseDir);
-        LOG.info("HTTP server of {} uses base directory {}", name, baseDir);
+
+      if (StringUtils.isEmpty(baseDir)) {
+        baseDir = conf.get(OzoneConfigKeys.OZONE_METADATA_DIRS) + "/webserver";

Review Comment:
   @ArafatKhan2198 , Instead of relying on "ozone.metadata.dirs" config, we can have separate config for httpserver.



##########
hadoop-hdds/common/src/main/resources/ozone-default.xml:
##########
@@ -2935,7 +2935,7 @@
     <description>
       The base dir for HTTP Jetty server to extract contents. If this property
       is not configured, by default, Jetty will create a directory inside the
-      directory named by the java.io.tmpdir System property(/tmp by default).
+      directory named by the ozone.metadata.dirs(/tmp/metadata)

Review Comment:
   @ArafatKhan2198 , thanks for working on this patch, however it seems not correct as /tmp is anyway being cleaned up, I think this description is incorrect because "ozone.metadata.dirs" will vary for each component like SCM, Datanode, OM, Recon etc for their respective node and it will not be /tmp as HttpServer also will be started as separate process on each of the Ozone component.



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

To unsubscribe, e-mail: issues-unsubscribe@ozone.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


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


[GitHub] [ozone] ArafatKhan2198 commented on a diff in pull request #4308: HDDS-6176. Ozone service WebUI is not accessible with 404 error.

Posted by "ArafatKhan2198 (via GitHub)" <gi...@apache.org>.
ArafatKhan2198 commented on code in PR #4308:
URL: https://github.com/apache/ozone/pull/4308#discussion_r1122623189


##########
hadoop-hdds/common/src/main/resources/ozone-default.xml:
##########
@@ -2935,11 +2935,10 @@
     <description>
       The base dir for HTTP Jetty server to extract contents. If this property
       is not configured, by default, Jetty will create a directory inside the
-      directory named by the java.io.tmpdir System property(/tmp by default).

Review Comment:
   Thanks for the suggestion @jojochuang , I have changed it !!
   



##########
hadoop-hdds/framework/src/main/java/org/apache/hadoop/hdds/server/http/BaseHttpServer.java:
##########
@@ -178,14 +181,22 @@ public BaseHttpServer(MutableConfigurationSource conf, String name)
       }
 
       String baseDir = conf.get(OzoneConfigKeys.OZONE_HTTP_BASEDIR);
-      if (!StringUtils.isEmpty(baseDir)) {
-        createDir(baseDir);
-        httpServer.getWebAppContext().setAttribute(JETTY_BASETMPDIR, baseDir);
-        LOG.info("HTTP server of {} uses base directory {}", name, baseDir);
+
+      if (StringUtils.isEmpty(baseDir)) {
+        baseDir = getOzoneMetaDirPath(conf) + SERVER_DIR;
       }
+      createDir(baseDir);
+      httpServer.getWebAppContext().setAttribute(JETTY_BASETMPDIR, baseDir);
+      LOG.info("HTTP server of {} uses base directory {}", name, baseDir);
     }
   }
 
+  @VisibleForTesting
+  public String getJettyPath() {

Review Comment:
   Thanks for the suggestion @ChenSammi , I have changed it !!



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

To unsubscribe, e-mail: issues-unsubscribe@ozone.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


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