juanje / cookbook-redmine

Chef's Cookbook for installing Redmine
25 stars 21 forks source link

ERROR: Module passenger does not exist! #6

Closed btomasini closed 11 years ago

btomasini commented 11 years ago

I get the following error with the example:

---- Begin output of /usr/sbin/a2enmod passenger ----
STDOUT: 
STDERR: ERROR: Module passenger does not exist!
---- End output of /usr/sbin/a2enmod passenger ----

Here is the Vagrantfile, which I modified with a natdnshostresolver1 setting to support Ubuntu 12.10 as the host:

# -*- mode: ruby -*-
# vi: set ft=ruby :

Vagrant.configure("2") do |config|
  config.vm.box = "opscode-ubuntu-12.04-i386"
  config.vm.box_url = "https://opscode-vm.s3.amazonaws.com/vagrant/boxes/opscode-ubuntu-12.04-i386.box"

  config.vm.network :private_network, ip: "34.33.33.10"

  config.vm.provision :chef_solo do |chef|
    chef.add_recipe "redmine"

    chef.json = {
      :redmine => {
        :databases => {
          :production => {
            :password => "redmine_password"
          }
        }
      },
      :mysql => {
        :server_root_password => "supersecret_password",
        :server_debian_password => "supersecret_password",
        :server_repl_password => "supersecret_password"
      }
    }
  end

  config.vm.provider :virtualbox do |vb|
   vb.customize ["modifyvm", :id, "--natdnshostresolver1", "on"]
  end
end

Here is the output:

