I am having the error described here:
Chef::Exceptions::ChecksumMismatch when installing nginx-1.7.8 from source
However, that fix does not work for me.
Following the suggestions on that page, I created a shasum:
shasum -a 256 nginx-1.4.4.tar
ed744d916a19e426fd6885e14036d64156f4b6f6aca1d22a1b9307de8d46e8d3 nginx-1.4.4.tar
then I opened this file:
vi /opt/chef/cookbooks/nginx/recipes/source.rb
and I found this block:
remote_file nginx_url do
source nginx_url
checksum node['nginx']['source']['checksum']
path src_filepath
backup false
end
which I changed to this:
remote_file nginx_url do
source nginx_url
checksum 'ed744d916a19e426fd6885e14036d64156f4b6f6aca1d22a1b9307de8d46e8d3'
path src_filepath
backup false
end
but I continue to get this error:
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)
Does anyone have any advice?
I am running this inside of vagrant, on my local machine (a Mac).
It sounds like this was resolved in comments above, but for the record you need to make sure the checksum exactly the file being downloaded. This can be confusing in cases with gzip compression.
Run sha256sum command against the file and use the output as checksum. Seems like you're using md5 or sha1 hash algorithm as checksum
Related
I am trying to configure remote github repo as the salt server root but it can't make the authentication successful with the pub/priv keypair. I have given the location of the keys in the /etc/salt/master file as well.
Below are the logs I am getting:
2018-11-05 01:48:32,197 [salt.utils.gitfs :1574][ERROR ][21391] Error occurred fetching gitfs remote 'git#[github-endpoint].git': failed to start SSH session: Unable to exchange encryption keys
Traceback (most recent call last):
File "/usr/lib/python2.7/site-packages/salt/utils/gitfs.py", line 1552, in _fetch
fetch_results = origin.fetch(**fetch_kwargs)
File "/usr/lib64/python2.7/site-packages/pygit2/remote.py", line 405, in fetch
File "/usr/lib64/python2.7/site-packages/pygit2/errors.py", line 64, in check_error
GitError: failed to start SSH session: Unable to exchange encryption keys
I have checked the keypair and connection to the github endpoint.
I am able to sync the repo manually in the server.
I found with the same issue and I finally solved with the following steps:
I create a new ssh key: ssh-keygen -f gitfs_ssh -C 'test#example.com'
Then, I read that an empty line at the end of the private key could be fatal for libssh2, so I removed the empty lines at the bottom of the file (added by ssh-keygen at creation time) and then the new key began to work.
More info in this link
I've downloaded the PHP formula by following the instructions here: https://docs.saltstack.com/en/latest/topics/development/conventions/formulas.html
I've changed apache to php. In my salt config file (which I assume is /etc/salt/master), I've set file_roots like so:
file_roots:
base:
- /srv/salt
- /srv/formulas/php-formula
I don't know how I'm supposed to run it now. I've successfully run a salt state file by discovering that the documentation is incomplete, so I'd missed a step I wasn't aware of.
If I try to run the formula the same way I've been running the state, I just get errors.
salt '*' state.apply php-formula
salt-minion:
Data failed to compile:
----------
No matching sls found for 'php-formula' in env 'base'
ERROR: Minions returned with non-zero exit code
I've also tried: sudo salt '*' state.highstate, and it also has errors:
salt-minion:
----------
ID: states
Function: no.None
Result: False
Comment: No Top file or master_tops data matches found.
Changes:
Summary for salt-minion
------------
Succeeded: 0
Failed: 1
------------
Total states run: 1
Total run time: 0.000 ms
ERROR: Minions returned with non-zero exit code
You have to add a top.sls file to /srv/salt/, not just in /srv/pillar/. If you have a file called /srv/salt/php.sls, you have remove it, otherwise it will interfere with /srv/pillar/php.sls.
Contents of /srv/salt/top.sls:
base:
'*':
- php
This is kind of bizarre, because my previous test (which wasn't a formula) used /srv/salt/php.sls and /srv/pillar/top.sls. Now I'm using /srv/pillar/php.sls and /srv/salt/top.sls.
I have a simple Vagrantfile:
Vagrant.configure(2) do |config|
config.omnibus.chef_version = '12.9.38'
config.vm.network "private_network", type: "dhcp"
config.vm.boot_timeout = 60
config.vm.define "node0" do |node0|
node0.vm.box = "baremettle/ubuntu-14.04"
node0.vm.hostname = "node0"
node0.vm.synced_folder "./", "/vagrant", type: "rsync"
node0.vm.provider :libvirt do |qemu|
qemu.driver = "kvm"
qemu.memory = 1024
end
end
end
And when I try to bring machine up I get the following:
The following SSH command responded with a non-zero exit status.
Vagrant assumes that this means the command failed!
sh install.sh -v 12.9.38 2>&1
Stdout from the command:
ubuntu 14.04 x86_64
Getting information for chef stable 12.9.38 for ubuntu...
downloading https://omnitruck-direct.chef.io/stable/chef/metadata?v=12.9.38&p=ubuntu&pv=14.04&m=x86_64
to file /tmp/install.sh.1550/metadata.txt
trying wget...
trying perl...
trying python...
Unable to retrieve a valid package!
Version: 12.9.38
Please file a Bug Report at https://github.com/chef/omnitruck/issues/new
Alternatively, feel free to open a Support Ticket at https://www.chef.io/support/tickets
More Chef support resources can be found at https://www.chef.io/support
Please include as many details about the problem as possible i.e., how to reproduce
the problem (if possible), type of the Operating System and its version, etc.,
and any other relevant details that might help us with troubleshooting.
Metadata URL: https://omnitruck-direct.chef.io/stable/chef/metadata?v=12.9.38&p=ubuntu&pv=14.04&m=x86_64
DEBUG OUTPUT FOLLOWS:
STDERR from wget:
--2016-06-13 15:54:03-- https://omnitruck-direct.chef.io/stable/chef/metadata?v=12.9.38&p=ubuntu&pv=14.04&m=x86_64
Resolving omnitruck-direct.chef.io (omnitruck-direct.chef.io)... failed: Name or service not known.
wget: unable to resolve host address ‘omnitruck-direct.chef.io’
STDERR from perl:
Can't locate LWP/Simple.pm in #INC (you may need to install the LWP::Simple module) (#INC contains: /etc/perl /usr/local/lib/perl/5.18.2 /usr/local/share/perl/5.18.2 /usr/lib/perl5 /usr/share/perl5 /usr/lib/perl/5.18 /usr/share/perl/5.18 /usr/local/lib/site_perl .) at -e line 1.
BEGIN failed--compilation aborted at -e line 1.
STDERR from python:
Traceback (most recent call last):
File "<string>", line 1, in <module>
File "/usr/lib/python2.7/urllib2.py", line 127, in urlopen
return _opener.open(url, data, timeout)
File "/usr/lib/python2.7/urllib2.py", line 404, in open
response = self._open(req, data)
File "/usr/lib/python2.7/urllib2.py", line 422, in _open
'_open', req)
File "/usr/lib/python2.7/urllib2.py", line 382, in _call_chain
result = func(*args)
File "/usr/lib/python2.7/urllib2.py", line 1222, in https_open
return self.do_open(httplib.HTTPSConnection, req)
File "/usr/lib/python2.7/urllib2.py", line 1184, in do_open
raise URLError(err)
urllib2.URLError: <urlopen error [Errno -2] Name or service not known>
Stderr from the command:
And after that machine is runnign but chef is not installed. And is I ssh into it and try to ping, for example, google.com, I will get:
vagrant#node0:~$ ping google.com
ping: unknown host google.com
But on host machine ping works as expected, without problems.
I'm using default libvirt network:
<network>
<name>default</name>
<uuid>bd07c4da-891b-4e37-b1d0-16fabb6581c2</uuid>
<forward mode='nat'>
<nat>
<port start='1024' end='65535'/>
</nat>
</forward>
<bridge name='virbr0' stp='on' delay='0'/>
<mac address='52:54:00:79:b9:3b'/>
<ip address='192.168.122.1' netmask='255.255.255.0'>
<dhcp>
<range start='192.168.122.2' end='192.168.122.254'/>
</dhcp>
</ip>
</network>
Vagrant version is 1.8.1
Virsh version is 1.2.2
Vagrant plugins installed:
vagrant-libvirt (0.0.33)
vagrant-omnibus (1.4.1)
UPDATE:
Adding to hosts(or guests) /etc/resolv.conf
nameserver 8.8.8.8
seems to solve the issue.
But I've never had that problem with virtualbox. Could it be that I missed something in libvirt or vagrant configuration?
Good afternoon,
I have installed the Generic enablers Cosmos, following the manual BigData Analysis - Installation and Administration Guide. When I have come to 'Step 7: applying Puppet' and executed the commands, in the file puppet.err has appeared the following errors:
Error: Could not prefetch yumrepo provider ' inifilé: Section 'openvz-utils' is already defined, cannot re-defines in/etc/yum.repos.d/openvz.repo
Description: There is a conflict with the titles (indicated in bold type) of the file /etc/yum.repos.d/cosmos-openvz.repo and /etc/yum.repos.d/openvz.repo .
cat /etc/yum.repos.d/cosmos-openvz.repo
[openvz-utils]
...
[openvz-kernel-rhel6]
...
cat /etc/yum.repos.d/openvz.repo
[openvz-utils]
...
[openvz-kernel-rhel6]
...
[openvz-kernel-rhel6-testing]
...
Solution: I have realized a change in the titles of the file /etc/yum.repos.d/openvz.repo, example: [openvz-utils_1]
Error: Could not prefetch database_grant provider 'mysql': Execution of '/usr/bin/mysql mysql -Be describe user' returned 1: ERROR 2002 (HY000): Can't connect to local MySQL server through socket '/var/lib/mysql/mysql.sock' (2)
Description: in the folder /var/lib/mysql/ was not found the file mysql.sock.
Solution: I have installed mysql-server.x86_64:
yum install mysql-server.x86_64
At the end of the installations, I restarted the service:
/etc/init.d/mysqld stop
/etc/init.d/mysqld start
Error: Could not update: Execution of '/usr/bin/yum -d 0 -e 0 -y list vzstats' returned 1: Error: Cannot retrieve repository metadata (repomd.xml) for repository: ambari. Please verify its path and try again
Description: This error appears in the machine of the Master node, this one is provoked by the configuration of the file [COSMOS_TMP_PATH]/puppet/modules/cosmos/manifests/hieradata/my_environment/common.yaml, indicated in 'Step 6: Puppet configuration'. Concretely, the URL that use the IP: 130.206.81.65
Solution: in the file [COSMOS_TMP_PATH]/puppet/modules/cosmos/manifests/hieradata /my_environment/common.yaml to change the line:
ambari::params::repo_url: 'http:// 130.206.81.65/cosmos/ambari/'
(without blank space)
for
ambari::params::repo_url: 'http:// public-repo-1.hortonworks.com/ambari/centos6/1.x/GA'
(without blank space)
Error: Could not update: Execution of '/usr/bin/yum -d 0 -e 0 -y list vzstats' returned 1: Error: Cannot retrieve repository metadata (repomd.xml) for repository: cosmos-libvirt. Please verify its path and try again
Description: it is the same problem as the previous error. The difficulty in this one is that I cannot modify the file [COSMOS_TMP_PATH]/puppet/modules/cosmos/manifests/hieradata /my_environment/common.yaml in the line:
cosmos::params::cosmos_repo_deps_url: 'http:// 130.206.81.65/cosmos/rpms/cosmos-deps'
(without blank space)
Because it is line is used in several files:
cat /etc/yum.repos.d/cosmos-libvirt.repo
[cosmos-libvirt]
name=Cosmos LibVirt with OpenVZ - v1.0.5 - NO PolKIT
baseurl=http:// 130.206.81.65/cosmos/rpms/cosmos-deps//libvirt
gpgcheck=0
priority=10
enabled=1
cat /etc/yum.repos.d/cosmos-openvz.repo
[openvz-utils]
name=OpenVZ utilities
baseurl=http:// 130.206.81.65/cosmos/rpms/cosmos-deps//OpenVZ/openvz-utils
enabled=1
gpgcheck=0
priority=1
[openvz-kernel-rhel6]
name=OpenVZ RHEL6-based kernel
baseurl=http:// 130.206.81.65/cosmos/rpms/cosmos-deps//OpenVZ/openvz-kernel- > rhel6
enabled=1
gpgcheck=0
priority=1
It does not also allow to modify the file previous, in the moment to execute the command (indicated in 'Step 7: applying Puppet'):
puppet apply --debug --verbose \
--modulepath [COSMOS_TMP_PATH]/puppet/modules/:[COSMOS_TMP_PATH]/puppet/modules_third_party/ \
--environment my_environment --hiera_config [COSMOS_TMP_PATH]/puppet/modules/cosmos/manifests/hiera.yaml \
--manifestdir [COSMOS_TMP_PATH]/puppet/modules/cosmos/manifests/ [COSMOS_TMP_PATH]/puppet/modules/cosmos/manifests/site.pp \
> puppet.out 2> puppet.err
It will erase the modified.
Solution: https://github.com/telefonicaid/fiware-cosmos-platform/issues/4
I need help with the error:
Error: /Stage[main]/Ambari::Server::Config/Augeas[ambari-config-repoinfo]: Could not evaluate: Saving failed, see debug
Might they to throw me a hand with these last error?
Thank you in advance.
PD: Forgive for if it is written badly
I'm trying to install cpXstack on my site http://tequierocali.org, But it fails every time I try to get it done.
I get the following errors, I wonder if anybody has figured this out:
Complete!
sed: can't read /var/spool/incron/root: No such file or directory
PID unreadable in: /usr/local/cpanel/3rdparty/mailman/data/master-qrunner.pid
[Errno 2] No such file or directory: '/usr/local/cpanel/3rdparty/mailman/data/master-qrunner.pid'
Is qrunner even running?
/etc/exim.pl.local.build syntax OK
PID unreadable in: /usr/local/cpanel/3rdparty/mailman/data/master-qrunner.pid
[Errno 2] No such file or directory: '/usr/local/cpanel/3rdparty/mailman/data/master-qrunner.pid'
Is qrunner even running?
/etc/exim.pl.local.build syntax OK
info [rebuildhttpdconf] 'local' datastore in use (/var/cpanel/conf/apache/local)
Built /usr/local/apache/conf/httpd.conf OK
Waiting for httpd to restart................finished.
httpd (/usr/local/apache/bin/httpd -k start -DSSL) running as root with PID 10333 (pidfile check method)
Apache successfully restarted.
[10366] [2013-02-07 06:36:31 +0200] [main] Current process '20664' stopped
[Thu Feb 7 06:36:32 2013] Starting /usr/local/cpanel/libexec/tailwatch/tailwatchd daemon
Log is at /usr/local/cpanel/logs/tailwatchd_log
cat: /opt/pifpm/pifpm.config: No such file or directory
./cpxstack.sh: line 39: /etc/init.d/php-fpm-5.3.21: No such file or directory
error reading information on service php-fpm-5.3.21: No such file or directory
./cpxstack.sh: line 39: /etc/init.d/php-fpm-5.4.11: No such file or directory
error reading information on service php-fpm-5.4.11: No such file or directory
Installation failed: contact cpxstack#sysally.net
Thanks,
Caro
You should check the initial stages of the error to understand what is really happening .
I am one of the programmers of this plugin ;I can assist you better if you provide the exact reason why the install failed .