Logstash stuck after Restart/Stop command

i have a logstash server (8.1.3 version) with 3 pipelines.
each pipeline configure with jdbc to collect data from sql server.
everything works ok until i try to execute the :
"systemctl restart logstash"
and it's seems like the logstash is stuck.
in the log i see :

Jul 27 21:07:17 ******************** systemd[1]: Stopping logstash...
Jul 27 21:07:17 ******************** logstash[2370313]: [2022-07-27T21:07:17,482][WARN ][logstash.runner          ] SIGTERM received. Shutting down.

and in the command :
"systemctl status logstash" i see :

● logstash.service - logstash
   Loaded: loaded (/etc/systemd/system/logstash.service; enabled; vendor preset: disabled)
   Active: deactivating (stop-sigterm) since Wed 2022-07-27 21:07:17 IDT; 2h 36min ago
 Main PID: 2370313 (java)

what is the SIGTERM means and why my logstash behave like that ?


Hi @Oriya ,
Usually it means that Logstash is trying to shutdown but due to active threads it takes a while to shutdown gracefully. You can get more information looking at logstash log files (by default located at /var/log/logstash/logstash-plain.log) rather than systemctl outputs.
in case you want to shutdown Logstash non-gracefully you can do the following:

ps -ef | grep logstash
sudo kill -9 <pid from prevoius command>
  • Bear in mind that shutting down Logstash non-gracefully may result in data loss.

Hi @Ofir_Edi ,
Thank you for your detailed answer, you helped me a lot.

1 Like

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