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

Shutdown Fails #187

Open
mandrachek opened this issue Nov 16, 2020 · 0 comments
Open

Shutdown Fails #187

mandrachek opened this issue Nov 16, 2020 · 0 comments

Comments

@mandrachek
Copy link

mandrachek commented Nov 16, 2020

In some cases I've run into, tomcat receives the shutdown command, but never appears to finish shutting down.
In developing my own plugin that runs tomcat (not nearly as general purpose as gretty), I ran into the same issue.

After configuring tomcat, run and await:

public void runTomcat() {
   tomcat.start();
   server.await();
   tomcat.stop();
   tomcat.destroy();
}

I'm not sure what the problem is - some simple examples worked fine, but loading something more complicated - it seems the shutdown just hangs. I was able to fix it in my code however simply by doing:

public void runTomcat() {
   tomcat.start();
   server.await();
   tomcat.stop();
   tomcat.destroy();
   System.exit(0);
}

Now my shutdown occurs, and the gradle task actually finishes.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant