Server Fault is a question and answer site for system and network administrators. Join them; it only takes a minute:

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

I have some java processes which need to be started by roster:

J1 on X --> J2 on Y --> J3 on Z

An idea comes to my mind is let J1 start automatically and use Nagios + NRPE to start J2 based the J1 state. Is there any better way to do this?

share|improve this question
up vote 2 down vote accepted

Use ssh with public key encryption.

I had an environment like this. Starting the primary (J1 in your example) would connect to host Y and run command J2. Again, in your example, I would make the startup of J2 do the same thing: connect to Z and start J3.

Use ssh this way (with a public key) to start J2 from X:

ssh -i J2-on-Y.key user@y start j2

Likewise, starting up J2 on Y would have this command:

ssh -i J3-on-Z.key user@z start j3

With this in place, starting J1 would bring up all of the rest. Don't forget to account for shutdown as well - as well as the case when a startup is attempted but the process is already running.

share|improve this answer

Your Answer


By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.