J'ai l'erreur décrite ici:chef :: Exceptions :: ChecksumMismatch lors de l'installation nginx-1.4.4 de la source
Chef::Exceptions::ChecksumMismatch when installing nginx-1.7.8 from source
Toutefois, ce correctif ne fonctionne pas pour moi.
Suite aux suggestions sur cette page, j'ai créé un shasum:
shasum -a 256 nginx-1.4.4.tar
ed744d916a19e426fd6885e14036d64156f4b6f6aca1d22a1b9307de8d46e8d3 nginx-1.4.4.tar
puis j'ai ouvert ce fichier:
vi /opt/chef/cookbooks/nginx/recipes/source.rb
et je trouve ce bloc:
remote_file nginx_url do
source nginx_url
checksum node['nginx']['source']['checksum']
path src_filepath
backup false
end
qui J'ai changé pour ceci:
remote_file nginx_url do
source nginx_url
checksum 'ed744d916a19e426fd6885e14036d64156f4b6f6aca1d22a1b9307de8d46e8d3'
path src_filepath
backup false
end
, mais je continue à obtenir cette erreur:
Recipe: nginx::source
* yum_package[pcre-devel] action install (up to date)
* yum_package[openssl-devel] action install (up to date)
* remote_file[http://nginx.org/download/nginx-1.4.4.tar.gz] action create
================================================================================
Error executing action `create` on resource 'remote_file[http://nginx.org/download/nginx-1.4.4.tar.gz]'
================================================================================
Chef::Exceptions::ChecksumMismatch
----------------------------------
Checksum on resource (ed744d) does not match checksum on content (7c989a)
Resource Declaration:
---------------------
# In /opt/chef/cookbooks/nginx/recipes/source.rb
58: remote_file nginx_url do
59: source nginx_url
60: checksum 'ed744d916a19e426fd6885e14036d64156f4b6f6aca1d22a1b9307de8d46e8d3'
61: path src_filepath
62: backup false
63: end
64:
Compiled Resource:
------------------
# Declared in /opt/chef/cookbooks/nginx/recipes/source.rb:58:in `from_file'
remote_file("http://nginx.org/download/nginx-1.4.4.tar.gz") do
provider Chef::Provider::RemoteFile
action [:create]
retries 0
retry_delay 2
default_guard_interpreter :default
source ["http://nginx.org/download/nginx-1.4.4.tar.gz"]
use_etag true
use_last_modified true
declared_type :remote_file
cookbook_name :nginx
recipe_name "source"
checksum "ed744d916a19e426fd6885e14036d64156f4b6f6aca1d22a1b9307de8d46e8d3"
path "/var/chef/cache/nginx-1.4.4.tar.gz"
atomic_update true
end
Running handlers:
[2016-02-16T15:40:44+00:00] ERROR: Running exception handlers
Running handlers complete
[2016-02-16T15:40:44+00:00] ERROR: Exception handlers complete
Chef Client failed. 5 resources updated in 19 seconds
[2016-02-16T15:40:44+00:00] FATAL: Stacktrace dumped to /var/chef/cache/chef-stacktrace.out
[2016-02-16T15:40:44+00:00] FATAL: Please provide the contents of the stacktrace.out file if you file a bug report
[2016-02-16T15:40:44+00:00] ERROR: remote_file[http://nginx.org/download/nginx-1.4.4.tar.gz] (nginx::source line 58) had an error: Chef::Exceptions::ChecksumMismatch: Checksum on resource (ed744d) does not match checksum on content (7c989a)
[2016-02-16T15:40:44+00:00] FATAL: Chef::Exceptions::ChildConvergeError: Chef run process exited unsuccessfully (exit code 1)
Quelqu'un at-il des conseils?
Je cours cela à l'intérieur de vagabond, sur ma machine locale (un Mac).
Bizarre .. êtes-vous sûr que votre exécutable 'shasum' accepte le paramètre' -a' comme vous l'attendez? Je reçois le '7c989a58e5408c9593da0bebcd0e4ffc3d892d1316ba5042ddb0be5b0b4102b9' comme résultat de' curl http://nginx.org/download/nginx-1.4.4.tar.gz | shasum -a 256 -'. – StephenKing
'remote_file [http://nginx.org/download/nginx-1.4.4.tar.gz] action create' On dirait que vous téléchargez un' .tar.gz' et pas le '.tar' que vous avez coché. – Tensibai
@Tensibai - bon point – lorm