Below is the "chef-client" error message:
It says cookbook apt is missing , but when I check the list of cookbooks in chef server using knife cookbook list , I see the apt cookbook. Please help me. I have deployed apache2 cookbook , now changed the runlist in the chef-client in the node.
13: service 'apache2' do
14: supports :status => true
15: action [:enable, :start]
16: end
17:
18: template '/var/www/html/index.html' do
Running handlers:
[2016-01-25T07:40:17+00:00] ERROR: Running exception handlers
Running handlers complete
[2016-01-25T07:40:17+00:00] ERROR: Exception handlers complete
Chef Client failed. 0 resources updated in 01 seconds
[2016-01-25T07:40:17+00:00] FATAL: Stacktrace dumped to /var/chef/cache/chef-stacktrace.out
[2016-01-25T07:40:17+00:00] FATAL: Please provide the contents of the stacktrace.out file if you file a bug report
[2016-01-25T07:40:17+00:00] ERROR: Cookbook apt not found. If you're loading apt from another cookbook, make sure you configure the dependency in your metadata
[2016-01-25T07:40:17+00:00] FATAL: Chef::Exceptions::ChildConvergeError: Chef run process exited unsuccessfully (exit code 1)
update :
i could successfully install all the cookbooks in the Test Kitchen using Vagrant,but i could not successfully deploy in the AWS EC2.
below is another example :
default_guard_interpreter :default
package_name "php-devel"
flush_cache {:before=>false, :after=>false}
declared_type :package
cookbook_name "php"
recipe_name "package"
end
Running handlers:
[2016-01-25T09:00:06-05:00] ERROR: Running exception
handlers Running handlers complete
[2016-01-25T09:00:06-05:00] ERROR:
Exception handlers complete Chef Client failed. 0 resources updated in
16 seconds
[2016-01-25T09:00:07-05:00] FATAL: Stacktrace dumped to
/var/chef/cache/chef-stacktrace.out
[2016-01-25T09:00:07-05:00] FATAL:
Please provide the contents of the stacktrace.out file if you file a
bug report
[2016-01-25T09:00:07-05:00] ERROR: yum_package[php-devel]
(php::package line 59) had an error: Chef::Exceptions::Package: No
candidate version available for php-devel
[2016-01-25T09:00:07-05:00]
FATAL: Chef::Exceptions::ChildConvergeError: Chef run process exited
unsuccessfully (exit code 1)
update 2: i have successfully installed the chef cookbook "Wordpress" in the AWS EC2 Ubuntu 14.04 instance. But , Failed in the Amazon Linux EC2 and Redhat linux EC2 . So what might be the issue here ? Using Test Kitchen , i could successfully deploy in the CentOS ! But not able to install in Redhat linux and Amazon Linux in the AWS EC2.
+ DocumentRoot /var/www/wordpress
+
+ <Directory /var/www/wordpress>
+ Options FollowSymLinks
+ AllowOverride FileInfo Options
+ Require all granted
+ </Directory>
+
+ <Directory />
+ Options FollowSymLinks
+ AllowOverride None
+ </Directory>
+
+ LogLevel info
+ ErrorLog /var/log/apache2/wordpress-error.log
+ CustomLog /var/log/apache2/wordpress-access.log combined
+
+ RewriteEngine On
+</VirtualHost>
- change mode from '' to '0644'
- change owner from '' to 'root'
- change group from '' to 'root'
* execute[a2ensite wordpress.conf] action run
- execute /usr/sbin/a2ensite wordpress.conf
Recipe: apache2::default
* service[apache2] action reload
- reload service service[apache2]
Running handlers:
Running handlers complete
Chef Client finished, 92/168 resources updated in 01 minutes 58 seconds