Can't really kill a job [message #1389209] |
Fri, 27 June 2014 13:44 |
Fabrizio Giudici Messages: 21 Registered: May 2013 Location: Italy |
Junior Member |
|
|
Dear all,
a customer of mine would like to use Hudson to start/stop a simple application used for testing. The application generates some random traffic to exercise a webapp under test. It is basically a main() which sets up some java.util.Timer's. The application is normally launched from the command line and runs forever, until it is stopped with Ctrl^C.
We configured a Hudson job to run it, with the idea that pressing the red stop button would quit the test. But this just doesn't happen. The application is run by means of Maven exec plugin. I first tried exec:java, then exec:exec, to be sure that a new JVM is spawned independently of Maven. But the end result doesn't change: Hudson declares that the job is stopped, but I can still see it running in the list of active processes, and it needs to be manually killed. I frankly don't understand what's happening... We even installed a shutdownhook to explicitly kill the timers (even though I wouldn't understand why this is needed), but the hook is never called.
The thing happens on Windows 2008 R2, JDK 1.7.0_45. Maven is launched by means of the embedded support in Hudson.
Thanks.
Fabrizio Giudici - Java Architect @ Tidalwave s.a.s.
"We make Java work. Everywhere."
[Updated on: Fri, 27 June 2014 13:45] Report message to a moderator
|
|
|
|
Re: Can't really kill a job [message #1403190 is a reply to message #1389371] |
Tue, 22 July 2014 09:36 |
Fabrizio Giudici Messages: 21 Registered: May 2013 Location: Italy |
Junior Member |
|
|
Quick follow-up, with some delay. The problem indeed seems to be related to the Maven 3 integration plugin, or Maven itself. I worked around it by selecting the option of running a Window script, and explicitly launched the Java application with all the options and required arguments. Now it works, in the sense that can be killed cleanly. I have to retry with a variant, by explicitly launch Java but running Maven instead of the application (I would benefit from the options and arguments that are defined in the POM).
Fabrizio Giudici - Java Architect @ Tidalwave s.a.s.
"We make Java work. Everywhere."
|
|
|
Powered by
FUDForum. Page generated in 0.03044 seconds