Skip to content

Instantly share code, notes, and snippets.

@vignesh-v3
Created December 2, 2016 19:59
Show Gist options
  • Save vignesh-v3/edb1bdbedb858c0abd6fb1cad61eee5b to your computer and use it in GitHub Desktop.
Save vignesh-v3/edb1bdbedb858c0abd6fb1cad61eee5b to your computer and use it in GitHub Desktop.
[ec2-user@ip-172-31-12-212 ~]$ sudo chef-client
Starting Chef Client, version 12.16.42
resolving cookbooks for run list: ["hwk"]
Synchronizing Cookbooks:
- hwk (0.1.0)
Installing Cookbook Gems:
Compiling Cookbooks...
sh: notifies: command not found
sh: notifies: command not found
sh: notifies: command not found
sh: notifies: command not found
Converging 14 resources
Recipe: hwk::install_amp
* apt_update[all platforms] action periodic (up to date)
* yum_package[httpd] action install (up to date)
* service[httpd] action enable (up to date)
* service[httpd] action start (up to date)
Recipe: hwk::mysqlinits
* bash[sql init] action run
================================================================================
Error executing action `run` on resource 'bash[sql init]'
================================================================================
Mixlib::ShellOut::ShellCommandFailed
------------------------------------
Expected process to exit with [0], but received '1'
---- Begin output of "bash" "/tmp/chef-script20161202-9919-vy4qo0" ----
STDOUT:
STDERR: sudo: /usr/bin/debconf-set-selections: command not found
sudo: /usr/bin/debconf-set-selections: command not found
---- End output of "bash" "/tmp/chef-script20161202-9919-vy4qo0" ----
Ran "bash" "/tmp/chef-script20161202-9919-vy4qo0" returned 1
Resource Declaration:
---------------------
# In /var/chef/cache/cookbooks/hwk/recipes/mysqlinits.rb
2: bash 'sql init' do
3: code <<-EOH
4: export DEBIAN_FRONTEND="noninteractive"
5: sudo /usr/bin/debconf-set-selections <<< "mysql-server mysql-server/root_password password root"
6: sudo /usr/bin/debconf-set-selections <<< "mysql-server mysql-server/root_password_again password root"
7: EOH
8: end
Compiled Resource:
------------------
# Declared in /var/chef/cache/cookbooks/hwk/recipes/mysqlinits.rb:2:in `from_file'
bash("sql init") do
action [:run]
retries 0
retry_delay 2
default_guard_interpreter :default
command "sql init"
backup 5
returns 0
code " export DEBIAN_FRONTEND=\"noninteractive\"\n sudo /usr/bin/debconf-set-selections <<< \"mysql-server mysql-server/root_password password root\"\n sudo /usr/bin/debconf-set-selections <<< \"mysql-server mysql-server/root_password_again password root\"\n"
interpreter "bash"
declared_type :bash
cookbook_name "hwk"
recipe_name "mysqlinits"
end
Platform:
---------
x86_64-linux
Running handlers:
[2016-12-02T19:58:43+00:00] ERROR: Running exception handlers
Running handlers complete
[2016-12-02T19:58:43+00:00] ERROR: Exception handlers complete
Chef Client failed. 0 resources updated in 02 seconds
[2016-12-02T19:58:43+00:00] FATAL: Stacktrace dumped to /var/chef/cache/chef-stacktrace.out
[2016-12-02T19:58:43+00:00] FATAL: Please provide the contents of the stacktrace.out file if you file a bug report
[2016-12-02T19:58:43+00:00] ERROR: bash[sql init] (hwk::mysqlinits line 2) had an error: Mixlib::ShellOut::ShellCommandFailed: Expected process to exit with [0], but received '1'
---- Begin output of "bash" "/tmp/chef-script20161202-9919-vy4qo0" ----
STDOUT:
STDERR: sudo: /usr/bin/debconf-set-selections: command not found
sudo: /usr/bin/debconf-set-selections: command not found
---- End output of "bash" "/tmp/chef-script20161202-9919-vy4qo0" ----
Ran "bash" "/tmp/chef-script20161202-9919-vy4qo0" returned 1
[2016-12-02T19:58:43+00:00] FATAL: Chef::Exceptions::ChildConvergeError: Chef run process exited unsuccessfully (exit code 1)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment