Hey
I raised a bug several months ago on github that was happening with Template resources in Chef Client 13 local mode but didn’t receive a reply so though it worth asking here.
I was trying this again with the latest chef-client version today to see if the issue still persisted and it does. Essentially whenever my run hits a template resource it fails with the error on the bug (reposted below for convenience).
* template[/var/www/html/index.php] action create
================================================================================
Error executing action `create` on resource 'template[/var/www/html/index.php]'
================================================================================
Net::HTTPServerException
------------------------
404 "Not Found"
Resource Declaration:
---------------------
Compiled Resource:
------------------
# Declared in /root/.chef/local-mode-cache/cache/cookbooks/splash-page/recipes/install-splash-page.rb:34:in `from_file'
template("/var/www/html/index.php") do
action [:create]
default_guard_interpreter :default
source "index.php.erb"
declared_type :template
cookbook_name "splash-page"
recipe_name "install-splash-page"
owner "user"
group "apache"
mode "0755"
path "/var/www/html/index.php"
verifications []
end
System Info:
------------
chef_version=13.2.20
platform=centos
platform_version=7.3.1611
ruby=ruby 2.4.1p111 (2017-03-22 revision 58053) [x86_64-linux]
program_name=chef-client worker: ppid=1588;start=17:08:09;
executable=/opt/chefdk/bin/chef-client
And the specific error in debug mode:
[2017-07-19T15:35:35+01:00] DEBUG: #<ChefZero::RestRequest:0x00000006d710f8
@env=
{"SCRIPT_NAME"=>"",
"SERVER_NAME"=>"localhost",
"REQUEST_METHOD"=>"GET",
"PATH_INFO"=>"",
"QUERY_STRING"=>nil,
"SERVER_PORT"=>1,
"HTTP_HOST"=>"localhost:1",
"HTTP_X_OPS_SERVER_API_VERSION"=>"2",
"rack.url_scheme"=>"chefzero",
"rack.input"=>#<StringIO:0x00000006d71148>},
@rest_base_prefix=["organizations", "chef"],
@rest_path=["organizations", "chef"]>
[2017-07-19T15:35:35+01:00] DEBUG: #<ChefZero::RestErrorResponse: 404: Object not found: chefzero://localhost:1/org>
Any help on this would be really appreciated. We’re having to keep several machines on Chef Client 12 (which works perfectly) and would love to get them updated before it hits EOL.
Many Thanks,
R.