Skip to content

Instantly share code, notes, and snippets.

@kingpong
Created June 12, 2016 16:21
Show Gist options
  • Save kingpong/9915265fb535df7fdded29b432893605 to your computer and use it in GitHub Desktop.
Save kingpong/9915265fb535df7fdded29b432893605 to your computer and use it in GitHub Desktop.
Consul cookbook freebsd test-kitchen failure
-----> Starting Kitchen (v1.7.3)
-----> Creating <default-freebsd-102>...
Bringing machine 'default' up with 'virtualbox' provider...
==> default: Importing base box 'bento/freebsd-10.2'...
==> default: Matching MAC address for NAT networking...
==> default: Checking if box 'bento/freebsd-10.2' is up to date...
==> default: Setting the name of the VM: kitchen-consul-cookbook-default-freebsd-102_default_1465748173233_22475
==> default: Clearing any previously set network interfaces...
==> default: Preparing network interfaces based on configuration...
default: Adapter 1: nat
==> default: Forwarding ports...
default: 22 (guest) => 2222 (host) (adapter 1)
==> default: Booting VM...
==> default: Waiting for machine to boot. This may take a few minutes...
default: SSH address: 127.0.0.1:2222
default: SSH username: vagrant
default: SSH auth method: private key
default:
default: Vagrant insecure key detected. Vagrant will automatically replace
default: this with a newly generated keypair for better security.
default:
default: Inserting generated public key within guest...
default: Removing insecure key from the guest if it's present...
default: Key inserted! Disconnecting and reconnecting using new SSH key...
==> default: Machine booted and ready!
==> default: Checking for guest additions in VM...
default: The guest additions on this VM do not match the installed version of
default: VirtualBox! In most cases this is fine, but in rare cases it can
default: prevent things such as shared folders from working properly. If you see
default: shared folder errors, please make sure the guest additions within the
default: virtual machine match the version of VirtualBox you have installed on
default: your host and reload your VM.
default:
default: Guest Additions Version: 4.3.34
default: VirtualBox Version: 5.0
==> default: Setting hostname...
==> default: Machine not provisioned because `--no-provision` is specified.
[SSH] Established
Vagrant instance <default-freebsd-102> created.
Finished creating <default-freebsd-102> (0m48.69s).
-----> Converging <default-freebsd-102>...
Preparing files for transfer
Preparing dna.json
Resolving cookbook dependencies with Berkshelf 4.3.3...
Removing non-cookbook files before transfer
Preparing validation.pem
Preparing client.rb
-----> Installing Chef Omnibus (install only if missing)
Downloading https://www.chef.io/chef/install.sh to file /tmp/install.sh
Trying curl...
Download complete.
freebsd 10 x86_64
Getting information for chef stable for freebsd...
downloading https://omnitruck-direct.chef.io/stable/chef/metadata?v=&p=freebsd&pv=10&m=x86_64
to file /tmp/install.sh.869/metadata.txt
trying curl...
sha1 6150b50d9700064e285d0af6dcf719980fdc64e4
sha256 74bad9a9179d689b0ae6c2c883dbf3df12893768c2a9e06a3e986771dd171531
url https://packages.chef.io/stable/freebsd/10/chef-12.11.18_1.amd64.sh
version 12.11.18
downloaded metadata file looks valid...
downloading https://packages.chef.io/stable/freebsd/10/chef-12.11.18_1.amd64.sh
to file /tmp/install.sh.869/chef-12.11.18_1.amd64.sh
trying curl...
Comparing checksum with shasum...
WARNING WARNING WARNING WARNING WARNING WARNING WARNING WARNING WARNING
You are installing an omnibus package without a version pin. If you are installing
on production servers via an automated process this is DANGEROUS and you will
be upgraded without warning on new releases, even to new major releases.
Letting the version float is only appropriate in desktop, test, development or
CI/CD environments.
WARNING WARNING WARNING WARNING WARNING WARNING WARNING WARNING WARNING
Installing chef
installing with sh...
Verifying archive integrity... All good.
Uncompressing The full stack of chef.................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................
Thank you for installing Chef!
Transferring files to <default-freebsd-102>
Starting Chef Client, version 12.11.18
Creating a new client identity for default-freebsd-102 using the validator key.
resolving cookbooks for run list: ["freebsd::default", "consul_spec::default"]
Synchronizing Cookbooks:
- consul (2.1.3)
- consul_spec (0.0.0)
- build-essential (6.0.0)
- nssm (1.2.1)
- freebsd (0.6.0)
- chef-sugar (3.3.0)
- golang (1.7.0)
- firewall (2.5.2)
- rubyzip (1.3.1)
- poise-service (1.3.1)
- poise (2.7.0)
- seven_zip (2.0.1)
- yum-epel (0.7.0)
- mingw (1.1.0)
- compat_resource (12.10.5)
- yum (3.11.0)
- windows (1.43.0)
- chef_handler (1.4.0)
Installing Cookbook Gems:
Compiling Cookbooks...
Recipe: chef-sugar::default
* chef_gem[chef-sugar] action install
- install version 3.3.0 of package chef-sugar
Converging 10 resources
* chef_gem[chef-sugar] action install (up to date)
Recipe: consul::default
* group[consul] action create
- create group consul
* user[consul] action create
- create user consul
* consul_config[consul] action create
* directory[/etc/consul] action create
- create new directory /etc/consul
- change mode from '' to '0755'
- change owner from '' to 'root'
- change group from '' to 'consul'
* directory[/etc/consul/conf.d] action create
- create new directory /etc/consul/conf.d
- change mode from '' to '0755'
- change owner from '' to 'root'
- change group from '' to 'consul'
* file[/etc/consul/consul.json] action create
- create new file /etc/consul/consul.json
- update content in file /etc/consul/consul.json from none to 8f2d12
--- /etc/consul/consul.json 2016-06-12 16:17:28.381706971 +0000
+++ /etc/consul/.chef-consul.json20160612-992-eq79k8 2016-06-12 16:17:28.381706971 +0000
@@ -1 +1,19 @@
+{
+ "bootstrap": true,
+ "client_addr": "0.0.0.0",
+ "data_dir": "/var/lib/consul",
+ "datacenter": "FortMeade",
+ "encrypt": "CGXC2NsXW4AvuB4h5ODYzQ==",
+ "ports": {
+ "dns": 8600,
+ "http": 8500,
+ "rpc": 8400,
+ "serf_lan": 8301,
+ "serf_wan": 8302,
+ "server": 8300
+ },
+ "server": true,
+ "verify_incoming": false,
+ "verify_outgoing": false
+}
- change mode from '' to '0640'
- change owner from '' to 'root'
- change group from '' to 'consul'
* consul_installation[0.6.4] action create
* directory[/opt/consul/0.6.4] action create
- create new directory /opt/consul/0.6.4
* zipfile[consul_0.6.4_freebsd_amd64.zip] action unzip
Recipe: rubyzip::default
* chef_gem[rubyzip] action install
- install version 1.2.0 of package rubyzip
* remote_file[/tmp/kitchen/cache/consul_0.6.4_freebsd_amd64.zip] action create_if_missing
- create new file /tmp/kitchen/cache/consul_0.6.4_freebsd_amd64.zip
- update content in file /tmp/kitchen/cache/consul_0.6.4_freebsd_amd64.zip from none to fe0b04
(new content is binary, diff output suppressed)
* chef_gem[rubyzip] action install (up to date)
* remote_file[/tmp/kitchen/cache/consul_0.6.4_freebsd_amd64.zip] action nothing (skipped due to action :nothing)
Recipe: consul::default
* consul_service[consul] action enable
* directory[/var/lib/consul] action create
- create new directory /var/lib/consul
- change mode from '' to '0750'
- change owner from '' to 'consul'
- change group from '' to 'consul'
================================================================================
Error executing action `enable` on resource 'consul_service[consul]'
================================================================================
ArgumentError
-------------
comparison of Fixnum with nil failed
Cookbook Trace:
---------------
/tmp/kitchen/cache/cookbooks/consul/libraries/consul_service.rb:56:in `each'
/tmp/kitchen/cache/cookbooks/consul/libraries/consul_service.rb:56:in `max'
/tmp/kitchen/cache/cookbooks/consul/libraries/consul_service.rb:56:in `default_environment'
/tmp/kitchen/cache/cookbooks/consul/libraries/consul_service.rb:35:in `block in <class:ConsulService>'
/tmp/kitchen/cache/cookbooks/poise/files/halite_gem/poise/helpers/lazy_default.rb:57:in `set_or_return'
/tmp/kitchen/cache/cookbooks/poise/files/halite_gem/poise/helpers/win32_user.rb:60:in `set_or_return'
/tmp/kitchen/cache/cookbooks/poise/files/halite_gem/poise/helpers/lwrp_polyfill.rb:114:in `block in attribute'
/tmp/kitchen/cache/cookbooks/consul/libraries/consul_service.rb:87:in `service_options'
/tmp/kitchen/cache/cookbooks/poise-service/files/halite_gem/poise_service/service_mixin.rb:174:in `block in service_resource'
/tmp/kitchen/cache/cookbooks/poise-service/files/halite_gem/poise_service/service_mixin.rb:168:in `tap'
/tmp/kitchen/cache/cookbooks/poise-service/files/halite_gem/poise_service/service_mixin.rb:168:in `service_resource'
/tmp/kitchen/cache/cookbooks/poise-service/files/halite_gem/poise_service/service_mixin.rb:153:in `notify_if_service'
/tmp/kitchen/cache/cookbooks/poise-service/files/halite_gem/poise_service/service_mixin.rb:88:in `action_enable'
/tmp/kitchen/cache/cookbooks/consul/libraries/consul_service.rb:80:in `action_enable'
/tmp/kitchen/cache/cookbooks/compat_resource/files/lib/chef_compat/monkeypatches/chef/runner.rb:41:in `run_action'
Resource Declaration:
---------------------
# In /tmp/kitchen/cache/cookbooks/consul/recipes/default.rb
61: consul_service service_name do |r|
62: version node['consul']['version']
63: config_file config.path
64: program install.consul_program
65:
66: unless windows?
67: user node['consul']['service_user']
68: group node['consul']['service_group']
69: end
70: if node['consul']['service']
Compiled Resource:
------------------
# Declared in /tmp/kitchen/cache/cookbooks/consul/recipes/default.rb:61:in `from_file'
consul_service("consul") do
action [:enable]
updated true
updated_by_last_action true
retries 0
retry_delay 2
default_guard_interpreter :default
declared_type :consul_service
cookbook_name "consul"
recipe_name "default"
config_file "/etc/consul/consul.json"
program "/opt/consul/0.6.4/consul"
user "consul"
group "consul"
config_dir "/etc/consul/conf.d"
nssm_params {"AppDirectory"=>"/var/lib/consul", "AppStdout"=>"/etc/consul/stdout.log", "AppStderr"=>"/etc/consul/error.log", "AppRotateFiles"=>1, "AppRotateOnline"=>1, "AppRotateBytes"=>20000000}
data_dir "/var/lib/consul"
service_name "consul"
end
Platform:
---------
x86_64-freebsd10.2
* consul_service[consul] action reload
================================================================================
Error executing action `reload` on resource 'consul_service[consul]'
================================================================================
ArgumentError
-------------
comparison of Fixnum with nil failed
Cookbook Trace:
---------------
/tmp/kitchen/cache/cookbooks/consul/libraries/consul_service.rb:56:in `each'
/tmp/kitchen/cache/cookbooks/consul/libraries/consul_service.rb:56:in `max'
/tmp/kitchen/cache/cookbooks/consul/libraries/consul_service.rb:56:in `default_environment'
/tmp/kitchen/cache/cookbooks/consul/libraries/consul_service.rb:35:in `block in <class:ConsulService>'
/tmp/kitchen/cache/cookbooks/poise/files/halite_gem/poise/helpers/lazy_default.rb:57:in `set_or_return'
/tmp/kitchen/cache/cookbooks/poise/files/halite_gem/poise/helpers/win32_user.rb:60:in `set_or_return'
/tmp/kitchen/cache/cookbooks/poise/files/halite_gem/poise/helpers/lwrp_polyfill.rb:114:in `block in attribute'
/tmp/kitchen/cache/cookbooks/consul/libraries/consul_service.rb:87:in `service_options'
/tmp/kitchen/cache/cookbooks/poise-service/files/halite_gem/poise_service/service_mixin.rb:174:in `block in service_resource'
/tmp/kitchen/cache/cookbooks/poise-service/files/halite_gem/poise_service/service_mixin.rb:168:in `tap'
/tmp/kitchen/cache/cookbooks/poise-service/files/halite_gem/poise_service/service_mixin.rb:168:in `service_resource'
/tmp/kitchen/cache/cookbooks/poise-service/files/halite_gem/poise_service/service_mixin.rb:153:in `notify_if_service'
/tmp/kitchen/cache/cookbooks/poise-service/files/halite_gem/poise_service/service_mixin.rb:133:in `action_reload'
/tmp/kitchen/cache/cookbooks/compat_resource/files/lib/chef_compat/monkeypatches/chef/runner.rb:41:in `run_action'
Resource Declaration:
---------------------
# In /tmp/kitchen/cache/cookbooks/consul/recipes/default.rb
61: consul_service service_name do |r|
62: version node['consul']['version']
63: config_file config.path
64: program install.consul_program
65:
66: unless windows?
67: user node['consul']['service_user']
68: group node['consul']['service_group']
69: end
70: if node['consul']['service']
Compiled Resource:
------------------
# Declared in /tmp/kitchen/cache/cookbooks/consul/recipes/default.rb:61:in `from_file'
consul_service("consul") do
action [:enable]
updated true
retries 0
retry_delay 2
default_guard_interpreter :default
declared_type :consul_service
cookbook_name "consul"
recipe_name "default"
config_file "/etc/consul/consul.json"
program "/opt/consul/0.6.4/consul"
user "consul"
group "consul"
config_dir "/etc/consul/conf.d"
nssm_params {"AppDirectory"=>"/var/lib/consul", "AppStdout"=>"/etc/consul/stdout.log", "AppStderr"=>"/etc/consul/error.log", "AppRotateFiles"=>1, "AppRotateOnline"=>1, "AppRotateBytes"=>20000000}
data_dir "/var/lib/consul"
service_name "consul"
end
Platform:
---------
x86_64-freebsd10.2
Running handlers:
[2016-06-12T16:17:32+00:00] ERROR: Running exception handlers
Running handlers complete
[2016-06-12T16:17:32+00:00] ERROR: Exception handlers complete
Chef Client failed. 13 resources updated in 15 seconds
[2016-06-12T16:17:32+00:00] FATAL: Stacktrace dumped to /tmp/kitchen/cache/chef-stacktrace.out
[2016-06-12T16:17:32+00:00] FATAL: Please provide the contents of the stacktrace.out file if you file a bug report
[2016-06-12T16:17:32+00:00] ERROR: Chef::Exceptions::MultipleFailures
[2016-06-12T16:17:32+00:00] FATAL: Chef::Exceptions::ChildConvergeError: Chef run process exited unsuccessfully (exit code 1)
>>>>>> Converge failed on instance <default-freebsd-102>.
>>>>>> Please see .kitchen/logs/default-freebsd-102.log for more details
>>>>>> ------Exception-------
>>>>>> Class: Kitchen::ActionFailed
>>>>>> Message: SSH exited (1) for command: [sh -c '
sudo -E /opt/chef/bin/chef-client --local-mode --config /tmp/kitchen/client.rb --log_level auto --force-formatter --no-color --json-attributes /tmp/kitchen/dna.json --chef-zero-port 8889
']
>>>>>> ----------------------
zlib(finalizer): the stream was freed prematurely.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment