I'm having difficulty getting this cookbook to install Java 8 from Oracle. It just stalls on this line:
==> default: ================================================================================
==> default: Error executing action `install` on resource 'java_ark[jdk]'
==> default: ================================================================================
==> default:
==> default:
==> default: Mixlib::ShellOut::CommandTimeout
==> default: --------------------------------
==> default: Command timed out after 600s:
==> default:
==> default: Command execeded allowed execution time, process terminated
==> default:
==> default: ---- Begin output of curl --create-dirs -L --retry 0 --retry-delay 2 --cookie "oraclelicense=accept-securebackup-cookie" http://download.oracle.com/otn-pub/java/jdk/8u20-b26/jdk-8u20-linux-x64.tar.gz -o /var/chef/cache/jdk-8u20-linux-x64.tar.gz ----
==> default:
==> default: STDOUT:
==> default:
==> default: STDERR: % Total % Received % Xferd Average Speed Time Time Time Current
==> default:
==> default: Dload Upload Total Spent Left Speed
==> default:
0 0 0 0 0 0 0 0 --:--:-- 0:00:05 --:--:-- 0
==> default:
0 0 0 0 0 0 0 0 --:--:-- 0:00:11 --:--:-- 0
==> default:
3 153M 3 5169k 0 0 24063 0 1:51:25 0:03:39 1:47:46 17572
7 153M 7 10.8M 0 0 26621 0 1:40:43 0:07:05 1:33:37 33174
10 153M 10 16.4M 0 0 27238 0 1:38:26 0:10:33 1:27:53 15027
10 153M 10 16.8M 0 0 27222 0 1:38:29 0:10:49 1:27:40 28960
==> default:
==> default: ---- End output of curl --create-dirs -L --retry 0 --retry-delay 2 --cookie "oraclelicense=accept-securebackup-cookie" http://download.oracle.com/otn-pub/java/jdk/8u20-b26/jdk-8u20-linux-x64.tar.gz -o /var/chef/cache/jdk-8u20-linux-x64.tar.gz ----
==> default: Ran curl --create-dirs -L --retry 0 --retry-delay 2 --cookie "oraclelicense=accept-securebackup-cookie" http://download.oracle.com/otn-pub/java/jdk/8u20-b26/jdk-8u20-linux-x64.tar.gz -o /var/chef/cache/jdk-8u20-linux-x64.tar.gz returned
==> default:
==> default: Cookbook Trace:
==> default: ---------------
==> default: /tmp/vagrant-chef-3/chef-solo-1/cookbooks/java/providers/ark.rb:81:in `block in download_direct_from_oracle'
==> default: /tmp/vagrant-chef-3/chef-solo-1/cookbooks/java/providers/ark.rb:78:in `download_direct_from_oracle'
==> default: /tmp/vagrant-chef-3/chef-solo-1/cookbooks/java/providers/ark.rb:124:in `block in class_from_file'
==> default:
==> default: Resource Declaration:
==> default: ---------------------
==> default: # In /tmp/vagrant-chef-3/chef-solo-1/cookbooks/java/recipes/oracle.rb
==> default:
==> default: 53: java_ark "jdk" do
==> default: 54: url tarball_url
==> default: 55: default node['java']['set_default']
==> default: 56: checksum tarball_checksum
==> default: 57: app_home java_home
==> default: 58: bin_cmds bin_cmds
==> default: 59: alternatives_priority node['java']['alternatives_priority']
==> default: 60: retries node['java']['ark_retries']
==> default: 61: retry_delay node['java']['ark_retry_delay']
==> default: 62: action :install
==> default: 63: end
==> default: 64:
==> default:
==> default: Compiled Resource:
==> default: ------------------
==> default: # Declared in /tmp/vagrant-chef-3/chef-solo-1/cookbooks/java/recipes/oracle.rb:53:in `from_file'
==> default:
==> default: java_ark("jdk") do
==> default: action [:install]
==> default: supports {:report=>true, :exception=>true}
==> default: retries 0
==> default: retry_delay 2
==> default: guard_interpreter :default
==> default: cookbook_name :java
==> default: recipe_name "oracle"
==> default: url "http://download.oracle.com/otn-pub/java/jdk/8u20-b26/jdk-8u20-linux-x64.tar.gz"
==> default: default true
==> default: checksum "ec7f89dc3697b402e2c851d0488f6299"
==> default: app_home "/usr/lib/jvm/java-8-oracle-amd64"
==> default: bin_cmds ["appletviewer", "apt", "ControlPanel", "extcheck", "idlj", "jar", "jarsigner", "java", "javac", "javadoc", "javafxpackager", "javah", "javap", "javaws", "jcmd", "jconsole", "jcontrol", "jdb", "jdeps", "jhat", "jinfo", "jjs", "jmap", "jmc", "jps", "jrunscript", "jsadebugd", "jstack", "jstat", "jstatd", "jvisualvm", "keytool", "native2ascii", "orbd", "pack200", "policytool", "rmic", "rmid", "rmiregistry", "schemagen", "serialver", "servertool", "tnameserv", "unpack200", "wsgen", "wsimport", "xjc"]
==> default: alternatives_priority 1062
==> default: owner "root"
==> default: end
==> default:
==> default: [2014-09-16T21:02:44+00:00] INFO: Running queued delayed notifications before re-raising exception
==> default: [2014-09-16T21:02:44+00:00] ERROR: Running exception handlers
==> default: [2014-09-16T21:02:44+00:00] ERROR: Exception handlers complete
==> default: [2014-09-16T21:02:44+00:00] FATAL: Stacktrace dumped to /var/chef/cache/chef-stacktrace.out
==> default: [2014-09-16T21:02:44+00:00] ERROR: java_ark[jdk] (java::oracle line 53) had an error: Mixlib::ShellOut::CommandTimeout: Command timed out after 600s:
==> default: Command execeded allowed execution time, process terminated
==> default: ---- Begin output of curl --create-dirs -L --retry 0 --retry-delay 2 --cookie "oraclelicense=accept-securebackup-cookie" http://download.oracle.com/otn-pub/java/jdk/8u20-b26/jdk-8u20-linux-x64.tar.gz -o /var/chef/cache/jdk-8u20-linux-x64.tar.gz ----
==> default: STDOUT:
==> default: STDERR: % Total % Received % Xferd Average Speed Time Time Time Current
==> default: Dload Upload Total Spent Left Speed
0 0 0 0 0 0 0 0 --:--:-- 0:00:05 --:--:-- 0
0 0 0 0 0 0 0 0 --:--:-- 0:00:11 --:--:-- 0
2 153M 2 4668k 0 0 24041 0 1:51:31 0:03:16 1:48:15 27688
6 153M 6 10.1M 0 0 26386 0 1:41:36 0:06:43 1:34:53 18702
10 153M 10 15.9M 0 0 27283 0 1:38:16 0:10:11 1:28:05 26133
10 153M 10 16.8M 0 0 27222 0 1:38:29 0:10:49 1:27:40 2896036330
==> default: ---- End output of curl --create-dirs -L --retry 0 --retry-delay 2 --cookie "oraclelicense=accept-securebackup-cookie" http://download.oracle.com/otn-pub/java/jdk/8u20-b26/jdk-8u20-linux-x64.tar.gz -o /var/chef/cache/jdk-8u20-linux-x64.tar.gz ----
==> default: Ran curl --create-dirs -L --retry 0 --retry-delay 2 --cookie "oraclelicense=accept-securebackup-cookie" http://download.oracle.com/otn-pub/java/jdk/8u20-b26/jdk-8u20-linux-x64.tar.gz -o /var/chef/cache/jdk-8u20-linux-x64.tar.gz returned
==> default: [2014-09-16T21:02:44+00:00] FATAL: Chef::Exceptions::ChildConvergeError: Chef run process exited unsuccessfully (exit code 1)
Chef never successfully completed! Any errors should be visible in the
output above. Please fix your recipes so that they properly complete.
I'm guessing that this means that chef couldn't download java8 from Oracle...perhaps related to the process?
For reference, I'm using the latest versions of: Mac OS X (host), Vagrant, VirtualBox and Ubuntu (in VM).
For reference, I have a very simple cookbook that I'm building up. Here's the full cookbook:
VAGRANTFILE_API_VERSION = "2"
Vagrant.configure(VAGRANTFILE_API_VERSION) do |config|
config.vm.box = "ubuntu/trusty64"
config.berkshelf.enabled = true
config.berkshelf.berksfile_path = "cookbooks/foobar-appserver/Berksfile"
config.omnibus.chef_version = :latest
config.vm.provision "chef_solo" do |chef|
chef.add_recipe "foobar-appserver"
end
end
default["java"]["install_flavor"] = "oracle"
default["java"]["jdk_version"] = "8"
default["java"]["oracle"]["accept_oracle_download_terms"] = true
source "https://supermarket.getchef.com"
metadata
[Default generated by 'chef generate...']
name 'foobar-appserver'
maintainer 'The Authors'
maintainer_email '[email protected]'
license 'all_rights'
description 'Installs/Configures foobar-appserver'
long_description 'Installs/Configures foobar-appserver'
version '0.1.0'
depends "apt"
depends "java"
include_recipe 'apt'
include_recipe 'java'