[chef] Re: Jenkins Community Cookbook throws Java error


Chronological Thread 
  • From: niristotle okram < >
  • To:
  • Subject: [chef] Re: Jenkins Community Cookbook throws Java error
  • Date: Thu, 11 Jun 2015 13:23:40 -0700

like its something related to the version of jenkins's war in use. An older version of war when used in the cookbook, dont have the issue. I will post this on github of the jenkins cookbook. 

On Thu, Jun 11, 2015 at 11:09 AM, niristotle okram < " target="_blank"> > wrote:
hi, 
Can someone help shed some lights on what is this java error for the custom resource in the community jenkins cookbook?

    ================================================================================
    Error executing action `create` on resource 'jenkins_private_key_credentials[xyz]'
    ================================================================================
    
    Mixlib::ShellOut::ShellCommandFailed
    ------------------------------------
    Expected process to exit with [0], but received '255'
    ---- Begin output of "java" -jar "/var/chef/cache/jenkins-cli.jar" -s http://localhost:8080 -i "/var/chef/cache/jenkins-key" groovy /tmp/groovy20150611-12633-1ntx19c ----
    STDOUT: 
    STDERR: java.io.EOFException
    at java.io.DataInputStream.readBoolean(DataInputStream.java:244)
    at hudson.cli.Connection.readBoolean(Connection.java:93)
    at hudson.cli.CLI.authenticate(CLI.java:573)
    at hudson.cli.CLI._main(CLI.java:484)
    at hudson.cli.CLI.main(CLI.java:390)
    ---- End output of "java" -jar "/var/chef/cache/jenkins-cli.jar" -s http://localhost:8080 -i "/var/chef/cache/jenkins-key" groovy /tmp/groovy20150611-12633-1ntx19c ----
    Ran "java" -jar "/var/chef/cache/jenkins-cli.jar" -s http://localhost:8080 -i "/var/chef/cache/jenkins-key" groovy /tmp/groovy20150611-12633-1ntx19c returned 255



So, this is the part of my recipe (where its failing) which uses the chef-community Jenkins cookbook. 

ruby_block 'set private key' do
block { node.run_state[:jenkins_private_key] = data_bag["jenkins_private_key"] }
end

if node[:jenkins][:master_config][:credentials]
node[:jenkins][:master_config][:credentials].each do |name, credential|
jenkins_private_key_credentials credential["name"] do
description credential["description"]
private_key data_bag["#{credential["databag_key_name"]}"]
if credential["id"]
id credential["id"]
end
end
end
end

















--
Regards
nirish okram



Archive powered by MHonArc 2.6.16.

§