Raise a proper SSH error on ECONNRESET
This commit is contained in:
parent
1b3250e3b6
commit
4a1a990491
|
@ -339,6 +339,10 @@ module Vagrant
|
||||||
error_key(:ssh_connection_refused)
|
error_key(:ssh_connection_refused)
|
||||||
end
|
end
|
||||||
|
|
||||||
|
class SSHConnectionReset < VagrantError
|
||||||
|
error_key(:ssh_connection_reset)
|
||||||
|
end
|
||||||
|
|
||||||
class SSHConnectionTimeout < VagrantError
|
class SSHConnectionTimeout < VagrantError
|
||||||
error_key(:ssh_connection_timeout)
|
error_key(:ssh_connection_timeout)
|
||||||
end
|
end
|
||||||
|
|
|
@ -215,6 +215,10 @@ module VagrantPlugins
|
||||||
rescue Errno::ECONNREFUSED
|
rescue Errno::ECONNREFUSED
|
||||||
# This is raised if we failed to connect the max amount of times
|
# This is raised if we failed to connect the max amount of times
|
||||||
raise Vagrant::Errors::SSHConnectionRefused
|
raise Vagrant::Errors::SSHConnectionRefused
|
||||||
|
rescue Errno::ECONNRESET
|
||||||
|
# This is raised if we failed to connect the max number of times
|
||||||
|
# due to an ECONNRESET.
|
||||||
|
raise Vagrant::Errors::SSHConnectionReset
|
||||||
rescue Errno::EHOSTDOWN
|
rescue Errno::EHOSTDOWN
|
||||||
# This is raised if we get an ICMP DestinationUnknown error.
|
# This is raised if we get an ICMP DestinationUnknown error.
|
||||||
raise Vagrant::Errors::SSHHostDown
|
raise Vagrant::Errors::SSHHostDown
|
||||||
|
|
|
@ -235,6 +235,13 @@ en:
|
||||||
If that doesn't work, destroy your VM and recreate it with a `vagrant destroy`
|
If that doesn't work, destroy your VM and recreate it with a `vagrant destroy`
|
||||||
followed by a `vagrant up`. If that doesn't work, contact a Vagrant
|
followed by a `vagrant up`. If that doesn't work, contact a Vagrant
|
||||||
maintainer (support channels listed on the website) for more assistance.
|
maintainer (support channels listed on the website) for more assistance.
|
||||||
|
ssh_connection_reset: |-
|
||||||
|
SSH connection was reset! This usually happens when the machine is
|
||||||
|
taking too long to reboot. First, try reloading your machine with
|
||||||
|
`vagrant reload`, since a simple restart sometimes fixes things.
|
||||||
|
If that doesn't work, destroy your machine and recreate it with
|
||||||
|
a `vagrant destroy` followed by a `1vagrant up`. If that doesn't work,
|
||||||
|
contact support.
|
||||||
ssh_connection_timeout: |-
|
ssh_connection_timeout: |-
|
||||||
Vagrant timed out while attempting to connect via SSH. This usually
|
Vagrant timed out while attempting to connect via SSH. This usually
|
||||||
means that the VM booted, but there are issues with the SSH configuration
|
means that the VM booted, but there are issues with the SSH configuration
|
||||||
|
|
Loading…
Reference in New Issue