Bug 1328673

Summary: [GSS](6.4.z) In EAP, is it able to record TERM signal in server.log?
Product: [JBoss] JBoss Enterprise Application Platform 6 Reporter: xuzhan
Component: LoggingAssignee: Fedor Gavrilov <fgavrilo>
Status: CLOSED DUPLICATE QA Contact: Nikoleta Hlavickova <nziakova>
Severity: unspecified Docs Contact:
Priority: unspecified    
Version: 6.4.0CC: bmaxwell, brian.stansberry, chaowan, dereed, fgavrilo, jperkins, xuzhan
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: 2017-02-26 04:37:42 UTC 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 xuzhan 2016-04-20 03:04:15 UTC
Description of problem:
When EAP 6.x running in service/non-service mode on Linux, if use "kill -15 <EAP_PID>" or send TERM signal by system[1] to shutdown EAP, there is no clear message in server.log to let user know the shutdown reason.

[1]http://man7.org/linux/man-pages/man5/systemd.service.5.html

Version-Release number of selected component (if applicable):


How reproducible:


Steps to Reproduce:
1.
2.
3.

Actual results:


Expected results:
For example, server.log is able to record that EAP was shutdown by signal TERM.
After that user can narrow down the issue quickly.

Additional info:
Please let us know if it is able to implement in next release?

Comment 1 James Perkins 2016-04-20 15:03:44 UTC
What specific OS and JDK are being used? I believe in most cases the hotspot VM will honor shutdown hooks for SIGTERM. There is no guarantee that shutdown hooks will run though. There's likely not much we can do about this.

Comment 3 Fedor Gavrilov 2016-04-21 09:33:36 UTC
The description of problem states that there is no clear indication of shutdown reason, not just the fact that EAP 6 was shut down by request. 
So, to re-iterate, what do we want in the logs in first place? Indication that server was shutdown by exactly SIGTERM signal or just "Server shutdown has been requested." as it is now in EAP7, as Brian mentioned?

Comment 4 dereed 2016-04-21 21:37:00 UTC
> what do we want in the logs in first place?

Details on what triggered the shutdown.  
Signal (and which signal), explicit shutdown command, System.exit() call, etc.

Comment 5 dereed 2016-04-21 21:39:06 UTC
Note that in EAP 5 there are different logs for each of those triggers.

They're not explicitly stated (you have to know what logs correspond to what trigger), and the specific signal is not logged.  But EAP 6 does not have any indication of what triggered a shutdown.

Comment 15 Brad Maxwell 2017-02-26 04:37:42 UTC

*** This bug has been marked as a duplicate of bug 1116086 ***