Working of ES as a daemon

(Faiz Halde) #1

Our cluster sizes are getting bigger and bigger [40-50machines] & there are times when we need to do a full cluster restart

It is really painful to log into each machines and restart ES processes running on them

For mitigating that, we were writing a daemon process in each machine that would be responsible for starting/stopping ES nodes on that machine thru a rest API [Java daemon]

But the problem we are facing is, whenever we spawn a ES process [./bin/elasticsearch -d] from the Java daemon, we are unable to get back the PID of the ES process. Can someone explain how ES as a daemon works?

We use RuntimeExec.exec for executing the script

(Ryan Ernst) #2

The -d option means daemonize. Elasticsearch will write a pid file in that case. You can pass the pid file location with the -p option.

(Faiz Halde) #3

Awesome. you are a life saver. hope this helps

(system) #4

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