I struggled with something like this as well.  In my case, it was strying
to start solr (using jetty). The difference is, we start it using phing,
but here's how I did it:
>
> nohup phing solr-start > /dev/null 2> /dev/null


The trick seemed to be starting it with nohup and redirecting stdout and
stderr to /dev/null.  This allows it to disconnect from the capistrano
session and continue running in the background.

On Thu, Sep 27, 2012 at 1:52 PM, Jonathan Rochkind <[email protected]> wrote:

> Has anyone managed to get capistrano to restart a jetty on a RHEL server?
>
> I can not get it to work, and I'm not sure why. However capistrano is
> executing commands, the jetty that gets started up seems somehow tied to
> the capistrano session, and ends up getting killed when cap logs out of the
> remote server.
>
> Just trying (run "#{sudo} /etc/init.d/jetty restart").  No errors are
> reported, but jetty is not running. If I add a "&& sleep 60" on the end,
> then jetty is started up and runs as long as the sleeping is happening,
> then it's gone.
>
> I've tried setting :pty => true and :shell => true, neither/both seems to
> make a difference.
>
> Anyone managed to figure this out, or have any clues?
>
> --
> * You received this message because you are subscribed to the Google
> Groups "Capistrano" group.
> * To post to this group, send email to [email protected]
> * To unsubscribe from this group, send email to capistrano+unsubscribe@**
> googlegroups.com <capistrano%[email protected]> For more
> options, visit this group at http://groups.google.com/**
> group/capistrano?hl=en <http://groups.google.com/group/capistrano?hl=en>
>



-- 
*Todd Courtnage*
Director of Cloud Computing

Chaordix – Crowd Intelligence

email: [email protected]
office: +1.403.263.2655
toll free: +1.866.263.7775
mob: + 1.403.975.1591

http://www.chaordix.com


Follow us on twitter: http://twitter.com/chaordix
Our blog: http://www.chaordix.com/blog/

-- 
* You received this message because you are subscribed to the Google Groups 
"Capistrano" group.
* To post to this group, send email to [email protected]
* To unsubscribe from this group, send email to 
[email protected] For more options, visit this group at 
http://groups.google.com/group/capistrano?hl=en

Reply via email to