rtyler / vagrant-plugin

An experimental Vagrant plugin for Jenkins
https://wiki.jenkins-ci.org/display/JENKINS/Vagrant+Plugin
103 stars 44 forks source link

ERROR: undefined method `state' for nil:NilClass (NoMethodError) #22

Open cking opened 11 years ago

cking commented 11 years ago

Everytime I try to build my task, it fails with the following machine I get the following output:

I did some testing and got the following results for now: okay, did some testing.

Building on master in workspace /var/lib/jenkins/workspace/webhire
Checkout:webhire / /var/lib/jenkins/workspace/webhire - hudson.remoting.LocalChannel@5d7d0457
Using strategy: Default
Last Built Revision: Revision 123456 (origin/master)
Fetching changes from 1 remote Git repository
Fetching upstream changes from repository
Commencing build of Revision 123456 (origin/master)
Checking out Revision 123456 (origin/master)
Trying to fetch cookbooks into /var/lib/jenkins/workspace/webhire/cookbooks
Fetching upstream changes from gitolite@server2.viasto.com:cookbooks
Running Vagrant with version: 1.0.2.dev
Vagrantfile loaded, bringing Vagrant box up for the build
Importing base box 'ubuntu-12.04'...

The guest additions on this VM do not match the install version of
VirtualBox! This may cause things such as forwarded ports, shared
folders, and more to not work properly. If any of those things fail on
this machine, please update the guest additions and repackage the
box.

Guest Additions Version: 4.1.18
VirtualBox Version: 4.1.12

Matching MAC address for NAT networking...

Clearing any previously set forwarded ports...

Forwarding ports...
-- 22 => 2222 (adapter 1)
-- 80 => 8080 (adapter 1)
-- 8000 => 8001 (adapter 1)
-- 81 => 8181 (adapter 1)

Creating shared folders metadata...

Clearing any previously set network interfaces...
Booting VM...

Waiting for VM to boot. This can take a few minutes.

VM booted and ready for use!
Mounting shared folders...
-- v-root: /vagrant

-- v-csc-3: /tmp/vagrant-chef/chef-solo-1/cookbooks
Vagrant box is online, continuing with the build
[webhire] $ /bin/sh -xe /tmp/hudson6995480622182708576.sh
+ git submodule update --init --recursive
Submodule 'cookbooks' () registered for path 'cookbooks'
Submodule 'apache2' (server) registered for path 'apache2'
Submodule 'apt' (server) registered for path 'apt'
Submodule 'build-essential' (server) registered for path 'build-essential'
Submodule 'chef-htop' (server) registered for path 'chef-htop'
Submodule 'database' (server) registered for path 'database'
Submodule 'git' (server) registered for path 'git'
Submodule 'mysql' (server) registered for path 'mysql'
Submodule 'openssl' (server) registered for path 'openssl'
Submodule 'python' (server) registered for path 'python'
Submodule 'subversion' (server) registered for path 'subversion'
Submodule 'vim' (server) registered for path 'vim'
ERROR: undefined method `state' for nil:NilClass (NoMethodError)
/var/lib/jenkins/plugins/vagrant/WEB-INF/classes/models/vagrant_builder.rb:91:in `perform'
/var/lib/jenkins/plugins/vagrant/WEB-INF/classes/vendor/gems/jruby/1.8/gems/jenkins-plugin-runtime-0.1.26/lib/jenkins/plugin/proxies/build_step.rb:14:in `perform'
/var/lib/jenkins/plugins/vagrant/WEB-INF/classes/vendor/gems/jruby/1.8/gems/jenkins-plugin-runtime-0.1.26/lib/jenkins/plugin/proxies/build_step.rb:22:in `boolean_result'
/var/lib/jenkins/plugins/vagrant/WEB-INF/classes/vendor/gems/jruby/1.8/gems/jenkins-plugin-runtime-0.1.26/lib/jenkins/plugin/proxies/build_step.rb:13:in `perform'

Build step 'Provision the Vagrant machine' marked build as failure
Build finished, destroying the Vagrant box

Forcing shutdown of VM...

Destroying VM and associated drives...

Finished: FAILURE
rtyler commented 11 years ago

Sorry for the delay in responding to this, I completely missed the email first time around. What version of the vagrant-plugin are you using? I'm preparing another release and would like to be sure that this issue is no longer present

cking commented 11 years ago

I am sorry for my delay. I don't use vagrant or jenkins currently. I needed that back for my old company, but they settled to use the shell for it in the end.