I require an ssh client in master mode for connection sharing between
two servers.
I have a script that sets it up:
# cat /usr/local/bin/ssh-persist
/usr/bin/ssh -MNf -p35 root@10.125.75.68
I have a monit configuration file set up as follows:
check process ssh-persist matching "root@10.125.75.68"
if does not exist then exec "/usr/local/bin/ssh-persist"
Unfortunately, the exec doesn't seem to happen, even though the log says
it did (or at least tried):
Feb 8 14:51:21 m50-aws-tru-db2-secondary monit[14517]:
'm50-aws-tru-db2-secondary' Monit reloaded
Feb 8 14:51:21 m50-aws-tru-db2-secondary monit[14517]:
'm50-aws-tru-db2-secondary' Monit reloaded
Feb 8 14:51:21 m50-aws-tru-db2-secondary monit[14517]: M/Monit
heartbeat started
Feb 8 14:51:21 m50-aws-tru-db2-secondary monit[14517]: M/Monit
heartbeat started
Feb 8 14:51:21 m50-aws-tru-db2-secondary monit[14517]: 'ssh-persist'
file doesn't exist
Feb 8 14:51:21 m50-aws-tru-db2-secondary monit[14517]: 'ssh-persist'
file doesn't exist
Feb 8 14:51:21 m50-aws-tru-db2-secondary monit[14517]: 'ssh-persist'
exec: '/usr/local/bin/ssh-persist'
Feb 8 14:51:21 m50-aws-tru-db2-secondary monit[14517]: 'ssh-persist'
exec: '/usr/local/bin/ssh-persist'
However, it always remains in 'Does not exist' in monit summary, and the
process does not get started.
If I run the script by hand, it starts as desired, and after a short
while, monit summary will show 'ok' for the process being in existence.
I can run the script from cron, and it will likewise start without
incident, so there's no reliance on a tty (that was just a shot in the
dark).
I'm baffled.
--
Paul Theodoropoulos
www.anastrophe.com
--
To unsubscribe:
https://lists.nongnu.org/mailman/listinfo/monit-general