I am running chef bootstrap command from chef server on target node. Script runs fine for initial recipes but as it progress we are seeing 403 forbidden and it exits. This 403 is happening only when it is trying to copy file from template folder. I have seen same issue when i was executing another recipe as well.
There is no issue with recipe as same cookbook run with out issues on different target node.
Anyone know how to resolve this?
Error executing action `create` on resource 'template[/tmp/rsp_files/WebGate_Installation_response_file.rsp]'
================================================================================
Net::HTTPServerException
------------------------
403 "Forbidden"
Resource Declaration:
---------------------
# In /var/chef/cache/cookbooks/ohs/recipes/install_webgate.rb
59: template "#{node['OHS']['RSP_FILE']}/WebGate_Installation_response_file.rsp" do
60: source 'WebGate_Installation_response_file.rsp.erb'
61: owner node['OHS']['USER']
62: group node['OHS']['GROUP']
63: mode '0644'
64: not_if do ::File.exists?("#{node['OHS']['RSP_FILE']}/WebGate_Installation_response_file.rsp") end
65: end
66:
Compiled Resource:
------------------
# Declared in /var/chef/cache/cookbooks/ohs/recipes/install_webgate.rb:59:in `from_file'
template("/tmp/rsp_files/WebGate_Installation_response_file.rsp") do
provider Chef::Provider::Template
action "create"
retries 0
retry_delay 2
guard_interpreter :default
path "/tmp/rsp_files/WebGate_Installation_response_file.rsp"
backup 5
atomic_update true
source "WebGate_Installation_response_file.rsp.erb"
cookbook_name "ohs"
recipe_name "install_webgate"
owner "oracle"
group "oinstall"
mode "0644"
not_if { #code block }
end
Running handlers:
[2016-05-31T17:21:45-04:00] ERROR: Running exception handlers
Running handlers complete
[2016-05-31T17:21:45-04:00] ERROR: Exception handlers complete
[2016-05-31T17:21:45-04:00] FATAL: Stacktrace dumped to /var/chef/cache/chef-stacktrace.out
Chef Client failed. 23 resources updated in 929.166495413 seconds
[2016-05-31T17:21:45-04:00] ERROR: template[/tmp/rsp_files/WebGate_Installation_response_file.rsp] (ohs::install_webgate line 59) had an error: Net::HTTPServerException: 403 "Forbidden"
[2016-05-31T17:21:45-04:00] FATAL: Chef::Exceptions::ChildConvergeError: Chef run process exited unsuccessfully (exit code 1)
no_lazy_loadto true in yourclient.rb. - coderanger