firewalld-cookbook
firewalld-cookbook copied to clipboard
Timeout error during initial chef-client run in AWS Centos 7 image
I get a timeout error in AWS in the initial chef-client run while building a new server. Any ideas ?
While chef-client was waiting to run the command, I was able to run it manually
[root@ip-10-42-110-240 centos]# firewall-cmd --permanent --query-service=http
no
[root@ip-10-42-110-240 centos]# firewall-cmd --permanent --add-service=http
success
[root@ip-10-42-110-240 centos]# firewall-cmd --permanent --query-service=http
yes
Here is the log.
Log:
[2015-04-03T17:36:58+00:00] INFO: Processing package[firewalld] action install (firewalld::default line 7)
[2015-04-03T17:36:59+00:00] INFO: package[firewalld] installing firewalld-0.3.9-11.el7 from base repository
[2015-04-03T17:37:16+00:00] INFO: Processing service[firewalld] action enable (firewalld::default line 9)
[2015-04-03T17:37:16+00:00] INFO: Processing service[firewalld] action start (firewalld::default line 9)
[2015-04-03T17:37:16+00:00] INFO: service[firewalld] started
[2015-04-03T17:37:16+00:00] INFO: Processing firewalld_port[8000/tcp] action add (app-ca-ppp::app line 12)
**[2015-04-03T17:37:16+00:00] INFO: Processing execute[add port 8000/tcp to zone] action run (/var/chef/cache/cookbooks/firewalld/providers/port.rb line 8)**
[0m
================================================================================[0m
[31mError executing action `run` on resource 'execute[add port 8000/tcp to zone]'[0m
================================================================================[0m
[0mMixlib::ShellOut::CommandTimeout[0m
--------------------------------[0m
Command timed out after 600s:
[0mCommand exceeded allowed execution time, process terminated
[0m---- Begin output of firewall-cmd --permanent --query-port=8000/tcp ----
[0mSTDOUT:
[0mSTDERR: ERROR:dbus.proxies:Introspect error on :1.7:/org/fedoraproject/FirewallD1: dbus.exceptions.DBusException: org.freedesktop.DBus.Error.NoReply: Did not receive a reply. Possible causes include: the remote application did not send a reply, the message bus security policy blocked the reply, the reply timeout expired, or the network connection was broken.
[0m---- End output of firewall-cmd --permanent --query-port=8000/tcp ----
[0mRan firewall-cmd --permanent --query-port=8000/tcp returned [0m
[0mResource Declaration:[0m
---------------------[0m
# In /var/chef/cache/cookbooks/firewalld/providers/port.rb
[0m
[0m 8: e = execute "add port #{new_resource.port} to zone" do
[0m 9: not_if "firewall-cmd --permanent #{zone} --query-port=#{new_resource.port}"
[0m 10: command(<<-EOC)
[0m 11: firewall-cmd #{zone} --add-port=#{new_resource.port}
[0m 12: firewall-cmd --permanent #{zone} --add-port=#{new_resource.port}
[0m 13: EOC
[0m 14: end
[0m 15: new_resource.updated_by_last_action(e.updated_by_last_action?)
[0m
[0mCompiled Resource:[0m
------------------[0m
# Declared in /var/chef/cache/cookbooks/firewalld/providers/port.rb:8:in `block in class_from_file'
[0m
[0mexecute("add port 8000/tcp to zone") do
[0m action "run"
[0m retries 0
[0m retry_delay 2
[0m guard_interpreter :default
[0m command " firewall-cmd --add-port=8000/tcp\n firewall-cmd --permanent --add-port=8000/tcp\n"
[0m backup 5
[0m returns 0
[0m cookbook_name "app-ca-ppp"
[0m not_if "firewall-cmd --permanent --query-port=8000/tcp"
[0mend
[0m
[0m[2015-04-03T17:47:27+00:00] INFO: Running queued delayed notifications before re-raising exception
I have a feeling that my issue might be the same as this. Have you come up with a solution or workaround?