{"id":2800,"date":"2017-12-09T13:01:02","date_gmt":"2017-12-09T13:01:02","guid":{"rendered":"http:\/\/www.scmgalaxy.com\/tutorials\/?p=2800"},"modified":"2021-11-18T06:27:30","modified_gmt":"2021-11-18T06:27:30","slug":"getting-error-while-executing-che-recipe","status":"publish","type":"post","link":"https:\/\/www.devopsschool.com\/blog\/getting-error-while-executing-che-recipe\/","title":{"rendered":"Chef Error &#8211; Getting Error while executing Che recipe"},"content":{"rendered":"<p><strong>rajbazar created the topic: Getting Error while executing Che recipe<\/strong><\/p>\n<p>Hi! Rajesh !<br>\nInstalled Chef successfully on my Mac.<br>\n=================<br>\n[code language=&#8221;css&#8221;]<br>\nRajs-MacBook-Pro:~ Raj$ which chef<br>\n\/usr\/local\/bin\/chef<br>\nRajs-MacBook-Pro:~ Raj$ chef -v<br>\nChef Development Kit Version: 2.0.28<br>\nchef-client version: 13.2.20<br>\ndelivery version: master (17c1b0fed9be4c70f69091a6d21a4cbf0df60a23)<br>\nberks version: 6.2.0<br>\nkitchen version: 1.16.0<br>\ninspec version: 1.31.1<br>\n[\/code]<\/p>\n<p>====================<br>\nMy Issue I&#8217;am not able to execute first and initial recipe .<br>\n[code language=&#8221;css&#8221;]<br>\nIssue:<br>\nRaj$ vi server.rb<br>\nRajs-MacBook-Pro:~ Raj$ chef-apply server.rb<br>\nRecipe: (chef-apply cookbook)::(chef-apply recipe)<br>\n* homebrew_package[httpd] action install<br>\n[\/code]<\/p>\n<p>================================================================================<br>\nError executing action `install` on resource &#8216;homebrew_package[httpd]&#8217;<br>\n================================================================================<br>\n[code language=&#8221;css&#8221;]<br>\nMixlib::ShellOut::ShellCommandFailed<br>\nExpected process to exit with [0], but received &#8216;1&#8217;<br>\n&#8212;- Begin output of [&#8220;brew&#8221;, &#8220;info&#8221;, &#8220;&#8211;json=v1&#8221;, &#8220;httpd&#8221;] &#8212;-<br>\nSTDOUT:<br>\nSTDERR: Error: No available formula with the name &#8220;httpd&#8221;<br>\n&#8212;- End output of [&#8220;brew&#8221;, &#8220;info&#8221;, &#8220;&#8211;json=v1&#8221;, &#8220;httpd&#8221;] &#8212;-<br>\nRan [&#8220;brew&#8221;, &#8220;info&#8221;, &#8220;&#8211;json=v1&#8221;, &#8220;httpd&#8221;] returned 1<br>\n[\/code]<\/p>\n<p>Resource Declaration:<br>\n[code language=&#8221;css&#8221;]<br>\n# In server.rb<\/p>\n<p>1: package &#8216;httpd&#8217;<br>\n2: service &#8216;httpd&#8217; do<br>\n[\/code]<\/p>\n<p>Compiled Resource:<br>\n[code language=&#8221;css&#8221;]<br>\n# Declared in server.rb:1:in `run_chef_recipe&#8217;<\/p>\n<p>homebrew_package(&#8220;httpd&#8221;) do<br>\npackage_name &#8220;httpd&#8221;<br>\naction [:install]<br>\ndefault_guard_interpreter :default<br>\ndeclared_type :package<br>\ncookbook_name &#8220;(chef-apply cookbook)&#8221;<br>\nrecipe_name &#8220;(chef-apply recipe)&#8221;<br>\nend<br>\n[\/code]<\/p>\n<p>System Info:<br>\n[code language=&#8221;css&#8221;]<br>\nchef_version=13.2.20<br>\nplatform=mac_os_x<br>\nplatform_version=10.12.6<br>\nruby=ruby 2.4.1p111 (2017-03-22 revision 58053) [x86_64-darwin14]<br>\nprogram_name=\/usr\/local\/bin\/chef-apply<br>\nexecutable=\/opt\/chefdk\/bin\/chef-apply<\/p>\n<p>[2017-07-24T10:46:03+01:00] FATAL: Stacktrace dumped to \/Users\/Raj\/.chef\/cache\/chef-stacktrace.out<br>\n[2017-07-24T10:46:03+01:00] FATAL: Stacktrace dumped to \/Users\/Raj\/.chef\/cache\/chef-stacktrace.out<br>\n[2017-07-24T10:46:03+01:00] FATAL: Please provide the contents of the stacktrace.out file if you file a bug report<br>\n[2017-07-24T10:46:03+01:00] FATAL: Please provide the contents of the stacktrace.out file if you file a bug report<br>\n[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 &#8216;1&#8217;<br>\n&#8212;- Begin output of [&#8220;brew&#8221;, &#8220;info&#8221;, &#8220;&#8211;json=v1&#8221;, &#8220;httpd&#8221;] &#8212;-<br>\nSTDOUT:<br>\nSTDERR: Error: No available formula with the name &#8220;httpd&#8221;<br>\n&#8212;- End output of [&#8220;brew&#8221;, &#8220;info&#8221;, &#8220;&#8211;json=v1&#8221;, &#8220;httpd&#8221;] &#8212;-<br>\nRan [&#8220;brew&#8221;, &#8220;info&#8221;, &#8220;&#8211;json=v1&#8221;, &#8220;httpd&#8221;] returned 1<br>\n[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 &#8216;1&#8217;<br>\n&#8212;- Begin output of [&#8220;brew&#8221;, &#8220;info&#8221;, &#8220;&#8211;json=v1&#8221;, &#8220;httpd&#8221;] &#8212;-<br>\nSTDOUT:<br>\nSTDERR: Error: No available formula with the name &#8220;httpd&#8221;<br>\n&#8212;- End output of [&#8220;brew&#8221;, &#8220;info&#8221;, &#8220;&#8211;json=v1&#8221;, &#8220;httpd&#8221;] &#8212;-<br>\n[\/code]<\/p>\n<p><strong>rajeshkumar replied the topic: Getting Error while executing Che recipe<\/strong><\/p>\n<p>I guess you are running this script in Mac<\/p>\n<p>&#8220;Error executing action `install` on resource &#8216;homebrew_package[httpd]'&#8221;<\/p>\n<p>Check the name of apache http package name in Mac. I guess its &#8220;httpd24&#8221; but need to verify first.<br>\nRegards,<br>\nRajesh Kumar<br>\nTwitt me @ <a href=\"http:\/\/twitter.com\/RajeshKumarIn\" target=\"_blank\" rel=\"noopener\">twitter.com\/RajeshKumarIn<\/a><\/p>\n\n<div class=\"epyt-gallery\" data-currpage=\"1\" id=\"epyt_gallery_52487\"><iframe loading=\"lazy\"  id=\"_ytid_79812\"  width=\"760\" height=\"427\"  data-origwidth=\"760\" data-origheight=\"427\" src=\"https:\/\/www.youtube.com\/embed\/?enablejsapi=1&#038;autoplay=0&#038;cc_load_policy=0&#038;cc_lang_pref=&#038;iv_load_policy=1&#038;loop=0&#038;rel=1&#038;fs=1&#038;playsinline=0&#038;autohide=2&#038;theme=dark&#038;color=red&#038;controls=1&#038;disablekb=0&#038;\" class=\"__youtube_prefs__  no-lazyload\" title=\"YouTube player\"  data-epytgalleryid=\"epyt_gallery_52487\"  allow=\"fullscreen; accelerometer; autoplay; clipboard-write; encrypted-media; gyroscope; picture-in-picture; web-share\" referrerpolicy=\"strict-origin-when-cross-origin\" allowfullscreen data-no-lazy=\"1\" data-skipgform_ajax_framebjll=\"\"><\/iframe><div class=\"epyt-gallery-list\"><div>Sorry, there was a YouTube error.<\/div><\/div><\/div>","protected":false},"excerpt":{"rendered":"<p>rajbazar created the topic: Getting Error while executing Che recipe Hi! Rajesh ! Installed Chef successfully on my Mac. ================= [code language=&#8221;css&#8221;] Rajs-MacBook-Pro:~ Raj$ which chef \/usr\/local\/bin\/chef Rajs-MacBook-Pro:~ Raj$ chef&#8230; <\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"_joinchat":[],"footnotes":""},"categories":[2],"tags":[258],"class_list":["post-2800","post","type-post","status-publish","format-standard","hentry","category-uncategorised","tag-error"],"_links":{"self":[{"href":"https:\/\/www.devopsschool.com\/blog\/wp-json\/wp\/v2\/posts\/2800","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/www.devopsschool.com\/blog\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/www.devopsschool.com\/blog\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/www.devopsschool.com\/blog\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/www.devopsschool.com\/blog\/wp-json\/wp\/v2\/comments?post=2800"}],"version-history":[{"count":3,"href":"https:\/\/www.devopsschool.com\/blog\/wp-json\/wp\/v2\/posts\/2800\/revisions"}],"predecessor-version":[{"id":25678,"href":"https:\/\/www.devopsschool.com\/blog\/wp-json\/wp\/v2\/posts\/2800\/revisions\/25678"}],"wp:attachment":[{"href":"https:\/\/www.devopsschool.com\/blog\/wp-json\/wp\/v2\/media?parent=2800"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/www.devopsschool.com\/blog\/wp-json\/wp\/v2\/categories?post=2800"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/www.devopsschool.com\/blog\/wp-json\/wp\/v2\/tags?post=2800"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}