I've got a Java8 application running on RHEL 6.10. This application registers a shutdown handler via the usual method:
Thread shutdownThread = new Thread(()=>{
Logger.info("Got shutdown signal");
// Do cleanup
});
Runtime.getRuntime().addShutdownHook(shutdownThread);
This application is kicked off by a Jenkins build (with the BUILD_ID
env var set to dontkillme
). The application initializes successfully, but then after ~30 seconds the shutdown hook is called and the application terminates. I'm trying to figure out who is shutting me down and why. I've monitored top
and it doesn't appear that memory is an issue while it's running, so I don't think the OOM killer is the culprit. I've also looked at /var/log/dmesg
and /var/log/messages
and don't see anything relevant there either. I don't think Jenkins would be killing me, both since I set BUILD_ID
and also because the application dies while the "parent" Jenkins job is still running.
What other methods / tools can I use to see what's happening? Note that my environment is very locked down, so it would be difficult to download and run something from the internet, hopefully there's something in a standard RHEL6 install I could use.