I am receiving an error that I can't seem to troubleshoot when running "sudo chef-client" to load the recipe to the node from the chef server at the end of episode 4. I'm running this command from the node via SSH through Putty. I have gone through all code shown in this episodes video and have not been able to find any differences in my code.
Any assistance to help troubleshoot this issue would be greatly appreciated. See error output from Putty below. Thanks!
================================================================================
Error executing action `start` on resource 'service[httpd]'
================================================================================
Mixlib::ShellOut::ShellCommandFailed
------------------------------------
Expected process to exit with [0], but received '1'
---- Begin output of /sbin/service httpd start ----
STDOUT: Starting httpd: [FAILED]
STDERR: httpd: Syntax error on line 221 of /etc/httpd/conf/httpd.conf: Syntax error on line 2 of /etc/httpd/conf.d/bears.conf: /etc/httpd/conf.d/bears.conf:2: <VirtualHost> was not closed.
---- End output of /sbin/service httpd start ----
Ran /sbin/service httpd start returned 1
Resource Declaration:
---------------------
# In /var/chef/cache/cookbooks/apache/recipes/default.rb
13: service "httpd" do
14: action [ :enable, :start]
15: end
16:
Compiled Resource:
------------------
# Declared in /var/chef/cache/cookbooks/apache/recipes/default.rb:13:in `from_file'
service("httpd") do
action [:enable, :start]
supports {:restart=>false, :reload=>false, :status=>true}
retries 0
retry_delay 2
default_guard_interpreter :default
service_name "httpd"
enabled true
pattern "httpd"
declared_type :service
cookbook_name "apache"
recipe_name "default"
end
Running handlers:
[2015-04-03T17:41:27-04:00] ERROR: Running exception handlers
Running handlers complete
[2015-04-03T17:41:27-04:00] ERROR: Exception handlers complete
[2015-04-03T17:41:27-04:00] FATAL: Stacktrace dumped to /var/chef/cache/chef-stacktrace.out
Chef Client failed. 0 resources updated in 6.676840798 seconds
[2015-04-03T17:41:28-04:00] ERROR: service[httpd] (apache::default line 13) had an error: Mixlib::ShellOut::ShellCommandFailed: Expected process to exit with [0], but received '1'
---- Begin output of /sbin/service httpd start ----
STDOUT: Starting httpd: [FAILED]
STDERR: httpd: Syntax error on line 221 of /etc/httpd/conf/httpd.conf: Syntax error on line 2 of /etc/httpd/conf.d/bears.conf: /etc/httpd/conf.d/bears.conf:2: <VirtualHost> was not closed.
---- End output of /sbin/service httpd start ----
Ran /sbin/service httpd start returned 1
[2015-04-03T17:41:28-04:00] FATAL: Chef::Exceptions::ChildConvergeError: Chef run process exited unsuccessfully (exit code 1)
[root@CentOS63 ~]# STDERR: httpd: Syntax error on line 221 of /etc/httpd/conf/httpd.conf:
-bash: STDERR:: command not found