On Sun, Mar 15, 2009 at 11:50 PM, Christopher Opena
<
address@hidden> wrote:
> Hello all, I've been doing some fairly intensive testing of using monit to
> test out multiple applications on my server. Each of the specific services
> I'm monitoring uses a "/bin/bash -c '/path/to/script -d'" as the Start
> execution. I've noticed in testing that when I stop one of the services, it
> starts up automatically. The other one doesn't. The monit log shows it
> attempting to start the service, but it fails. I've double- and
> triple-checked the Start directive to make sure that I didn't make any
> syntax errors, and even copied the contents of the failing Start directive
> out into my bash session (that works fine). The only difference I can see
> is that the path to the failing script is very long.
>
> Is there a character limit of some kind on the Start directive that I'm not
> aware of? I tried checking the Monit manual and it doesn't mention any
> character limit of any kind. Below I'm pasting the contents of the two
> Start scripts (with directories in Xs just so you can see the script length
> without revealing too much).
>
> --Successful Script--
> start program = "/bin/bash -c 'cd /xxx/xxxxx/xxx/xxxxxxx;
> LOCAL_VAR=xxxxxxxxxx /xxx/xxxxx/xxx/xxxxxxx/xxxxxx/xxx start -d'" as uid
> my__uid and gid my__gid with timeout 60 seconds
>
> --Failing Script--
> start program = "/bin/bash -c 'cd
> /xxx/xxxxx/xxxxxxxxxxxxxxxxxxxxxxxxx/xxxxxxx; LOCAL_VAR=xxxxxxxxxx
> /xxx/xxxxx/xxxxxxxxxxxxxxxxxxxxxxxxx/xxxxxxx/xxx start -d'" as uid my__uid
> and gid my__gid with timeout 60 seconds
>
> I've also checked to make sure that directory ownership was the same on the
> two different log directories that the scripts write to - no problems
> there. I'm quite at my wits end to determine why one works and the other
> one doesn't - and they starting the exact same script for different apps on
> the same server! Any help would be greatly appreciated.
>
> Thanks,
> -Chris.
>