adoroszlai opened a new pull request, #9776: URL: https://github.com/apache/ozone/pull/9776
## 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 -- 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: [email protected] For queries about this service, please contact Infrastructure at: [email protected] --------------------------------------------------------------------- To unsubscribe, e-mail: [email protected] For additional commands, e-mail: [email protected]
