This is an automated email from the ASF dual-hosted git repository.
adoroszlai pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/ozone.git
The following commit(s) were added to refs/heads/master by this push:
new 6de40ff6d94 HDDS-13069. Error stopping S3 Gateway admin webserver
(#9776)
6de40ff6d94 is described below
commit 6de40ff6d946b70d6d4b0548870a8a11bff6ae6c
Author: Doroszlai, Attila <[email protected]>
AuthorDate: Wed Feb 18 05:11:10 2026 +0100
HDDS-13069. Error stopping S3 Gateway admin webserver (#9776)
---
.../java/org/apache/hadoop/hdds/server/http/BaseHttpServer.java | 7 ++++++-
.../src/main/java/org/apache/hadoop/ozone/s3/Gateway.java | 4 ++--
2 files changed, 8 insertions(+), 3 deletions(-)
diff --git
a/hadoop-hdds/framework/src/main/java/org/apache/hadoop/hdds/server/http/BaseHttpServer.java
b/hadoop-hdds/framework/src/main/java/org/apache/hadoop/hdds/server/http/BaseHttpServer.java
index 30f31c3093d..aacbd2188d7 100644
---
a/hadoop-hdds/framework/src/main/java/org/apache/hadoop/hdds/server/http/BaseHttpServer.java
+++
b/hadoop-hdds/framework/src/main/java/org/apache/hadoop/hdds/server/http/BaseHttpServer.java
@@ -63,7 +63,7 @@
/**
* Base class for HTTP server of the Ozone related components.
*/
-public abstract class BaseHttpServer {
+public abstract class BaseHttpServer implements AutoCloseable {
private static final Logger LOG =
LoggerFactory.getLogger(BaseHttpServer.class);
@@ -343,6 +343,11 @@ public void stop() throws Exception {
}
}
+ @Override
+ public void close() throws Exception {
+ stop();
+ }
+
/**
* Update the configured listen address based on the real port
* <p>
diff --git
a/hadoop-ozone/s3gateway/src/main/java/org/apache/hadoop/ozone/s3/Gateway.java
b/hadoop-ozone/s3gateway/src/main/java/org/apache/hadoop/ozone/s3/Gateway.java
index 7b8dd58e2e2..e2c5ce4d49a 100644
---
a/hadoop-ozone/s3gateway/src/main/java/org/apache/hadoop/ozone/s3/Gateway.java
+++
b/hadoop-ozone/s3gateway/src/main/java/org/apache/hadoop/ozone/s3/Gateway.java
@@ -33,6 +33,7 @@
import org.apache.hadoop.hdds.server.http.BaseHttpServer;
import org.apache.hadoop.hdds.tracing.TracingUtil;
import org.apache.hadoop.hdds.utils.HddsServerUtil;
+import org.apache.hadoop.hdds.utils.IOUtils;
import org.apache.hadoop.hdds.utils.NettyMetrics;
import org.apache.hadoop.ozone.OzoneSecurityUtil;
import org.apache.hadoop.ozone.s3.metrics.S3GatewayMetrics;
@@ -111,8 +112,7 @@ public void start() throws IOException {
public void stop() throws Exception {
LOG.info("Stopping Ozone S3 gateway");
- httpServer.stop();
- contentServer.stop();
+ IOUtils.closeQuietly(httpServer, contentServer);
jvmPauseMonitor.stop();
S3GatewayMetrics.unRegister();
if (nettyMetrics != null) {
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]