Getting undefined method `chomp' for nil error

305 views
Skip to first unread message

Gaston

unread,
Oct 11, 2015, 9:10:26 AM10/11/15
to Vagrant
Hi Vagrants!!
I am experiencing an issue which reproduces randomly (once every few deployments).
Looks like Vagrant tries to SSH connect to the new VM unsuccessfully.
Take into account that the problem reproduces for VMs created from boxes that already succeeded to deploy and connect in the past on top of the same vCloud Director.
I am using Vagrant 1.7.4 deploying using the the vcloud plugin.
When I try to connect the same VM manually (after the failure) using the password, I successfully login the VM.
Any clue what's going on? Is this s timing issue? Is there any retry parameter which can be increased?

/opt/vagrant/embedded/gems/gems/net-ssh-2.9.2/lib/net/ssh/prompt.rb:73:in `prompt': undefined method `chomp' for nil:NilClass (NoMethodError)
	from /opt/vagrant/embedded/gems/gems/net-ssh-2.9.2/lib/net/ssh/authentication/methods/password.rb:57:in `ask_password'
	from /opt/vagrant/embedded/gems/gems/net-ssh-2.9.2/lib/net/ssh/authentication/methods/password.rb:22:in `authenticate'
	from /opt/vagrant/embedded/gems/gems/net-ssh-2.9.2/lib/net/ssh/authentication/session.rb:79:in `block in authenticate'
	from /opt/vagrant/embedded/gems/gems/net-ssh-2.9.2/lib/net/ssh/authentication/session.rb:66:in `each'
	from /opt/vagrant/embedded/gems/gems/net-ssh-2.9.2/lib/net/ssh/authentication/session.rb:66:in `authenticate'
	from /opt/vagrant/embedded/gems/gems/net-ssh-2.9.2/lib/net/ssh.rb:211:in `start'
	from /opt/vagrant/embedded/gems/gems/vagrant-1.7.4/plugins/communicators/ssh/communicator.rb:389:in `block (2 levels) in connect'
	from /opt/vagrant/embedded/lib/ruby/2.0.0/timeout.rb:66:in `timeout'
	from /opt/vagrant/embedded/gems/gems/vagrant-1.7.4/plugins/communicators/ssh/communicator.rb:367:in `block in connect'
	from /opt/vagrant/embedded/gems/gems/vagrant-1.7.4/lib/vagrant/util/retryable.rb:17:in `retryable'
	from /opt/vagrant/embedded/gems/gems/vagrant-1.7.4/plugins/communicators/ssh/communicator.rb:366:in `connect'
	from /opt/vagrant/embedded/gems/gems/vagrant-1.7.4/plugins/communicators/ssh/communicator.rb:64:in `block in wait_for_ready'
	from /opt/vagrant/embedded/lib/ruby/2.0.0/timeout.rb:66:in `timeout'
	from /opt/vagrant/embedded/gems/gems/vagrant-1.7.4/plugins/communicators/ssh/communicator.rb:42:in `wait_for_ready'
	from /opt/vagrant/embedded/gems/gems/vagrant-1.7.4/lib/vagrant/action/builtin/wait_for_communicator.rb:16:in `block in call'
stdout: Bringing machine 'vAppName' up with 'vcloud' provider...
==> vAppName: Building vApp...
==> vAppName: vApp vAppName successfully created.
==> vAppName: Setting VM hardware...
==> vAppName: Powering on VM...
==> vAppName: Waiting for machine to boot. This may take a few minutes...
==> vAppName: Waiting for SSH Access on 10.153.164.94:22 ... 
==> vAppName: Waiting for SSH Access on 10.153.164.94:22 ... 
==> vAppName: Waiting for SSH Access on 10.153.164.94:22 ... 
==> vAppName: Waiting for SSH Access on 10.153.164.94:22 ... 
==> vAppName: Waiting for SSH Access on 10.153.164.94:22 ... 
==> vAppName: Waiting for SSH Access on 10.153.164.94:22 ... 
    vAppName: SSH address: 10.153.164.94:22
    vAppName: SSH username: root
    vAppName: SSH auth method: password
ro...@10.153.164.94's password:

Alvaro Miranda Aguilera

unread,
Oct 11, 2015, 4:13:39 PM10/11/15
to vagra...@googlegroups.com
On Mon, Oct 12, 2015 at 2:10 AM, Gaston <gast...@gmail.com> wrote:
> undefined method `chomp'

Hello,

It seems is trying to chomp a variable that is not yet defined.

Not sure if should ask password at all, so I would suggest open an
issue with the plugin repo?

Thanks
Alvaro
Reply all
Reply to author
Forward
0 new messages