monit-general
[Top][All Lists]
Advanced

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

Re: as uid USERNAME and gid GROUPNAME not working


From: forsaleinsf
Subject: Re: as uid USERNAME and gid GROUPNAME not working
Date: Tue, 22 Feb 2011 09:11:58 -0800 (PST)

thanks for the response.

the resque process is not running when i start monit.

/var/log/messages:

Feb 21 17:18:02 task01 monit[32390]: 'resque' process is not running 
Feb 21 17:18:02 task01 monit[32390]: 'resque' trying to restart 
Feb 21 17:18:02 task01 monit[32390]: 'resque' start: 
/data/apps/smp/shared/start-resque 
Feb 21 17:18:32 task01 monit[32390]: 'resque' failed to start 

when i look in the app log for the process it shows:

rake aborted!
Bundler couldn't find some gems.Did you run `bundle install`?
/data/apps/smp/current/Rakefile:4
(See full trace by running task with --trace)
(in /data/apps/smp/releases/20110218170613)


which is an indication that the process is not being run by deploy - i get this 
log only when i run the process on the cli as root.

not sure if i missing something else

--- On Mon, 2/21/11, Jan-Henrik Haukeland <address@hidden> wrote:

> From: Jan-Henrik Haukeland <address@hidden>
> Subject: Re: as uid USERNAME and gid GROUPNAME not working
> To: "This is the general mailing list for monit" <address@hidden>
> Date: Monday, February 21, 2011, 10:03 PM
> 
> On Feb 21, 2011, at 11:45 PM, forsaleinsf wrote:
> 
> > running monit 5.2.3 - downloaded today.
> > 
> > I am running monit as root:
> > 
> > address@hidden shared]# service monit start
> > Starting monit: Starting monit daemon
> >               
>                
>                
>            [ 
> OK  ]
> > address@hidden shared]# ps -ef | grep monit
> > root     32390 
>    1  0 14:38 ?     
>   00:00:00 /usr/local/monit_523/bin/monit
> > 
> > my file in /etc/monit.d/ is :
> > 
> > check process resque with pidfile /var/tmp/resque.pid
> >    start program =
> "/data/apps/smp/shared/start-resque" as uid deploy and gid
> deploy
> >    stop program = "/bin/kill -9 `cat
> /var/tmp/resque.pid`"
> > 
> > if i run the command on the cli as the deploy user
> everything works well.
> > 
> > in the manual i read monit would ignore the as uid and
> gid option if monit was not run by root - this seems like
> what monit is doing, even though it being run by root.
> > 
> > has anyone seen this?
> 
> Please make sure that Monit starts the resque process. If
> resque was already started when you started Monit then it
> will of course run as the user it was started with. If the
> problem is that Monit does not switch uid/gid and starts the
> resque program as root, please check the Monit log or
> /var/log/messages to see if there are any errors there. 
> 
> --
> To unsubscribe:
> http://lists.nongnu.org/mailman/listinfo/monit-general
> 






reply via email to

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