-
Notifications
You must be signed in to change notification settings - Fork 36
Open
Description
Issue
Example 9-2 has a url to download private chef: 'https://s3.amazonaws.com/opscode-private-chef/el/6/x86_64/private-chef-11.1.8-1.el6.x86_64.rpm'.
I get the following error output when I attempt to run kitchen converge:
Recipe: enterprise-chef::default
* remote_file[/tmp/kitchen/cache/private-chef-11.1.8-1.el6.x86_64.rpm] action create
================================================================================
Error executing action `create` on resource 'remote_file[/tmp/kitchen/cache/private-chef-11.1.8-1.el6.x86_64.rpm]'
================================================================================
Chef::Exceptions::ContentLengthMismatch
---------------------------------------
Response body length 620263087 does not match HTTP Content-Length header 939968311.
This error is most often caused by network issues (proxies, etc) outside of chef-client.
Resource Declaration:
---------------------
# In /tmp/kitchen/cookbooks/enterprise-chef/recipes/default.rb
12: remote_file package_local_path do
13: source package_url
14: end
15:
Compiled Resource:
------------------
# Declared in /tmp/kitchen/cookbooks/enterprise-chef/recipes/default.rb:12:in `from_file'
remote_file("/tmp/kitchen/cache/private-chef-11.1.8-1.el6.x86_64.rpm") do
provider Chef::Provider::RemoteFile
action [:create]
retries 0
retry_delay 2
default_guard_interpreter :default
source ["https://s3.amazonaws.com/opscode-private-chef/el/6/x86_64/private-chef-11.1.8-1.el6.x86_64.rpm"]
use_etag true
use_last_modified true
declared_type :remote_file
cookbook_name :"enterprise-chef"
recipe_name "default"
atomic_update true
path "/tmp/kitchen/cache/private-chef-11.1.8-1.el6.x86_64.rpm"
end
Platform:
---------
x86_64-linux
Running handlers:
[2016-05-08T15:20:25+00:00] ERROR: Running exception handlers
Running handlers complete
[2016-05-08T15:20:25+00:00] ERROR: Exception handlers complete
Chef Client failed. 0 resources updated in 59 seconds
[2016-05-08T15:20:25+00:00] FATAL: Stacktrace dumped to /tmp/kitchen/cache/chef-stacktrace.out
[2016-05-08T15:20:25+00:00] FATAL: Please provide the contents of the stacktrace.out file if you file a bug report
[2016-05-08T15:20:25+00:00] ERROR: remote_file[/tmp/kitchen/cache/private-chef-11.1.8-1.el6.x86_64.rpm] (enterprise-chef::default line 12) had an error: Chef::Exceptions::ContentLengthMismatch: Response body length 620263087 does not match HTTP Content-Length header 939968311.
This error is most often caused by network issues (proxies, etc) outside of chef-client.
[2016-05-08T15:20:25+00:00] FATAL: Chef::Exceptions::ChildConvergeError: Chef run process exited unsuccessfully (exit code 1)
>>>>>> Converge failed on instance <default-centos65>.
>>>>>> Please see .kitchen/logs/default-centos65.log for more details
>>>>>> ------Exception-------
>>>>>> Class: Kitchen::ActionFailed
>>>>>> Message: SSH exited (1) for command: [sh -c '
sudo -E /opt/chef/bin/chef-solo --config /tmp/kitchen/solo.rb --log_level auto --force-formatter --no-color --json-attributes /tmp/kitchen/dna.json
']
>>>>>> ----------------------
zlib(finalizer): the stream was freed prematurely.
Potential Solution
In order to get around this issue, I grabbed the url to the latest version of chef server (https://packages.chef.io/stable/el/6/chef-server-core-12.6.0-1.el6.x86_64.rpm) from the chef website.
I then used the following command after running kitchen login to verify the installation occurred successfully:
rpm -q chef-server-core
As I'm new to chef and it's infrastructure, I'm not certain this is the solution. Can you confirm this will work? I'm sure I'll find out as I continue to progress in the book!
Metadata
Metadata
Assignees
Labels
No labels