Getting Error while executing Che recipe

rajbazar created the topic: Getting Error while executing Che recipe

Hi! Rajesh !
Installed Chef successfully on my Mac.
=================
[code language=”css”]
Rajs-MacBook-Pro:~ Raj$ which chef
/usr/local/bin/chef
Rajs-MacBook-Pro:~ Raj$ chef -v
Chef Development Kit Version: 2.0.28
chef-client version: 13.2.20
delivery version: master (17c1b0fed9be4c70f69091a6d21a4cbf0df60a23)
berks version: 6.2.0
kitchen version: 1.16.0
inspec version: 1.31.1
[/code]

====================
My Issue I’am not able to execute first and initial recipe .
[code language=”css”]
Issue:
Raj$ vi server.rb
Rajs-MacBook-Pro:~ Raj$ chef-apply server.rb
Recipe: (chef-apply cookbook)::(chef-apply recipe)
* homebrew_package[httpd] action install
[/code]

================================================================================
Error executing action install on resource ‘homebrew_package[httpd]’
================================================================================
[code language=”css”]
Mixlib::ShellOut::ShellCommandFailed
Expected process to exit with [0], but received ‘1’
—- Begin output of ["brew", "info", "–json=v1", "httpd"] —-
STDOUT:
STDERR: Error: No available formula with the name "httpd"
—- End output of ["brew", "info", "–json=v1", "httpd"] —-
Ran ["brew", "info", "–json=v1", "httpd"] returned 1
[/code]

Resource Declaration:
[code language=”css”]
# In server.rb

1: package ‘httpd’
2: service ‘httpd’ do
[/code]

Compiled Resource:
[code language=”css”]
# Declared in server.rb:1:in run_chef_recipe'

homebrew_package("httpd") do
package_name "httpd"
action [:install]
default_guard_interpreter :default
declared_type :package
cookbook_name "(chef-apply cookbook)"
recipe_name "(chef-apply recipe)"
end
[/code]

System Info:
[code language="css"]
chef_version=13.2.20
platform=mac_os_x
platform_version=10.12.6
ruby=ruby 2.4.1p111 (2017-03-22 revision 58053) [x86_64-darwin14]
program_name=/usr/local/bin/chef-apply
executable=/opt/chefdk/bin/chef-apply

[2017-07-24T10:46:03+01:00] FATAL: Stacktrace dumped to /Users/Raj/.chef/cache/chef-stacktrace.out
[2017-07-24T10:46:03+01:00] FATAL: Stacktrace dumped to /Users/Raj/.chef/cache/chef-stacktrace.out
[2017-07-24T10:46:03+01:00] FATAL: Please provide the contents of the stacktrace.out file if you file a bug report
[2017-07-24T10:46:03+01:00] FATAL: Please provide the contents of the stacktrace.out file if you file a bug report
[2017-07-24T10:46:03+01:00] FATAL: Mixlib::ShellOut::ShellCommandFailed: homebrew_package[httpd] ((chef-apply cookbook)::(chef-apply recipe) line 1) had an error: Mixlib::ShellOut::ShellCommandFailed: Expected process to exit with [0], but received '1'
---- Begin output of ["brew", "info", "--json=v1", "httpd"] ----
STDOUT:
STDERR: Error: No available formula with the name "httpd"
---- End output of ["brew", "info", "--json=v1", "httpd"] ----
Ran ["brew", "info", "--json=v1", "httpd"] returned 1
[2017-07-24T10:46:03+01:00] FATAL: Mixlib::ShellOut::ShellCommandFailed: homebrew_package[httpd] ((chef-apply cookbook)::(chef-apply recipe) line 1) had an error: Mixlib::ShellOut::ShellCommandFailed: Expected process to exit with [0], but received '1'
---- Begin output of ["brew", "info", "--json=v1", "httpd"] ----
STDOUT:
STDERR: Error: No available formula with the name "httpd"
---- End output of ["brew", "info", "--json=v1", "httpd"] ----
[/code]

rajeshkumar replied the topic: Getting Error while executing Che recipe

I guess you are running this script in Mac

"Error executing action install` on resource ‘homebrew_package[httpd]'”

Check the name of apache http package name in Mac. I guess its “httpd24” but need to verify first.
Regards,
Rajesh Kumar
Twitt me @ twitter.com/RajeshKumarIn