btomasini@tomasini-desktop:~/git/extchef/cookbook-redmine$ vagrant provision
[Berkshelf] Updating Vagrant's berkshelf: '/home/btomasini/.berkshelf/vagrant/berkshelf-20130404-6901-bbh51i'
[Berkshelf] Using redmine (0.0.4) at path: '/home/btomasini/git/extchef/cookbook-redmine'
[Berkshelf] Using apt (1.9.0)
[Berkshelf] Using yum (2.2.0)
[Berkshelf] Using git (2.3.0)
[Berkshelf] Using dmg (1.1.0)
[Berkshelf] Using build-essential (1.3.4)
[Berkshelf] Using windows (1.8.4)
[Berkshelf] Using chef_handler (1.1.4)
[Berkshelf] Using runit (1.0.6)
[Berkshelf] Using apache2 (1.6.0)
[Berkshelf] Using passenger_apache2 (2.0.0)
[Berkshelf] Using mysql (2.1.2)
[Berkshelf] Using openssl (1.0.2)
[default] Running provisioner: VagrantPlugins::Chef::Provisioner::ChefSolo...
Generating chef JSON and uploading...
Running chef-solo...
stdin: is not a tty
[2013-04-05T05:52:50+00:00] INFO: *** Chef 10.14.4 ***
[2013-04-05T05:52:52+00:00] INFO: Setting the run_list to ["recipe[redmine]"] from JSON
[2013-04-05T05:52:52+00:00] INFO: Run List is [recipe[redmine]]
[2013-04-05T05:52:52+00:00] INFO: Run List expands to [redmine]
[2013-04-05T05:52:52+00:00] INFO: Starting Chef Run for vagrant.vm
[2013-04-05T05:52:52+00:00] INFO: Running start handlers
[2013-04-05T05:52:52+00:00] INFO: Start handlers complete.
[2013-04-05T05:52:53+00:00] INFO: Could not find previously defined grants.sql resource
[2013-04-05T05:52:53+00:00] INFO: Processing execute[apt-get-update] action run (apt::default line 22)
[2013-04-05T05:53:01+00:00] INFO: execute[apt-get-update] ran successfully
[2013-04-05T05:53:01+00:00] INFO: Processing execute[apt-get update] action nothing (apt::default line 29)
[2013-04-05T05:53:01+00:00] INFO: Processing execute[apt-get autoremove] action nothing (apt::default line 36)
[2013-04-05T05:53:01+00:00] INFO: Processing execute[apt-get autoclean] action nothing (apt::default line 42)
[2013-04-05T05:53:01+00:00] INFO: Processing package[update-notifier-common] action install (apt::default line 48)
[2013-04-05T05:53:05+00:00] INFO: package[update-notifier-common] sending run action to execute[apt-get-update] (immediate)
[2013-04-05T05:53:05+00:00] INFO: Processing execute[apt-get-update] action run (apt::default line 22)
[2013-04-05T05:53:10+00:00] INFO: execute[apt-get-update] ran successfully
[2013-04-05T05:53:10+00:00] INFO: Processing execute[apt-get-update-periodic] action run (apt::default line 52)
[2013-04-05T05:53:10+00:00] INFO: Processing directory[/var/cache/local] action create (apt::default line 62)
[2013-04-05T05:53:10+00:00] INFO: directory[/var/cache/local] created directory /var/cache/local
[2013-04-05T05:53:10+00:00] INFO: directory[/var/cache/local] owner changed to 0
[2013-04-05T05:53:10+00:00] INFO: directory[/var/cache/local] group changed to 0
[2013-04-05T05:53:10+00:00] INFO: directory[/var/cache/local] mode changed to 755
[2013-04-05T05:53:10+00:00] INFO: Processing directory[/var/cache/local/preseeding] action create (apt::default line 62)
[2013-04-05T05:53:10+00:00] INFO: directory[/var/cache/local/preseeding] created directory /var/cache/local/preseeding
[2013-04-05T05:53:10+00:00] INFO: directory[/var/cache/local/preseeding] owner changed to 0
[2013-04-05T05:53:10+00:00] INFO: directory[/var/cache/local/preseeding] group changed to 0
[2013-04-05T05:53:10+00:00] INFO: directory[/var/cache/local/preseeding] mode changed to 755
[2013-04-05T05:53:10+00:00] INFO: Processing package[apache2] action install (apache2::default line 20)
[2013-04-05T05:53:25+00:00] INFO: Processing service[apache2] action enable (apache2::default line 24)
[2013-04-05T05:53:25+00:00] INFO: Processing directory[/etc/apache2/ssl] action create (apache2::default line 131)
[2013-04-05T05:53:25+00:00] INFO: directory[/etc/apache2/ssl] created directory /etc/apache2/ssl
[2013-04-05T05:53:25+00:00] INFO: directory[/etc/apache2/ssl] owner changed to 0
[2013-04-05T05:53:25+00:00] INFO: directory[/etc/apache2/ssl] group changed to 0
[2013-04-05T05:53:25+00:00] INFO: directory[/etc/apache2/ssl] mode changed to 755
[2013-04-05T05:53:25+00:00] INFO: Processing directory[/etc/apache2/conf.d] action create (apache2::default line 137)
[2013-04-05T05:53:25+00:00] INFO: Processing directory[/var/cache/apache2] action create (apache2::default line 143)
[2013-04-05T05:53:25+00:00] INFO: directory[/var/cache/apache2] owner changed to 0
[2013-04-05T05:53:25+00:00] INFO: directory[/var/cache/apache2] group changed to 0
[2013-04-05T05:53:25+00:00] INFO: Processing template[/etc/sysconfig/httpd] action create (apache2::default line 150)
[2013-04-05T05:53:25+00:00] INFO: Processing template[apache2.conf] action create (apache2::default line 159)
[2013-04-05T05:53:25+00:00] INFO: template[apache2.conf] backed up to /var/chef/backup/etc/apache2/apache2.conf.chef-20130405055325
[2013-04-05T05:53:25+00:00] INFO: template[apache2.conf] updated content
[2013-04-05T05:53:25+00:00] INFO: template[apache2.conf] owner changed to 0
[2013-04-05T05:53:25+00:00] INFO: template[apache2.conf] group changed to 0
[2013-04-05T05:53:25+00:00] INFO: template[apache2.conf] mode changed to 644
[2013-04-05T05:53:25+00:00] INFO: Processing template[apache2-conf-security] action create (apache2::default line 175)
[2013-04-05T05:53:25+00:00] INFO: template[apache2-conf-security] updated content
[2013-04-05T05:53:25+00:00] INFO: template[apache2-conf-security] owner changed to 0
[2013-04-05T05:53:25+00:00] INFO: template[apache2-conf-security] group changed to 0
[2013-04-05T05:53:25+00:00] INFO: template[apache2-conf-security] mode changed to 644
[2013-04-05T05:53:25+00:00] INFO: template[apache2-conf-security] not queuing delayed action restart on service[apache2] (delayed), as it's already been queued
[2013-04-05T05:53:25+00:00] INFO: Processing template[apache2-conf-charset] action create (apache2::default line 185)
[2013-04-05T05:53:25+00:00] INFO: Processing template[/etc/apache2/ports.conf] action create (apache2::default line 195)
[2013-04-05T05:53:25+00:00] INFO: template[/etc/apache2/ports.conf] backed up to /var/chef/backup/etc/apache2/ports.conf.chef-20130405055325
[2013-04-05T05:53:25+00:00] INFO: template[/etc/apache2/ports.conf] updated content
[2013-04-05T05:53:25+00:00] INFO: template[/etc/apache2/ports.conf] owner changed to 0
[2013-04-05T05:53:25+00:00] INFO: template[/etc/apache2/ports.conf] group changed to 0
[2013-04-05T05:53:25+00:00] INFO: template[/etc/apache2/ports.conf] mode changed to 644
[2013-04-05T05:53:25+00:00] INFO: template[/etc/apache2/ports.conf] not queuing delayed action restart on service[apache2] (delayed), as it's already been queued
[2013-04-05T05:53:25+00:00] INFO: Processing template[/etc/apache2/sites-available/default] action create (apache2::default line 204)
[2013-04-05T05:53:26+00:00] INFO: template[/etc/apache2/sites-available/default] backed up to /var/chef/backup/etc/apache2/sites-available/default.chef-20130405055326
[2013-04-05T05:53:26+00:00] INFO: template[/etc/apache2/sites-available/default] updated content
[2013-04-05T05:53:26+00:00] INFO: template[/etc/apache2/sites-available/default] owner changed to 0
[2013-04-05T05:53:26+00:00] INFO: template[/etc/apache2/sites-available/default] group changed to 0
[2013-04-05T05:53:26+00:00] INFO: template[/etc/apache2/sites-available/default] mode changed to 644
[2013-04-05T05:53:26+00:00] INFO: template[/etc/apache2/sites-available/default] not queuing delayed action restart on service[apache2] (delayed), as it's already been queued
[2013-04-05T05:53:26+00:00] INFO: Processing template[/etc/apache2/mods-available/status.conf] action create (apache2::mod_status line 21)
[2013-04-05T05:53:26+00:00] INFO: template[/etc/apache2/mods-available/status.conf] backed up to /var/chef/backup/etc/apache2/mods-available/status.conf.chef-20130405055326
[2013-04-05T05:53:26+00:00] INFO: template[/etc/apache2/mods-available/status.conf] updated content
[2013-04-05T05:53:26+00:00] INFO: template[/etc/apache2/mods-available/status.conf] mode changed to 644
[2013-04-05T05:53:26+00:00] INFO: template[/etc/apache2/mods-available/status.conf] not queuing delayed action restart on service[apache2] (delayed), as it's already been queued
[2013-04-05T05:53:26+00:00] INFO: Processing execute[a2enmod status] action run (apache2::mod_status line 38)
[2013-04-05T05:53:26+00:00] INFO: Processing template[/etc/apache2/mods-available/alias.conf] action create (apache2::mod_alias line 21)
[2013-04-05T05:53:26+00:00] INFO: template[/etc/apache2/mods-available/alias.conf] backed up to /var/chef/backup/etc/apache2/mods-available/alias.conf.chef-20130405055326
[2013-04-05T05:53:26+00:00] INFO: template[/etc/apache2/mods-available/alias.conf] updated content
[2013-04-05T05:53:26+00:00] INFO: template[/etc/apache2/mods-available/alias.conf] mode changed to 644
[2013-04-05T05:53:26+00:00] INFO: template[/etc/apache2/mods-available/alias.conf] not queuing delayed action restart on service[apache2] (delayed), as it's already been queued
[2013-04-05T05:53:26+00:00] INFO: Processing execute[a2enmod alias] action run (apache2::mod_alias line 38)
[2013-04-05T05:53:26+00:00] INFO: Processing execute[a2enmod auth_basic] action run (apache2::mod_auth_basic line 38)
[2013-04-05T05:53:26+00:00] INFO: Processing execute[a2enmod authn_file] action run (apache2::mod_authn_file line 38)
[2013-04-05T05:53:26+00:00] INFO: Processing execute[a2enmod authz_default] action run (apache2::mod_authz_default line 38)
[2013-04-05T05:53:26+00:00] INFO: Processing execute[a2enmod authz_groupfile] action run (apache2::mod_authz_groupfile line 38)
[2013-04-05T05:53:26+00:00] INFO: Processing execute[a2enmod authz_host] action run (apache2::mod_authz_host line 38)
[2013-04-05T05:53:26+00:00] INFO: Processing execute[a2enmod authz_user] action run (apache2::mod_authz_user line 38)
[2013-04-05T05:53:26+00:00] INFO: Processing template[/etc/apache2/mods-available/autoindex.conf] action create (apache2::mod_autoindex line 21)
[2013-04-05T05:53:26+00:00] INFO: Processing execute[a2enmod autoindex] action run (apache2::mod_autoindex line 38)
[2013-04-05T05:53:26+00:00] INFO: Processing template[/etc/apache2/mods-available/dir.conf] action create (apache2::mod_dir line 21)
[2013-04-05T05:53:26+00:00] INFO: Processing execute[a2enmod dir] action run (apache2::mod_dir line 38)
[2013-04-05T05:53:26+00:00] INFO: Processing execute[a2enmod env] action run (apache2::mod_env line 38)
[2013-04-05T05:53:26+00:00] INFO: Processing template[/etc/apache2/mods-available/mime.conf] action create (apache2::mod_mime line 21)
[2013-04-05T05:53:26+00:00] INFO: template[/etc/apache2/mods-available/mime.conf] backed up to /var/chef/backup/etc/apache2/mods-available/mime.conf.chef-20130405055326
[2013-04-05T05:53:26+00:00] INFO: template[/etc/apache2/mods-available/mime.conf] updated content
[2013-04-05T05:53:26+00:00] INFO: template[/etc/apache2/mods-available/mime.conf] mode changed to 644
[2013-04-05T05:53:26+00:00] INFO: template[/etc/apache2/mods-available/mime.conf] not queuing delayed action restart on service[apache2] (delayed), as it's already been queued
[2013-04-05T05:53:26+00:00] INFO: Processing execute[a2enmod mime] action run (apache2::mod_mime line 38)
[2013-04-05T05:53:26+00:00] INFO: Processing template[/etc/apache2/mods-available/negotiation.conf] action create (apache2::mod_negotiation line 21)
[2013-04-05T05:53:26+00:00] INFO: Processing execute[a2enmod negotiation] action run (apache2::mod_negotiation line 38)
[2013-04-05T05:53:26+00:00] INFO: Processing template[/etc/apache2/mods-available/setenvif.conf] action create (apache2::mod_setenvif line 21)
[2013-04-05T05:53:26+00:00] INFO: template[/etc/apache2/mods-available/setenvif.conf] backed up to /var/chef/backup/etc/apache2/mods-available/setenvif.conf.chef-20130405055326
[2013-04-05T05:53:26+00:00] INFO: template[/etc/apache2/mods-available/setenvif.conf] updated content
[2013-04-05T05:53:26+00:00] INFO: template[/etc/apache2/mods-available/setenvif.conf] mode changed to 644
[2013-04-05T05:53:26+00:00] INFO: template[/etc/apache2/mods-available/setenvif.conf] not queuing delayed action restart on service[apache2] (delayed), as it's already been queued
[2013-04-05T05:53:26+00:00] INFO: Processing execute[a2enmod setenvif] action run (apache2::mod_setenvif line 38)
[2013-04-05T05:53:26+00:00] INFO: Processing execute[a2dissite default] action run (apache2::default line 34)
[2013-04-05T05:53:26+00:00] INFO: execute[a2dissite default] ran successfully
[2013-04-05T05:53:26+00:00] INFO: Processing service[apache2] action start (apache2::default line 221)
[2013-04-05T05:53:27+00:00] INFO: Processing execute[a2enmod rewrite] action run (apache2::mod_rewrite line 38)
[2013-04-05T05:53:27+00:00] INFO: execute[a2enmod rewrite] ran successfully
[2013-04-05T05:53:27+00:00] INFO: execute[a2enmod rewrite] not queuing delayed action restart on service[apache2] (delayed), as it's already been queued
[2013-04-05T05:53:27+00:00] INFO: Processing package[build-essential] action install (build-essential::default line 51)
[2013-04-05T05:53:27+00:00] INFO: Processing package[binutils-doc] action install (build-essential::default line 51)
[2013-04-05T05:53:31+00:00] INFO: Processing package[autoconf] action install (build-essential::default line 58)
[2013-04-05T05:53:40+00:00] INFO: Processing package[flex] action install (build-essential::default line 58)
[2013-04-05T05:53:46+00:00] INFO: Processing package[bison] action install (build-essential::default line 58)
[2013-04-05T05:53:51+00:00] INFO: Processing package[apache2-prefork-dev] action upgrade (passenger_apache2::source line 40)
[2013-04-05T05:54:30+00:00] INFO: package[apache2-prefork-dev] upgraded from uninstalled to 2.2.22-1ubuntu1.3
[2013-04-05T05:54:30+00:00] INFO: Processing package[libapr1-dev] action upgrade (passenger_apache2::source line 40)
[2013-04-05T05:54:30+00:00] INFO: Processing package[libcurl4-gnutls-dev] action upgrade (passenger_apache2::source line 40)
[2013-04-05T05:54:58+00:00] INFO: package[libcurl4-gnutls-dev] upgraded from uninstalled to 7.22.0-3ubuntu4
[2013-04-05T05:54:58+00:00] INFO: Processing gem_package[passenger] action install (passenger_apache2::source line 46)
[2013-04-05T05:55:10+00:00] INFO: Processing execute[passenger_module] action run (passenger_apache2::source line 50)
[2013-04-05T05:57:15+00:00] INFO: execute[passenger_module] ran successfully
[2013-04-05T05:57:15+00:00] INFO: Processing execute[a2enmod passenger] action run (passenger_apache2::default line 38)

