Well, crap. I figured out my problem. There was a DNS issue with the
name of my production machine. It's currently hiding, and its full
name wasn't recognized. If I used just its name (e.g., role :web,
"cerf2"), then it worked.
So my complaint is that the error message is really not helpful.
"closed iostream" for a "don't recognize host" error? I tried an
experiment with Net::SSH::Gateway:
gateway = Net::SSH::Gateway.new('some-gateway.calvin.edu', 'jdfrens')
gateway.ssh("cerf2.calvin.edu", "calvincs") do |ssh|
puts ssh.exec!("hostname")
end
This fails with an "connection closed by remote host" error which is
only marginally better feedback. For the record, the ssh command-line
program gives an error message like this: "Could not resolve hostname
cerf2.calvin.edu: Name or service not known". THAT's really helpful!
I don't know if there's anything that can or even SHOULD be done in
capistrano for this problem, but I thought I should post a followup in
case someone gets the same error and find the original email without a
solution.
jdf
On Thu, Mar 4, 2010 at 12:57 PM, Jeremy <[email protected]> wrote:
> I'm using multistage deployment with Capistrano, and I'm having
> troubles with one of the stages. One stage works just fine, and the
> other results in a "closed stream" error. They go through the exact
> same gateway.
>
> I'm deploying from a MacBook (10.6) using MacPorts for Ruby (ruby
> 1.8.7 (2010-01-10 patchlevel 249) [i686-darwin10.2.0]) and using a
> hand-installed rubygems (1.3.6). Capistrano (v2.5.17) was installed
> with rubygems.
>
> I can deploy to staging just fine; with production I get a "lib/net/
> ssh/ruby_compat.rb:36:in `select': closed stream (IOError)" error. I
> have the complete output from running the appropriate cap commands in
> this gist: http://gist.github.com/321985 .
>
> I've successfully run other Capistrano tasks on staging, so I know
> it's working.
>
> This "closed stream" error appears to be a threading issue (at least
> it was in the past). I'm running a very current version of Ruby on my
> MacBook and Net::SSH is at version 2.0.20 (as see from the output in
> the gist), so this is quite puzzling. The version of Ruby (let alone
> Net::SSH) on the destination machines shouldn't be an issue at all;
> regardless, the two staging machines have the same versions as each
> other.
>
> FWIW, here's my
> http://github.com/jdfrens/calvincs/blob/master/config/deploy.rb
> and http://github.com/jdfrens/calvincs/tree/master/config/deploy/ from
> my project's git repository.
>
> --
> * 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
--
Jeremy D. Frens
[email protected]
http://www.norecess.org/
--
* 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