monit-general
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

failure to exec


From: Paul Theodoropoulos
Subject: failure to exec
Date: Thu, 8 Feb 2018 15:41:11 -0800
User-agent: Mozilla/5.0 (Macintosh; Intel Mac OS X 10.13; rv:58.0) Gecko/20100101 Thunderbird/58.0

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 address@hidden

I have a monit configuration file set up as follows:
    check process ssh-persist matching "address@hidden"
    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

reply via email to

[Prev in Thread] Current Thread [Next in Thread]