sous-chefs / jenkins

Development repository for the jenkins cookbook
https://supermarket.chef.io/cookbooks/jenkins
Apache License 2.0
425 stars 635 forks source link

Error executing action `create` on resource 'jenkins_jnlp_slave[builder]' Jenkins::Helper::JenkinsNotReady #545

Open lmilbaum opened 7 years ago

lmilbaum commented 7 years ago

Cookbook version

4.1.2

Chef-client version

chef-client version: 12.16.42

Platform Details

Ubuntu 14.04 on EC2

Scenario:

Setting up a Jenkins node on a different instance than the Jenkins master. So, localhost for master is not correct.

Steps to Reproduce:

My node recipe: recipes/node.rb

jenkins_jnlp_slave 'builder' do description 'A generic slavee builder' remote_fs '/home/jenkins' labels ['builder'] end

Expected Result:

Jenkins node/slave configured to work with Jenkins master

Actual Result:

================================================================================
Error executing action `create` on resource 'jenkins_jnlp_slave[builder]'
================================================================================

Jenkins::Helper::JenkinsNotReady
--------------------------------
The Jenkins master at `http://localhost:8080' did not become ready within 60
seconds. On large Jenkins instances, you may need to increase the timeout to
240 seconds. Alternatively, Jenkins may have failed to start.
Jenkins can fail to start if:

  - a configuration file is invalid
  - a plugin is only partially installed
  - a plugin's dependencies are not installed

If this problem persists, check your Jenkins log files.

Cookbook Trace:
---------------
/var/chef/cache/cookbooks/jenkins/libraries/_helper.rb:425:in `rescue in wait_until_ready!'
/var/chef/cache/cookbooks/jenkins/libraries/_helper.rb:405:in `wait_until_ready!'
/var/chef/cache/cookbooks/jenkins/libraries/_helper.rb:61:in `executor'
/var/chef/cache/cookbooks/jenkins/libraries/slave.rb:325:in `current_slave'
/var/chef/cache/cookbooks/jenkins/libraries/slave.rb:126:in `load_current_resource'
/var/chef/cache/cookbooks/jenkins/libraries/slave_jnlp.rb:50:in `load_current_resource'

Resource Declaration:
---------------------
# In /var/chef/cache/cookbooks/lmb-jenkins/recipes/node.rb

  5: jenkins_jnlp_slave 'builder' do
  6:   description 'A generic slavee builder'
  7:   remote_fs   '/home/jenkins'
  8:   labels      ['builder']
  9: end

Compiled Resource:
------------------
# Declared in /var/chef/cache/cookbooks/lmb-jenkins/recipes/node.rb:5:in `from_file'

jenkins_jnlp_slave("builder") do
  action [:create]
  retries 0
  retry_delay 2
  default_guard_interpreter :default
  declared_type :jenkins_jnlp_slave
  cookbook_name "lmb-jenkins"
  recipe_name "node"
  description "A generic slavee builder"
  remote_fs "/home/jenkins"
  labels ["builder"]
end

Platform:
---------
x86_64-linux

Running handlers: [2016-12-07T21:49:43+00:00] ERROR: Running exception handlers Running handlers complete [2016-12-07T21:49:43+00:00] ERROR: Exception handlers complete Chef Client failed. 4 resources updated in 01 minutes 13 seconds [2016-12-07T21:49:44+00:00] FATAL: Stacktrace dumped to /var/chef/cache/chef-stacktrace.out [2016-12-07T21:49:44+00:00] FATAL: Please provide the contents of the stacktrace.out file if you file a bug report [2016-12-07T21:49:44+00:00] ERROR: undefined method `failed' for nil:NilClass Did you mean? fail [2016-12-07T21:49:44+00:00] FATAL: Chef::Exceptions::ChildConvergeError: Chef run process exited unsuccessfully (exit code 1)

chazzly commented 7 years ago

+1 Exact same problem. I was assuming that node['jenkins']['master']['host'] needed to be set, but that didn't help.

What am I doing wrong?