You know what, I'm a moron.  I had this exact problem with lightty's
startup script before.  When you run it over an ssh session, it won't
let go.  It is a bug.  The workaround is to add this to the line that
daemonizes lighttpd in the start section:  </dev/null >/dev/null 2>&1

It is an annoying solution because you're just redirecting all useful
output to null, but it does work.

On Jul 26, 3:38 pm, "Jamis Buck" <[EMAIL PROTECTED]> wrote:
> I'm still not 100% sure why, but some processes (notably lighttpd, but
> also balance and some others) are very, very sensitive to being run
> within capistrano's environment. The only way I've every found to
> spawn those processes successfully is to use nohup:
>
>   sudo "nohup ..."
>
> - Jamis
>
> On 7/26/07, E.B. Farnum <[EMAIL PROTECTED]> wrote:
>
>
>
> > I'm testing out capistrano 2 on a test box.  It's fedora 6 with
> > lighttpd and fastcgi.
>
> > The standard reaper scripts weren't much use to me as I'm running
> > lighttpd/fastcgi.  I changed task :restart in deploy.rb to the
> > following:
>
> >   task :restart, :roles => :app, :except => { :no_release => true } do
> >     #invoke_command "#{current_path}/script/process/reaper", :via =>
> > run_method
> >     sudo "/etc/init.d/lighttpd restart"
> >   end
>
> > When doing a "cap deploy" the deploy hangs right after restarting
> > lighttpd.  Eventually if I hit crtl-c I get the output down below the
> > "** [out..." lines.  Any ideas what might be causing it to hang?
>
> >   * executing `deploy:restart'
> >   * executing "sudo /etc/init.d/lighttpd restart"
> >     servers: ["localhost"]
> >     [localhost] executing command
> >  ** [out :: localhost]
> >  ** [out :: localhost] Stopping lighttpd:
> >  ** [out :: localhost]
> >  ** [out :: localhost] [
> >  ** [out :: localhost]
> >  ** [out :: localhost] OK
> >  ** [out :: localhost]
> >  ** [out :: localhost] ]
> >  ** [out :: localhost]
> >  ** [out :: localhost]
> >  ** [out :: localhost] Starting lighttpd:
> >  ** [out :: localhost]
> >  ** [out :: localhost] [
> >  ** [out :: localhost]
> >  ** [out :: localhost] OK
> >  ** [out :: localhost]
> >  ** [out :: localhost] ]
> >  ** [out :: localhost]
> >  ** [out :: localhost]
> > /usr/lib/ruby/gems/1.8/gems/capistrano-2.0.0/lib/capistrano/command.rb:
> > 49:in `sleep': Interrupt
> >         from /usr/lib/ruby/gems/1.8/gems/capistrano-2.0.0/lib/
> > capistrano/command.rb:49:in `process!'
> >         from /usr/lib/ruby/gems/1.8/gems/capistrano-2.0.0/lib/
> > capistrano/command.rb:36:in `loop'
> >         from /usr/lib/ruby/gems/1.8/gems/capistrano-2.0.0/lib/
> > capistrano/command.rb:36:in `process!'
> >         from /usr/lib/ruby/gems/1.8/gems/capistrano-2.0.0/lib/
> > capistrano/command.rb:11:in `process'
> >         from /usr/lib/ruby/gems/1.8/gems/capistrano-2.0.0/lib/
> > capistrano/configuration/actions/invocation.rb:52:in `run'
> >         from /usr/lib/ruby/gems/1.8/gems/capistrano-2.0.0/lib/
> > capistrano/configuration/connections.rb:135:in `execute_on_servers'
> >         from /usr/lib/ruby/gems/1.8/gems/capistrano-2.0.0/lib/
> > capistrano/configuration/actions/invocation.rb:50:in `run'
> >         from /usr/lib/ruby/gems/1.8/gems/capistrano-2.0.0/lib/
> > capistrano/configuration/actions/invocation.rb:74:in `sudo'
> >          ... 19 levels...
> >         from /usr/lib/ruby/gems/1.8/gems/capistrano-2.0.0/lib/
> > capistrano/cli/execute.rb:14:in `execute'
> >         from /usr/lib/ruby/gems/1.8/gems/capistrano-2.0.0/bin/cap:4
> >         from /usr/bin/cap:18:in `load'
> >         from /usr/bin/cap:18


--~--~---------~--~----~------------~-------~--~----~
To unsubscribe from this group, send email to [EMAIL PROTECTED]
For more options, visit this group at http://groups.google.com/group/capistrano
-~----------~----~----~----~------~----~------~--~---

Reply via email to