[chef] Re: Re: Error executing action `run` - jenkins_cli


Chronological Thread 
  • From: Daniel DeLeo < >
  • To:
  • Subject: [chef] Re: Re: Error executing action `run` - jenkins_cli
  • Date: Fri, 6 Sep 2013 11:56:15 -0700

Try running chef with `-l debug` for more verbose output about the error. There are some changes to the jenkins cookbook that will make errors like this more informative, there should be a new release pretty soon.

-- 
Daniel DeLeo

On Friday, September 6, 2013 at 11:49 AM, Michael Hayes wrote:

I thought maybe it's an issue with the `'hostname` which doesn't resolve, but I tried changing it to the ip address and it still doesn't work.


On Sep 6, 2013, at 12:15 PM, Michael Hayes < "> > wrote:

Not sure why I can't call this jenkins_cli command (it's literally from the sample code on github. Could it be authentication related?

In my cookbook: recipes/jenkins.rb

include_recipe "jenkins"

%w{ git github }.each do |plugin|
jenkins_cli "install-plugin #{plugin}"
jenkins_cli "safe-restart"
end

Chef Solo output:

* jenkins_execute[java -jar /home/jenkins/jenkins-cli.jar -s http://syncopated-soaring:8080 install-plugin git] action run
================================================================================
Error executing action `run` on resource 'jenkins_execute[java -jar /home/jenkins/jenkins-cli.jar -s http://syncopated-soaring:8080 install-plugin git]'
================================================================================


Chef::Exceptions::Exec
----------------------
java -jar /home/jenkins/jenkins-cli.jar -s http://syncopated-soaring:8080 install-plugin git returned 1, expected 0


Cookbook Trace:
---------------
/root/chef-solo/cookbooks-1/jenkins/providers/execute.rb:46:in `action_run'


Resource Declaration:
---------------------
# In /root/chef-solo/cookbooks-1/jenkins/providers/cli.rb

49: jenkins_execute command do
50: cwd home
51: block { |stdout| new_resource.block.call(stdout) } if new_resource.block
52: end
53: end



Compiled Resource:
------------------
# Declared in /root/chef-solo/cookbooks-1/jenkins/providers/cli.rb:49:in `action_run'

jenkins_execute("java -jar /home/jenkins/jenkins-cli.jar -s http://syncopated-soaring:8080 install-plugin git") do
action :run
retries 0
retry_delay 2
command "java -jar /home/jenkins/jenkins-cli.jar -s http://syncopated-soaring:8080 install-plugin git"
cookbook_name :rackbox
cwd "/home/jenkins"
end



[2013-09-06T16:12:03+00:00] ERROR: Running exception handlers
[2013-09-06T16:12:03+00:00] ERROR: Exception handlers complete
[2013-09-06T16:12:03+00:00] FATAL: Stacktrace dumped to /var/chef/cache/chef-stacktrace.out
Chef Client failed. 5 resources updated
[2013-09-06T16:12:03+00:00] FATAL: Chef::Exceptions::ChildConvergeError: Chef run process exited unsuccessfully (exit code 1)




Archive powered by MHonArc 2.6.16.

§