Bug 909341
Summary: | [as7] Shutting down the agent also shuts down the as7 started by running the start operation | ||
---|---|---|---|
Product: | [Other] RHQ Project | Reporter: | Jirka Kremser <jkremser> |
Component: | Operations, Plugins | Assignee: | Nobody <nobody> |
Status: | NEW --- | QA Contact: | |
Severity: | high | Docs Contact: | |
Priority: | unspecified | ||
Version: | 4.5 | CC: | hrupp |
Target Milestone: | --- | ||
Target Release: | --- | ||
Hardware: | Unspecified | ||
OS: | Unspecified | ||
Whiteboard: | |||
Fixed In Version: | Doc Type: | Bug Fix | |
Doc Text: | Story Points: | --- | |
Clone Of: | Environment: | ||
Last Closed: | Type: | Bug | |
Regression: | --- | Mount Type: | --- |
Documentation: | --- | CRM: | |
Verified Versions: | Category: | --- | |
oVirt Team: | --- | RHEL 7.3 requirements from Atomic Host: | |
Cloudforms Team: | --- | Target Upstream Version: | |
Embargoed: |
Description
Jirka Kremser
2013-02-08 15:28:21 UTC
Replicated also for as6 (eap 5.1.2). This is happening because of following lines in the launch script (doesn't matter if it is standalone.sh or run.sh): trap "kill -HUP $JBOSS_PID" HUP trap "kill -TERM $JBOSS_PID" INT trap "kill -QUIT $JBOSS_PID" QUIT trap "kill -PIPE $JBOSS_PID" PIPE trap "kill -TERM $JBOSS_PID" TERM i.e. script register itself for listening on the signals mentioned above and re-sends (relays) the signal to the actual jboss process. If these commands are commented out, the life cycle of AS will survive the life cycle of the agent. A quick fix may try to find those traps commands in the launch script and comment them out. Adding following code to AgentMain.start() method solves the issue: SignalHandler signalHandler = new SignalHandler() { public void handle(Signal signal) { LOG.warn("Catching interrupt signal, shutting down all the threads." m_shutdownHook.run(); } }; Signal.handle(new Signal("INT"), signalHandler); Unfortunately, the classes SignalHandler and Signal are coming from sun.misc package and we can't depend on them. The code make use of native methods so it can't be copy&pasted to our code base. |