Shutdown ElasticSearch when running in daemon mode

520 views Asked by At

Ok, this is probably a pretty stupid question. I started ElasticSearch in daemon mode on a server by running

./bin/elasticsearch -d

Unfortunately, this machine doesn't have curl (and it doesn't seem simple to install in this environment) so I can't run

curl -XPOST 'http://localhost:9200/_shutdown'

I tried running this command from my local computer (substituting 'localhost' for the ip address) but it didn't seem to do anything

The terminal on the server is xterm-256color if that helps.

How do I shut it down?

1

There are 1 answers

0
Maged Makled On BEST ANSWER

This command will give you the #PID for port running 9200

lsof -i :9200

once you get that #PID, kill it with

kill -9 #PID