Skip to content

HDDS-13069. Error stopping S3 Gateway admin webserver#9776

Open
adoroszlai wants to merge 1 commit intoapache:masterfrom
adoroszlai:HDDS-13069
Open

HDDS-13069. Error stopping S3 Gateway admin webserver#9776
adoroszlai wants to merge 1 commit intoapache:masterfrom
adoroszlai:HDDS-13069

Conversation

@adoroszlai
Copy link
Contributor

What changes were proposed in this pull request?

Workaround for the following exception, which happens when shutting down S3 Gateway:

ozone-s3g-1 | 2025-05-19 08:01:22,234 [shutdown-hook-0] ERROR http.HttpServer2: Error while stopping web app context for webapp s3g-web
ozone-s3g-1 | java.lang.IllegalStateException: Singleton not set for STATIC_INSTANCE => []
ozone-s3g-1 | 	at org.jboss.weld.bootstrap.api.helpers.RegistrySingletonProvider$RegistrySingleton.get(RegistrySingletonProvider.java:28)
...
ozone-s3g-1 | 	at org.eclipse.jetty.util.component.AbstractLifeCycle.stop(AbstractLifeCycle.java:94)
ozone-s3g-1 | 	at org.apache.hadoop.hdds.server.http.HttpServer2.stop(HttpServer2.java:1361)
ozone-s3g-1 | 	at org.apache.hadoop.hdds.server.http.BaseHttpServer.stop(BaseHttpServer.java:344)
ozone-s3g-1 | 	at org.apache.hadoop.ozone.s3.Gateway.stop(Gateway.java:112)

This change catches the exception to allow shutdown to complete.

https://issues.apache.org/jira/browse/HDDS-13069

How was this patch tested?

Verified that S3 Gateway shutdown continues after error is logged:

cd hadoop-ozone/dist/target/ozone-2.2.0-SNAPSHOT/compose/ozone
OZONE_DATANODES=3 ./run.sh -d
docker compose stop s3g
docker compose logs s3g
s3g-1  | 2026-02-17 10:10:26,855 [shutdown-hook-0] INFO s3.Gateway: Stopping Ozone S3 gateway
s3g-1  | 2026-02-17 10:10:26,866 [shutdown-hook-0] INFO handler.ContextHandler: Stopped o.e.j.w.WebAppContext@3006bfb{s3gateway,/,null,STOPPED}{jar:file:/opt/hadoop/share/ozone/lib/ozone-s3gateway-2.2.0-SNAPSHOT.jar!/webapps/s3gateway}
...
s3g-1  | 2026-02-17 10:10:26,873 [shutdown-hook-0] ERROR http.HttpServer2: Error while stopping web app context for webapp s3g-web
...
s3g-1  | 2026-02-17 10:10:26,876 [shutdown-hook-0] INFO handler.ContextHandler: Stopped o.e.j.w.WebAppContext@6339e604{s3g-web,/,null,STOPPED}{jar:file:/opt/hadoop/share/ozone/lib/ozone-s3gateway-2.2.0-SNAPSHOT.jar!/webapps/s3g-web}
s3g-1  | 2026-02-17 10:10:26,877 [JvmPauseMonitor0] INFO util.JvmPauseMonitor: JvmPauseMonitor-S3G: Stopped

CI:
https://github.com/adoroszlai/ozone/actions/runs/22091412549

@adoroszlai adoroszlai self-assigned this Feb 17, 2026
@adoroszlai adoroszlai added the s3 S3 Gateway label Feb 17, 2026
Copy link
Contributor

@sarvekshayr sarvekshayr left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks @adoroszlai for the fix. Verified the changes and it looks good to me.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

s3 S3 Gateway

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants