apache2 problem


#1

Hi,

    When i running apache2 package it shows error:

       chef-client -o recipe['apache2']


       Starting Chef Client, version 11.4.4

172.16.1.121
172.16.1.121 resolving cookbooks for run list: [“apache2”]
172.16.1.121
172.16.1.121 Synchronizing Cookbooks:
172.16.1.121
172.16.1.121 - apache2
172.16.1.121
172.16.1.121 Compiling Cookbooks…
172.16.1.121
172.16.1.121 Converging 32 resources
172.16.1.121
172.16.1.121 Recipe: apache2::default
172.16.1.121
172.16.1.121 * package[apache2] action install
172.16.1.121
172.16.1.121
172.16.1.121 ================================================================================
172.16.1.121
172.16.1.121 Error executing action install on resource 'package[apache2]'
172.16.1.121
172.16.1.121 ================================================================================
172.16.1.121
172.16.1.121
172.16.1.121
172.16.1.121
172.16.1.121 Chef::Exceptions::Exec
172.16.1.121
172.16.1.121 ----------------------
172.16.1.121
172.16.1.121 apt-get -q -y install apache2=2.2.22-1ubuntu1.4 returned 100, expected 0
172.16.1.121
172.16.1.121
172.16.1.121
172.16.1.121
172.16.1.121 Resource Declaration:
172.16.1.121
172.16.1.121 ---------------------
172.16.1.121
172.16.1.121 # In /var/chef/cache/cookbooks/apache2/recipes/default.rb
172.16.1.121
172.16.1.121
172.16.1.121 23: package “apache2” do
172.16.1.121
172.16.1.121 24: package_name node[‘apache’][‘package’]
172.16.1.121
172.16.1.121 25: end
172.16.1.121
172.16.1.121 26:
172.16.1.121
172.16.1.121
172.16.1.121
172.16.1.121
172.16.1.121
172.16.1.121
172.16.1.121 Compiled Resource:
172.16.1.121
172.16.1.121 ------------------
172.16.1.121
172.16.1.121 # Declared in /var/chef/cache/cookbooks/apache2/recipes/default.rb:23:in from_file' 172.16.1.121 172.16.1.121 172.16.1.121 package("apache2") do 172.16.1.121 172.16.1.121 action :install 172.16.1.121 172.16.1.121 retries 0 172.16.1.121 172.16.1.121 retry_delay 2 172.16.1.121 172.16.1.121 package_name "apache2" 172.16.1.121 172.16.1.121 version "2.2.22-1ubuntu1.4" 172.16.1.121 172.16.1.121 cookbook_name "apache2" 172.16.1.121 172.16.1.121 recipe_name "default" 172.16.1.121 172.16.1.121 end 172.16.1.121 172.16.1.121 172.16.1.121 172.16.1.121 172.16.1.121 172.16.1.121 172.16.1.121 Chef Client failed. 0 resources updated 172.16.1.121 admini@system05:~/chef-repo$ knife cookbook upload apache2 /opt/chef/embedded/lib/ruby/gems/1.9.1/gems/systemu-2.5.2/lib/systemu.rb:31: warning: Insecure world writable dir /home/admini in PATH, mode 040777 Uploading apache2 [1.2.0] Uploaded 1 cookbook. admini@system05:~/chef-repo$ knife ssh name:ubuntu 'chef-client -o recipe[apache2]' -x root -P 'p@ssw0rd' -a ipaddress /opt/chef/embedded/lib/ruby/gems/1.9.1/gems/systemu-2.5.2/lib/systemu.rb:31: warning: Insecure world writable dir /home/admini in PATH, mode 040777 172.16.1.121 Starting Chef Client, version 11.4.4 172.16.1.121 172.16.1.121 resolving cookbooks for run list: ["apache2"] 172.16.1.121 172.16.1.121 Synchronizing Cookbooks: 172.16.1.121 172.16.1.121 - apache2 172.16.1.121 172.16.1.121 Compiling Cookbooks... 172.16.1.121 172.16.1.121 Converging 32 resources 172.16.1.121 172.16.1.121 Recipe: apache2::default 172.16.1.121 172.16.1.121 * package[apache2] action install 172.16.1.121 172.16.1.121 172.16.1.121 ================================================================================ 172.16.1.121 172.16.1.121 Error executing actioninstallon resource 'package[apache2]' 172.16.1.121 172.16.1.121 ================================================================================ 172.16.1.121 172.16.1.121 172.16.1.121 172.16.1.121 172.16.1.121 Chef::Exceptions::Exec 172.16.1.121 172.16.1.121 ---------------------- 172.16.1.121 172.16.1.121 apt-get -q -y install apache2=2.2.22-1ubuntu1.4 returned 100, expected 0 172.16.1.121 172.16.1.121 172.16.1.121 172.16.1.121 172.16.1.121 Resource Declaration: 172.16.1.121 172.16.1.121 --------------------- 172.16.1.121 172.16.1.121 # In /var/chef/cache/cookbooks/apache2/recipes/default.rb 172.16.1.121 172.16.1.121 172.16.1.121 23: package node['apache']['package'] do 172.16.1.121 172.16.1.121 24: action :install 172.16.1.121 172.16.1.121 25: end 172.16.1.121 172.16.1.121 26: 172.16.1.121 172.16.1.121 172.16.1.121 172.16.1.121 172.16.1.121 172.16.1.121 172.16.1.121 Compiled Resource: 172.16.1.121 172.16.1.121 ------------------ 172.16.1.121 172.16.1.121 # Declared in /var/chef/cache/cookbooks/apache2/recipes/default.rb:23:infrom_file’
172.16.1.121
172.16.1.121
172.16.1.121 package(“apache2”) do
172.16.1.121
172.16.1.121 action [:install]
172.16.1.121
172.16.1.121 retries 0
172.16.1.121
172.16.1.121 retry_delay 2
172.16.1.121
172.16.1.121 package_name "apache2"
172.16.1.121
172.16.1.121 version "2.2.22-1ubuntu1.4"
172.16.1.121
172.16.1.121 cookbook_name "apache2"
172.16.1.121
172.16.1.121 recipe_name "default"
172.16.1.121
172.16.1.121 end
172.16.1.121
172.16.1.121
172.16.1.121
172.16.1.121
172.16.1.121
172.16.1.121
172.16.1.121 Chef Client failed. 0 resources updated

