Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Thorntail not exiting gracefully

I'm running a Thorntail 2.2.1.Final microservice with Maven using either of these commands

mvn thorntail:start
mvn thorntail:run

It runs fine, but when I hit Ctrl-C it doesn't exit the application i.e. the console returns, but the app runs in the background. I've tried to stop it

mvn thorntail:stop

But that doesn't work. I have to go and kill the process. I'm using Windows 10.

like image 865
Sean Avatar asked Nov 12 '18 08:11

Sean


1 Answers

The thorntail:start and thorntail:stop goals are meant to be used together as part of a Maven lifecycle, typically for integration testing. That is, thorntail:start intentionally leaves the process running in the background, and thorntail:stop should stop it.

For interactive use, mvn thorntail:run should be used. That keeps waiting in the foreground, and Ctrl+C should stop the application behind it.

If none of that works, it's a bug. I'd recommend filing a bug in https://issues.jboss.org/browse/THORN and preferrably also include a jstack output for the process.

like image 137
Ladicek Avatar answered Nov 20 '22 05:11

Ladicek