How to Force shutdown running Logstash in windows using command prompt

Hi
I am running logstash with '1' worker process to load data from sql to elastic using command line 'bin/logstash -f logstash.conf' on regular intervals. it is executing fin with no issues in positive scenarios.

Sometimes logstash process does not complete (it may be due to error. it tries to reconnect/retry with out exit). In these scenarios, i would like to force shutdown active logstash if running so that i can trigger a new process for logstash.

Right now it throws message 'logstash is already running' and to enable again, i have to restart my system. Is there any way from command prompt to force exit running logstash so that i can trigger a new process.

Thank you.

Have you tried sending an interrupt signal?

If you're not familiar, in the Windows command line, you can send a SIGINTto the current running process with the CTRL + c key-stroke to signal an interrupt. Logstash responds to a SIGINT by shutting down nicely.

If you really do want to "force" it to shutdown immediately without doing the things it normally does to ensure its next startup will be nice, you can send it a SIGBREAK with CTRL + BREAK.

This topic was automatically closed 28 days after the last reply. New replies are no longer allowed.