================================================================================

Error executing action `run` on resource 'execute[a2enmod passenger]'

================================================================================

Mixlib::ShellOut::ShellCommandFailed

------------------------------------

Expected process to exit with [0], but received '1'
---- Begin output of /usr/sbin/a2enmod passenger ----
STDOUT: 
STDERR: ERROR: Module passenger does not exist!
---- End output of /usr/sbin/a2enmod passenger ----
Ran /usr/sbin/a2enmod passenger returned 1

Resource Declaration:

---------------------

# In /tmp/vagrant-chef-1/chef-solo-1/cookbooks/apache2/definitions/apache_module.rb

 38:     execute "a2enmod #{params[:name]}" do
 39:       command "/usr/sbin/a2enmod #{params[:name]}"
 40:       notifies :restart, resources(:service => "apache2")
 41:       not_if do (::File.symlink?("#{node['apache']['dir']}/mods-enabled/#{params[:name]}.load") and
 42:         ((::File.exists?("#{node['apache']['dir']}/mods-available/#{params[:name]}.conf"))?
 43:           (::File.symlink?("#{node['apache']['dir']}/mods-enabled/#{params[:name]}.conf")):(true)))
 44:       end
 45:     end
 46:   else

Compiled Resource:

------------------

# Declared in /tmp/vagrant-chef-1/chef-solo-1/cookbooks/apache2/definitions/apache_module.rb:38:in `block in from_file'

