Gracefully Stopping Logstash & Avoiding kill-9


(David Kleiner) #1

Hello,

Once in a while I need to restart logstash. I use SV for service management. Here's what happens:

[woot@log04 elasticsearch]$ sudo sv stop /etc/service/backend-indexnode*
timeout: run: /etc/service/backend-indexnode: (pid 13160) 67217s, want down, got TERM
timeout: run: /etc/service/backend-indexnode-2: (pid 13117) 67217s, want down, got TERM
timeout: run: /etc/service/backend-indexnode-3: (pid 13136) 67217s, want down, got TERM

I end up using kill -9.

Is there anything I can do to get logstash to obey less drastic measures?


(Mark Walkom) #2

What OS, what LS version?


(Jordan Sissel) #3

For some background, Logstash will already act on SIGINT and SIGTERM to start a safe shutdown. If safety cannot be achieved, logstash will wait for that safety to become available. This can cause Logstash to get stuck on shutdown if that safety never becomes possible.


(David Kleiner) #4

Thank you Mark and Jordan. I'm using LS 1.5GA on a CentOS 6 box.


(Nick Malcolm) #5

I experience this too. Ubuntu 14.04.2 LTS, 1.5.0-rc3.


(system) #6