Closed IuliiSe closed 7 years ago
@IuliiSe I pushed a commit to the dev
branch to update the git urls in the Berksfile to use https instead of git. Clone that down, do rm -rf config/chef/cookbooks
then make berks
and try the chef-prepare
and chef-cook
commands again.
@sethetter I've completed the suggested step. But, chef-cook
still return errors:
================================================================================
Recipe Compile Error in /root/chef-solo/local-mode-cache/cache/cookbooks/madison-server/recipes/default.rb
================================================================================
Net::HTTPFatalError
-------------------
500 "Internal Server Error"
Cookbook Trace:
---------------
/root/chef-solo/local-mode-cache/cache/cookbooks/lamp-server/recipes/configure-sites.rb:50:in `rescue in block in from_file'
/root/chef-solo/local-mode-cache/cache/cookbooks/lamp-server/recipes/configure-sites.rb:47:in `block in from_file'
/root/chef-solo/local-mode-cache/cache/cookbooks/lamp-server/recipes/configure-sites.rb:45:in `each'
/root/chef-solo/local-mode-cache/cache/cookbooks/lamp-server/recipes/configure-sites.rb:45:in `from_file'
/root/chef-solo/local-mode-cache/cache/cookbooks/lamp-server/recipes/default.rb:15:in `from_file'
/root/chef-solo/local-mode-cache/cache/cookbooks/madison-server/recipes/default.rb:8:in `from_file'
Relevant File Content:
----------------------
/root/chef-solo/local-mode-cache/cache/cookbooks/lamp-server/recipes/configure-sites.rb:
43: end
44:
45: sites.each do |site_name|
46: # Get the users' real data from the vault.
47: begin
48: Chef::EncryptedDataBagItem.load_secret
49: rescue
50>> full_site = Chef::DataBagItem.load('sites', site_name)
51: else
52: full_site = Chef::EncryptedDataBagItem.load('sites', site_name).to_hash
53: end
54:
55: # If the node is one this site belongs to, set it up on the box.
56: if full_site['servers'] and full_site['servers'].include? node.name
57:
58: # Apache setup.
59:
Platform:
---------
x86_64-linux-gnu
Running handlers:
[2016-11-15T16:43:23+00:00] ERROR: Running exception handlers
Running handlers complete
[2016-11-15T16:43:23+00:00] ERROR: Exception handlers complete
Chef Client failed. 5 resources updated in 35 seconds
[2016-11-15T16:43:23+00:00] FATAL: Stacktrace dumped to /root/chef-solo/local-mode-cache/cache/chef-stacktrace.out
[2016-11-15T16:43:23+00:00] FATAL: Please provide the contents of the stacktrace.out file if you file a bug report
[2016-11-15T16:43:23+00:00] ERROR: 500 "Internal Server Error"
[2016-11-15T16:43:23+00:00] FATAL: Chef::Exceptions::ChildConvergeError: Chef run process exited unsuccessfully (exit code 1)
ERROR: RuntimeError: chef-solo failed. See output above.
Makefile:107: recipe for target 'chef-cook' failed
make: *** [chef-cook] Error 100
@IuliiSe did you configure a site in config/chef/data_bags/sites/
? There is an example in there.
@sethetter yes, i did configure madison.json. Just double checked it. Changed url to IP instead of domain name. Still chef-cook
returns errors.
================================================================================
Error executing action `install` on resource 'apt_package[mariadb-server-10.0]'
================================================================================
Mixlib::ShellOut::ShellCommandFailed
------------------------------------
Expected process to exit with [0], but received '100'
---- Begin output of apt-get -q -y install mariadb-server-10.0=10.0.28+maria-1~xenial ----
STDOUT: Reading package lists...
Building dependency tree...
Reading state information...
Some packages could not be installed. This may mean that you have
requested an impossible situation or if you are using the unstable
distribution that some required packages have not yet been created
or been moved out of Incoming.
The following information may help to resolve the situation:
The following packages have unmet dependencies:
mariadb-server-10.0 : Depends: mariadb-client-10.0 (>= 10.0.28+maria-1~xenial) but it is not going to be installed
Depends: mariadb-server-core-10.0 (>= 10.0.28+maria-1~xenial) but it is not going to be installed
STDERR: E: Unable to correct problems, you have held broken packages.
---- End output of apt-get -q -y install mariadb-server-10.0=10.0.28+maria-1~xenial ----
Ran apt-get -q -y install mariadb-server-10.0=10.0.28+maria-1~xenial returned 100
Cookbook Trace:
---------------
/root/chef-solo/local-mode-cache/cache/cookbooks/compat_resource/files/lib/chef_compat/monkeypatches/chef/runner.rb:41:in `run_action'
Resource Declaration:
---------------------
# In /root/chef-solo/local-mode-cache/cache/cookbooks/mariadb/recipes/_debian_server.rb
53: package "mariadb-server-#{node['mariadb']['install']['version']}" do
54: action :install
55: end
Compiled Resource:
------------------
# Declared in /root/chef-solo/local-mode-cache/cache/cookbooks/mariadb/recipes/_debian_server.rb:53:in `from_file'
apt_package("mariadb-server-10.0") do
package_name "mariadb-server-10.0"
action [:install]
retries 0
retry_delay 2
default_guard_interpreter :default
declared_type :package
cookbook_name "mariadb"
recipe_name "_debian_server"
end
Platform:
---------
x86_64-linux-gnu
Recipe: chef-client::init_service
* service[chef-client] action restart
- restart service service[chef-client]
Running handlers:
[2016-11-15T21:53:22+00:00] ERROR: Running exception handlers
Running handlers complete
[2016-11-15T21:53:22+00:00] ERROR: Exception handlers complete
Chef Client failed. 45 resources updated in 54 seconds
[2016-11-15T21:53:22+00:00] FATAL: Stacktrace dumped to /root/chef-solo/local-mode-cache/cache/chef-stacktrace.out
[2016-11-15T21:53:22+00:00] FATAL: Please provide the contents of the stacktrace.out file if you file a bug report
[2016-11-15T21:53:22+00:00] ERROR: apt_package[mariadb-server-10.0] (mariadb::_debian_server line 53) had an error: Mixlib::ShellOut::ShellCommandFailed: Expected process to exit with [0], but received '100'
---- Begin output of apt-get -q -y install mariadb-server-10.0=10.0.28+maria-1~xenial ----
STDOUT: Reading package lists...
Building dependency tree...
Reading state information...
Some packages could not be installed. This may mean that you have
requested an impossible situation or if you are using the unstable
distribution that some required packages have not yet been created
or been moved out of Incoming.
The following information may help to resolve the situation:
The following packages have unmet dependencies:
mariadb-server-10.0 : Depends: mariadb-client-10.0 (>= 10.0.28+maria-1~xenial) but it is not going to be installed
Depends: mariadb-server-core-10.0 (>= 10.0.28+maria-1~xenial) but it is not going to be installed
STDERR: E: Unable to correct problems, you have held broken packages.
---- End output of apt-get -q -y install mariadb-server-10.0=10.0.28+maria-1~xenial ----
Ran apt-get -q -y install mariadb-server-10.0=10.0.28+maria-1~xenial returned 100
[2016-11-15T21:53:22+00:00] FATAL: Chef::Exceptions::ChildConvergeError: Chef run process exited unsuccessfully (exit code 1)
ERROR: RuntimeError: chef-solo failed. See output above.
Makefile:107: recipe for target 'chef-cook' failed
make: *** [chef-cook] Error 100
@sethetter Does chef-cook
need to install mariadb (as above)?
@IuliiSe I think the issue may be the Ubuntu version. Could you try the provisioning on an Ubuntu 14.04 LTS server?
@sethetter there is a new issue with berkshelf
WARNING: #<LoadError: cannot load such file -- berkshelf>
WARNING: Berkshelf could not be loaded
WARNING: Please add the berkshelf gem to your Gemfile or install it manually with `gem install berkshelf`
Uploading the kitchen...
@IuliiSe try gem install berkshelf
for now. I added it to the Gemfile
in the dev
branch. Thanks for finding that!
This is solved. Thank you @sethetter !
Great! What was the solution?
On Nov 20, 2016 2:51 PM, "IuliiSe" notifications@github.com wrote:
This is solved. Thank you @sethetter https://github.com/sethetter !
— You are receiving this because you were mentioned. Reply to this email directly, view it on GitHub https://github.com/opengovfoundation/madison/issues/1063#issuecomment-261804739, or mute the thread https://github.com/notifications/unsubscribe-auth/AAoAjIxJCA8XjRe6KdjN7HskGlstIZclks5rALLagaJpZM4Kx2Sc .
The key issue was with the Ubuntu version. Needed to downgrade to Ubuntu 14.04 LTS.
Needed to fetch the latest Gemfile from dev and update ssh keys.
But, cap deploy
causes a new issue. I opened a new ticket asking for support.
Please help.