Thanks,
Indra


#2

As noted in the output, apt-get failed. This is usually due to outdated apt cache files, use the apt cookbook to run apt-get update as part of the chef converge.

–Noah

On Jul 2, 2014, at 11:58 PM, Indra k indra.k@cloudenablers.com wrote:

Hi,

    When i running apache2 package it shows error:

       chef-client -o recipe['apache2']


       Starting Chef Client, version 11.4.4

172.16.1.121
172.16.1.121 resolving cookbooks for run list: [“apache2”]
172.16.1.121
172.16.1.121 Synchronizing Cookbooks:
172.16.1.121
172.16.1.121 - apache2
172.16.1.121
172.16.1.121 Compiling Cookbooks…
172.16.1.121
172.16.1.121 Converging 32 resources
172.16.1.121
172.16.1.121 Recipe: apache2::default
172.16.1.121
172.16.1.121 * package[apache2] action install
172.16.1.121
172.16.1.121
172.16.1.121 ================================================================================
172.16.1.121
172.16.1.121 Error executing action install on resource 'package[apache2]'
172.16.1.121
172.16.1.121 ================================================================================
172.16.1.121
172.16.1.121
172.16.1.121
172.16.1.121
172.16.1.121 Chef::Exceptions::Exec
172.16.1.121
172.16.1.121 ----------------------
172.16.1.121
172.16.1.121 apt-get -q -y install apache2=2.2.22-1ubuntu1.4 returned 100, expected 0
172.16.1.121
172.16.1.121
172.16.1.121
172.16.1.121
172.16.1.121 Resource Declaration:
172.16.1.121
172.16.1.121 ---------------------
172.16.1.121
172.16.1.121 # In /var/chef/cache/cookbooks/apache2/recipes/default.rb
172.16.1.121
172.16.1.121
172.16.1.121 23: package “apache2” do
172.16.1.121
172.16.1.121 24: package_name node[‘apache’][‘package’]
172.16.1.121
172.16.1.121 25: end
172.16.1.121
172.16.1.121 26:
172.16.1.121
172.16.1.121
172.16.1.121
172.16.1.121
172.16.1.121
172.16.1.121
172.16.1.121 Compiled Resource:
172.16.1.121
172.16.1.121 ------------------
172.16.1.121
172.16.1.121 # Declared in /var/chef/cache/cookbooks/apache2/recipes/default.rb:23:in from_file' 172.16.1.121 172.16.1.121 172.16.1.121 package("apache2") do 172.16.1.121 172.16.1.121 action :install 172.16.1.121 172.16.1.121 retries 0 172.16.1.121 172.16.1.121 retry_delay 2 172.16.1.121 172.16.1.121 package_name "apache2" 172.16.1.121 172.16.1.121 version "2.2.22-1ubuntu1.4" 172.16.1.121 172.16.1.121 cookbook_name "apache2" 172.16.1.121 172.16.1.121 recipe_name "default" 172.16.1.121 172.16.1.121 end 172.16.1.121 172.16.1.121 172.16.1.121 172.16.1.121 172.16.1.121 172.16.1.121 172.16.1.121 Chef Client failed. 0 resources updated 172.16.1.121 admini@system05:~/chef-repo$ knife cookbook upload apache2 /opt/chef/embedded/lib/ruby/gems/1.9.1/gems/systemu-2.5.2/lib/systemu.rb:31: warning: Insecure world writable dir /home/admini in PATH, mode 040777 Uploading apache2 [1.2.0] Uploaded 1 cookbook. admini@system05:~/chef-repo$ knife ssh name:ubuntu 'chef-client -o recipe[apache2]' -x root -P 'p@ssw0rd' -a ipaddress /opt/chef/embedded/lib/ruby/gems/1.9.1/gems/systemu-2.5.2/lib/systemu.rb:31: warning: Insecure world writable dir /home/admini in PATH, mode 040777 172.16.1.121 Starting Chef Client, version 11.4.4 172.16.1.121 172.16.1.121 resolving cookbooks for run list: ["apache2"] 172.16.1.121 172.16.1.121 Synchronizing Cookbooks: 172.16.1.121 172.16.1.121 - apache2 172.16.1.121 172.16.1.121 Compiling Cookbooks... 172.16.1.121 172.16.1.121 Converging 32 resources 172.16.1.121 172.16.1.121 Recipe: apache2::default 172.16.1.121 172.16.1.121 * package[apache2] action install 172.16.1.121 172.16.1.121 172.16.1.121 ================================================================================ 172.16.1.121 172.16.1.121 Error executing actioninstallon resource 'package[apache2]' 172.16.1.121 172.16.1.121 ================================================================================ 172.16.1.121 172.16.1.121 172.16.1.121 172.16.1.121 172.16.1.121 Chef::Exceptions::Exec 172.16.1.121 172.16.1.121 ---------------------- 172.16.1.121 172.16.1.121 apt-get -q -y install apache2=2.2.22-1ubuntu1.4 returned 100, expected 0 172.16.1.121 172.16.1.121 172.16.1.121 172.16.1.121 172.16.1.121 Resource Declaration: 172.16.1.121 172.16.1.121 --------------------- 172.16.1.121 172.16.1.121 # In /var/chef/cache/cookbooks/apache2/recipes/default.rb 172.16.1.121 172.16.1.121 172.16.1.121 23: package node['apache']['package'] do 172.16.1.121 172.16.1.121 24: action :install 172.16.1.121 172.16.1.121 25: end 172.16.1.121 172.16.1.121 26: 172.16.1.121 172.16.1.121 172.16.1.121 172.16.1.121 172.16.1.121 172.16.1.121 172.16.1.121 Compiled Resource: 172.16.1.121 172.16.1.121 ------------------ 172.16.1.121 172.16.1.121 # Declared in /var/chef/cache/cookbooks/apache2/recipes/default.rb:23:infrom_file’
172.16.1.121
172.16.1.121
172.16.1.121 package(“apache2”) do
172.16.1.121
172.16.1.121 action [:install]
172.16.1.121
172.16.1.121 retries 0
172.16.1.121
172.16.1.121 retry_delay 2
172.16.1.121
172.16.1.121 package_name "apache2"
172.16.1.121
172.16.1.121 version "2.2.22-1ubuntu1.4"
172.16.1.121
172.16.1.121 cookbook_name "apache2"
172.16.1.121
172.16.1.121 recipe_name "default"
172.16.1.121
172.16.1.121 end
172.16.1.121
172.16.1.121
172.16.1.121
172.16.1.121
172.16.1.121
172.16.1.121
172.16.1.121 Chef Client failed. 0 resources updated

Thanks,
Indra