Trying to stop java process results in unclean shutdown with EXIT 143 or 130 depending on signal

Hi,

When i try to stop my processes, they EXIT with 143 or 130 status, depending on signal i send it (SIGTERM/SIGINT/SIGTTIN etc). I would wish for a clean shutdown with EXIT 0.

I’m running druid 0.7.1.1 (from binary package), as a non-privileged user on Ubuntu 12.04.5 LTS

My Java is:

java version “1.7.0_71”

Java™ SE Runtime Environment (build 1.7.0_71-b14)

Java HotSpot™ 64-Bit Server VM (build 24.71-b01, mixed mode)

The command-line to start the process I use is:

$ java -cp /etc/druid/broker:/opt/druid/current/lib/* -server -Xmx4G -Duser.timezone=UTC -Dfile.encoding=UTF-8 -Djava.io.tmpdir=/opt/druid/tmpdir -Djava.util.logging.manager=org.apache.logging.log4j.jul.LogManager io.druid.cli.Main server broker

when killing it i get:

INFO [Thread-43] com.metamx.common.lifecycle.Lifecycle - Running shutdown hook

FATAL Unable to register shutdown hook because JVM is shutting down.

I’ve pasted full TRACE loglevel here:

http://paste.ubuntu.com/11241783/

Any pointers in what I might do to get STATUS 0 on my process Exits would be greatly appreciated.

Br

Björn Zettergren

Hi Bjorn, thanks for the detailed information.

Would you mind filing an issue on this matter in github?

This behavior has been around for a long time and the quirky shutdown behavior is definitely annoying.

Hi Charles,

Issue created at https://github.com/druid-io/druid/issues/1378