execute("a2enmod passenger") do
  params {:enable=>true, :conf=>false, :module_path=>"/opt/chef/embedded/lib/ruby/gems/1.9.1/gems/passenger-3.0.19/ext/apache2/mod_passenger.so", :name=>"passenger", :filename=>"mod_passenger.so"}
  action "run"
  retries 0
  retry_delay 2
  command "/usr/sbin/a2enmod passenger"
  backup 5
  returns 0
  cookbook_name :passenger_apache2
  recipe_name "default"
  not_if { #code block }
end

[2013-04-05T05:57:16+00:00] ERROR: Running exception handlers
[2013-04-05T05:57:16+00:00] ERROR: Exception handlers complete
[2013-04-05T05:57:16+00:00] FATAL: Stacktrace dumped to /tmp/vagrant-chef-1/chef-stacktrace.out
[2013-04-05T05:57:16+00:00] FATAL: Mixlib::ShellOut::ShellCommandFailed: execute[a2enmod passenger] (passenger_apache2::default line 38) had an error: Mixlib::ShellOut::ShellCommandFailed: Expected process to exit with [0], but received '1'
---- Begin output of /usr/sbin/a2enmod passenger ----
STDOUT: 
STDERR: ERROR: Module passenger does not exist!
---- End output of /usr/sbin/a2enmod passenger ----
Ran /usr/sbin/a2enmod passenger returned 1
Chef never successfully completed! Any errors should be visible in the
output above. Please fix your recipes so that they properly complete.
btomasini commented 11 years ago

This appears to be an issue with the passenger_apache2 cookbook. I get the same behavior when I run it alone. I have opened a support ticket with Opscode.

juanje commented 11 years ago

Hi, It really does seem to be a passenger_apache2 cookbook's issue. Thanks for testing the cookbook and for the feedback. I'll try myself to confirm if it's really a upstream issue.

Azrael808 commented 11 years ago

Hey, do you have a reference/link for that ticket? I'm having the same problem myself! Thx. :)

btomasini commented 11 years ago

This issue has been resolved as part of a refactoring effort. Try this branch: https://github.com/juanje/cookbook-redmine/tree/refactoring