I isolated Capistrano from the environment by creating a simple
Net::SSH script that makes one call via ssh:
#! /usr/local/bin/ruby
require 'rubygems'
require 'net/ssh'
Net::SSH.start('host1', 'tools') do |ssh|
output = ssh.exec!("hostname")
puts output
end
This is where all the issues lie, as I get exactly the same error.
Still digging...
On Aug 22, 4:47 pm, Chuck <[EMAIL PROTECTED]> wrote:
> Capistranowas working extremely well until a few weeks back. We have
> been unable to determine what change has caused our sudden connection
> failures. When the SSH command is run manually on the command line, it
> succeeeds without complaint. When the exact same command is run via a
> task, it fails:
>
> [EMAIL PROTECTED]:/var/www/brews> cap -S deploy_type=dr deploy:cron:show
> * executing `deploy:cron:show'
> * executing "crontab -l"
> servers: ["host2.domain.net", "host3.domain.net"]
> connection failed for: host2.domain.net (Net::SSH::Disconnect:
> connection closed by remote host), host2.domain.net
> (Net::SSH::Disconnect: connection closed by remote host)
>
> [EMAIL PROTECTED]:/var/www/brews> ssh host2 "crontab -l"
> #####################################################################
> # min hours date month weekday #
> # 0-59 0-23 1-31 1-12 0-6 (where 0 is Sunday) #
> # #
> # NOTE: Terminate every line with a '%' to indicate the command #
> # ends with a newline (\n) character. #
> #####################################################################
> ...
>
> Even more interesting, theCapistranotask will succeed if it is
> executed by some account OTHER than "tools," following a standard
> password prompt.
>
> Capistranov2.4.3
> Net::SSH v2.0.3
>
> This one is making me crazy!
>
> Chuck
--~--~---------~--~----~------------~-------~--~----~
To unsubscribe from this group, send email to [EMAIL PROTECTED]
For more options, visit this group at http://groups.google.com/group/capistrano
-~----------~----~----~----~------~----~------~--~---