[chef] Re: Re: Java Cookbook problem


Chronological Thread 
  • From: Kenneth Barry < >
  • To:
  • Subject: [chef] Re: Re: Java Cookbook problem
  • Date: Wed, 19 Mar 2014 14:03:18 -0700

i wish i could say that i had that fixed already..... ;)


On Wed, Mar 19, 2014 at 12:39 PM, Daniel Condomitti < " target="_blank"> > wrote:
The error is in the output you pasted:

  * java_ark[jdk] action install[2014-03-19T12:19:35-07:00] FATAL: You must set the attribute node['java']['oracle']['accept_oracle_download_terms'] to true if you want to download directly from the oracle site!

You have to set that attribute on the node otherwise it won’t be able to download the JDK from Oracle. 

override the accept_oracle_download_terms in, e.g., roles/base.rb

default_attributes(
  :java => {
     :oracle => {
       "accept_oracle_download_terms" => true
     }
   }
)

http://community.opscode.com/cookbooks/java


On Wednesday, March 19, 2014 at 12:25 PM, Kenneth Barry wrote:

To begin with, I was trying to install oracle jdk7, using the java cookbook.
I'm a newb, when I rand into this problem, I moved onto another task I had, setup tomcat. Apparently the tomcat cookbook runs the java install as part of its processes.

Either the error is right infront of me, or its in a palce i am not aware of. 

The node only has the tomcase::default recipe applied. OS is centos 6.5

Error below:

~]# chef-client
Starting Chef Client, version 11.8.2
resolving cookbooks for run list: ["tomcat"]
Synchronizing Cookbooks:
  - openssl
  - java
  - tomcat
Compiling Cookbooks...
[2014-03-19T12:19:35-07:00] WARN: Using java::default instead is recommended.
Converging 13 resources
Recipe: java::set_java_home
  * ruby_block[set-env-java-home] action run
    - execute the ruby block set-env-java-home

  * directory[/etc/profile.d] action create (up to date)
  * file[/etc/profile.d/jdk.sh] action create (up to date)
Recipe: java::oracle
  * java_ark[jdk] action install[2014-03-19T12:19:35-07:00] FATAL: You must set the attribute node['java']['oracle']['accept_oracle_download_terms'] to true if you want to download directly from the oracle site!

================================================================================
Error executing action `install` on resource 'java_ark[jdk]'
================================================================================


SystemExit
----------
exit


Cookbook Trace:
---------------
/var/chef/cache/cookbooks/java/providers/ark.rb:81:in `download_direct_from_oracle'
/var/chef/cache/cookbooks/java/providers/ark.rb:115:in `block in class_from_file'


Resource Declaration:
---------------------
# In /var/chef/cache/cookbooks/java/recipes/oracle.rb

 49: java_ark "jdk" do
 50:   url tarball_url
 51:   default node['java']['set_default']
 52:   checksum tarball_checksum
 53:   app_home java_home
 54:   bin_cmds bin_cmds
 55:   alternatives_priority 1062
 56:   action :install
 57: end
 58:



Compiled Resource:
------------------
# Declared in /var/chef/cache/cookbooks/java/recipes/oracle.rb:49:in `from_file'

java_ark("jdk") do
  action [:install]
  supports {:report=>true, :exception=>true}
  retries 0
  retry_delay 2
  cookbook_name "java"
  recipe_name "oracle"
  default true
  checksum "764f96c4b078b80adaa5983e75470ff2"
  app_home "/usr/lib/jvm/java"
  bin_cmds ["appletviewer", "apt", "ControlPanel", "extcheck", "idlj", "jar", "jarsigner", "java", "javac", "javadoc", "javafxpackager", "javah", "javap", "javaws", "jcmd", "jconsole", "jcontrol", "jdb", "jhat", "jinfo", "jmap", "jps", "jrunscript", "jsadebugd", "jstack", "jstat", "jstatd", "jvisualvm", "keytool", "native2ascii", "orbd", "pack200", "policytool", "rmic", "rmid", "rmiregistry", "schemagen", "serialver", "servertool", "tnameserv", "unpack200", "wsgen", "wsimport", "xjc"]
  alternatives_priority 1062
end



[2014-03-19T12:19:35-07:00] ERROR: Running exception handlers
[2014-03-19T12:19:35-07:00] ERROR: Exception handlers complete
[2014-03-19T12:19:35-07:00] FATAL: Stacktrace dumped to /var/chef/cache/chef-stacktrace.out
Chef Client failed. 1 resources updated
[2014-03-19T12:19:35-07:00] ERROR: java_ark[jdk] (java::oracle line 49) had an error: SystemExit: exit
[2014-03-19T12:19:35-07:00] FATAL: Chef::Exceptions::ChildConvergeError: Chef run process exited unsuccessfully (exit code 1)
~]#






Archive powered by MHonArc 2.6.16.

§