Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Document that graceful shutdown with Tomcat requires Tomcat 9.0.33 or later #20886

Closed
dreis2211 opened this issue Apr 8, 2020 · 3 comments
Closed
Labels
type: documentation A documentation update
Milestone

Comments

@dreis2211
Copy link
Contributor

Hi,

I just played around with the graceful shutdown option server.shutdown.grace-period=1s while being on Tomcat 9.0.31 and got this error.

2020-04-08 20:40:46.278  INFO 42505 --- [extShutdownHook] o.s.b.w.e.tomcat.TomcatGracefulShutdown  : Commencing graceful shutdown, allowing up to 1s for active requests to complete
Exception in thread "SpringContextShutdownHook" java.lang.NoSuchMethodError: 'long org.apache.catalina.core.StandardContext.getInProgressAsyncCount()'
	at org.springframework.boot.web.embedded.tomcat.TomcatGracefulShutdown.active(TomcatGracefulShutdown.java:91)
	at org.springframework.boot.web.embedded.tomcat.TomcatGracefulShutdown.shutDownGracefully(TomcatGracefulShutdown.java:68)
	at org.springframework.boot.web.embedded.tomcat.TomcatWebServer.shutDownGracefully(TomcatWebServer.java:396)
	at org.springframework.boot.web.servlet.context.ServletWebServerApplicationContext.doClose(ServletWebServerApplicationContext.java:175)
	at org.springframework.context.support.AbstractApplicationContext$1.run(AbstractApplicationContext.java:948)

I found d8cead5 that removed the reflection call, so maybe the "hard" requirement on 9.0.33 can be documented at least somewhere.

Cheers,
Christoph

@spring-projects-issues spring-projects-issues added the status: waiting-for-triage An issue we've not yet triaged label Apr 8, 2020
@wilkinsona wilkinsona added the for: team-attention An issue we'd like other members of the team to review label Apr 9, 2020
@philwebb philwebb added type: documentation A documentation update and removed for: team-attention An issue we'd like other members of the team to review status: waiting-for-triage An issue we've not yet triaged labels Apr 9, 2020
@philwebb philwebb added this to the 2.3.x milestone Apr 9, 2020
@philwebb
Copy link
Member

philwebb commented Apr 9, 2020

Unless there's a compelling reason to support the older version, I think we should just document that we need 9.0.33. We could also catch that exception and provide a nicer message.

@philwebb
Copy link
Member

philwebb commented Apr 9, 2020

@dreis2211 Is there a particular reason you were using 9.0.31?

@dreis2211
Copy link
Contributor Author

Not at all - it was just pinned from previous experiments. I was simply a bit surprised about the hard requirement (as its quite unusual for Boot). Documentation is just fine.

@wilkinsona wilkinsona changed the title Graceful shutdown not working prior to Tomcat 9.0.33 Document that graceful shutdown with Tomcat requires Tomcat 9.0.33 or later Apr 22, 2020
@mbhave mbhave modified the milestones: 2.3.x, 2.3.0 May 12, 2020
@mbhave mbhave closed this as completed in a4254f7 May 12, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
type: documentation A documentation update
Projects
None yet
Development

No branches or pull requests

5 participants