Google Groups Home
Help | Sign in
cap deploy sticks after lighty restart
There are currently too many topics in this group that display first. To make this topic appear first, remove this option from another topic.
There was an error processing your request. Please try again.
flag
  3 messages - Collapse all
The group you are posting to is a Usenet group. Messages posted to this group will make your email address visible to anyone on the Internet.
Your reply message has not been sent.
Your post was successful
E.B. Farnum  
View profile
 More options Jul 26 2007, 6:29 pm
From: "E.B. Farnum" <ed...@claytonzone.com>
Date: Thu, 26 Jul 2007 15:29:28 -0700
Local: Thurs, Jul 26 2007 6:29 pm
Subject: cap deploy sticks after lighty restart
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


    Reply to author    Forward  
You must Sign in before you can post messages.
To post a message you must first join this group.
Please update your nickname on the subscription settings page before posting.
You do not have the permission required to post.
Jamis Buck  
View profile
 More options Jul 26 2007, 6:38 pm
From: "Jamis Buck" <ja...@37signals.com>
Date: Thu, 26 Jul 2007 16:38:31 -0600
Local: Thurs, Jul 26 2007 6:38 pm
Subject: Re: [Capistrano] cap deploy sticks after lighty restart
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 <ed...@claytonzone.com> wrote:


    Reply to author    Forward  
You must Sign in before you can post messages.
To post a message you must first join this group.
Please update your nickname on the subscription settings page before posting.
You do not have the permission required to post.
E.B. Farnum  
View profile
 More options Jul 26 2007, 6:49 pm
From: "E.B. Farnum" <ed...@claytonzone.com>
Date: Thu, 26 Jul 2007 15:49:14 -0700
Local: Thurs, Jul 26 2007 6:49 pm
Subject: Re: cap deploy sticks after lighty restart
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" <ja...@37signals.com> wrote:


    Reply to author    Forward  
You must Sign in before you can post messages.
To post a message you must first join this group.
Please update your nickname on the subscription settings page before posting.
You do not have the permission required to post.
End of messages
« Back to Discussions « Newer topic     Older topic »

Create a group - Google Groups - Google Home - Terms of Service - Privacy Policy
©2008 Google