|
Re: put hangs: msg#00144lang.ruby.capistrano.general
Adding "set :synchronous_connect, true" fixed by put hang, but I also noticed that, for me, put would only hang with "large" files. I kept repeatedly trying to put the same file, and as I whittled it down it would finally go through. Maybe that will help someone debug. I didn't spend enough time to figure out exactly what the threshold is, because the :synchronous_connect option worked for me, but the full file I was trying to send was only 196k, so it's a low threshold what ever it is. Paul On Nov 13, 4:07 pm, Jamis Buck <ja...-uHoyYlH2B+GakBO8gow8eQ@xxxxxxxxxxxxxxxx> wrote: > You might try the following setting in deploy.rb: > > set :synchronous_connect, true > > Some have found that having cap try to connect to each server > synchronously (rather than in parallel, via threads) has helped with > put hanging. > > - Jamis > > On Nov 13, 2007, at 1:32 PM, Skorgu wrote: > > > > > I realize this is an old thread, but there aren't any good solutions > > to this that I can find. I'm seeing identical behavior, also with > > Ubuntu on both ends and no gateway. I can replicate this trivially if > > anyone wants to poke at it. > > > In the meantime, I'm backing down to the shell to transfer files: > > > def put_file(file, role) > > for file_server in roles[*role] > > logger.info "Pushing #{file} to #{file_server}" > > %x[ scp #{file} #{file_server}:~/#{file}] > > end > > logger.info "#{file} pushed successfully" > > end > > > Definitely dirty but it gets the job done. Hope this helps someone. > > > On Sep 26, 1:40 pm, wolfmanjm > > <wolfma...-Re5JQEeQqe8AvxtiuMwx3w@xxxxxxxxxxxxxxxx> wrote: > >> No gateway, everything in my capfile is shown. This is very > >> repeatable, so if I get time I'll try to figure it out. I can give a > >> you a trace of where it is hung when I hit ctrl c if that helps. > > >> The funny thing is I used this all the time in cap1 and never had > >> this > >> problem before! > > >> On Sep 26, 2:28 am, Jamis Buck > >> <ja...-uHoyYlH2B+GakBO8gow8eQ@xxxxxxxxxxxxxxxx> wrote: > > >>> Yucky. You're being bit by the infamous hanging-put bug. Are you > >>> using a gateway? If so, that's the problem, and there's not really a > >>> workaround except to NOT use a gateway with put. If you aren't using > >>> a gateway, then you're one of the lucky few who have encountered > >>> this > >>> one. I've never been able to duplicate this except with a gateway. > > >>> I'm very hopeful that the rewrite of Net::SSH and Net::SFTP will fix > >>> this...but that's still a few weeks off, at best. I'm afraid I > >>> haven't got any better news for you. :( If you happen to find a > >>> workaround, please do post it here. > > >>> - Jamis > > >>> P.S. And yeah, the lack of documentation *is* disturbing. I'll > >>> get to > >>> it as soon as I can. > > >>> On Sep 26, 2007, at 12:32 AM, wolfmanjm wrote: > > >>>> Hi, I'm just starting to use cap2 (after using cap1 for years). > > >>>> I have a really really simple capfile... > > >>>> ssh_options[:port] = 11345 > > >>>> task :deploy_mystuff, :hosts => "myhost.com" do > >>>> now= "#{Time.now.utc.strftime("%Y%m%d%H%M%S")}" > > >>>> put(File.read("app..war"), "app.war.#{now}") > > >>>> run <<-CMD > >>>> mv deploy/app.war app.war.old.#{now} && > >>>> cp "app.war.#{now} deploy/app_war" > >>>> CMD > > >>>> end > > >>>> The put hangs before sending any bytes, on the host the file is > >>>> created ok, but has zero length. > > >>>> (ssh and scp work fine, my host is ubuntu fiesty and the server is > >>>> ubuntu dapper). > > >>>> Any ideas? > > >>>> (BTW I presume put is supported in cap2, the lack of > >>>> documentation is > >>>> quite disturbing :) > > >>> smime.p7s > >>> 3KDownload > > > > > > > smime.p7s > 3KDownload |
|
| <Prev in Thread] | Current Thread | [Next in Thread> |
|---|---|---|
| Previous by Date: | Re: Where is the SSH Known Hosts Cache: 00144, Endikos |
|---|---|
| Next by Date: | Re: put hangs: 00144, Paul Stadig |
| Previous by Thread: | deploy_via :copy with Perforcei: 00144, Andy Koch |
| Next by Thread: | Re: put hangs: 00144, Paul Stadig |
| Indexes: | [Date] [Thread] [Top] [All Lists] |
| News | FAQ | advertise |