Skip to content

Instantly share code, notes, and snippets.

@christopherhan
Created August 4, 2014 23:16
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save christopherhan/8e0034ffbe55b714c3b3 to your computer and use it in GitHub Desktop.
Save christopherhan/8e0034ffbe55b714c3b3 to your computer and use it in GitHub Desktop.
Starting Chef Client, version 11.14.2
resolving cookbooks for run list: ["iw-app::default", "iw-app::db", "iw-app::nodejs", "iw-app::uwsgi", "iw-app::supervisor", "iw-app::nginx", "iw-app::deploy"]
Synchronizing Cookbooks:
- iw-app
- ark
- windows
- chef_handler
- 7-zip
- iw-search
- apt
- java
- elasticsearch
- users
- build-essential
- aws
- nginx
- yum
- runit
- yum-epel
- ohai
- hostsfile
- python
- locale
- database
- mysql
- yum-mysql-community
- postgresql
- openssl
- chef-sugar
- xfs
- mysql-chef_gem
- application
- application_python
- gunicorn
- supervisor
- postgis
- nodejs
- npm
- jenkins
- apache2
- iptables
- logrotate
- pacman
- freebsd
- rbenv
- git
- dmg
- rabbitmq
- erlang
- yum-erlang_solutions
- memcached
- varnish
Compiling Cookbooks...
[2014-08-04T23:14:00+00:00] WARN: Missing gem 'right_aws'
[2014-08-04T23:14:02+00:00] WARN: Chef::Mixin::RecipeDefinitionDSLCore is deprecated. Use Chef::DSL::Recipe instead.
[2014-08-04T23:14:02+00:00] WARN: Called from:
/var/chef/cache/cookbooks/application/resources/default.rb:23:in `class_from_file'
/opt/chef/embedded/lib/ruby/gems/1.9.1/gems/chef-11.14.2/lib/chef/mixin/from_file.rb:42:in `class_eval'
/opt/chef/embedded/lib/ruby/gems/1.9.1/gems/chef-11.14.2/lib/chef/mixin/from_file.rb:42:in `class_from_file'
Recipe: build-essential::default
* execute[apt-get-update-build-essentials] action run (skipped due to not_if)
* package[build-essential] action install (up to date)
* package[binutils-doc] action install (up to date)
* package[autoconf] action install (up to date)
* package[flex] action install (up to date)
* package[bison] action install (up to date)
[2014-08-04T23:14:03+00:00] WARN: Cloning resource attributes for execute[apt-get-update] from prior resource (CHEF-3694)
[2014-08-04T23:14:03+00:00] WARN: Previous execute[apt-get-update]: /var/chef/cache/cookbooks/apt/recipes/default.rb:29:in `from_file'
[2014-08-04T23:14:03+00:00] WARN: Current execute[apt-get-update]: /var/chef/cache/cookbooks/apt/recipes/default.rb:38:in `from_file'
[2014-08-04T23:14:03+00:00] WARN: Cloning resource attributes for package[git] from prior resource (CHEF-3694)
[2014-08-04T23:14:03+00:00] WARN: Previous package[git]: /var/chef/cache/cookbooks/iw-app/recipes/default.rb:35:in `from_file'
[2014-08-04T23:14:03+00:00] WARN: Current package[git]: /var/chef/cache/cookbooks/git/recipes/default.rb:24:in `from_file'
[2014-08-04T23:14:03+00:00] WARN: Cloning resource attributes for package[zlib1g-dev] from prior resource (CHEF-3694)
[2014-08-04T23:14:03+00:00] WARN: Previous package[zlib1g-dev]: /var/chef/cache/cookbooks/iw-app/recipes/default.rb:69:in `from_file'
[2014-08-04T23:14:03+00:00] WARN: Current package[zlib1g-dev]: /var/chef/cache/cookbooks/rbenv/recipes/default.rb:56:in `from_file'
[2014-08-04T23:14:03+00:00] WARN: Cloning resource attributes for package[libxml2-dev] from prior resource (CHEF-3694)
[2014-08-04T23:14:03+00:00] WARN: Previous package[libxml2-dev]: /var/chef/cache/cookbooks/iw-app/recipes/default.rb:73:in `from_file'
[2014-08-04T23:14:03+00:00] WARN: Current package[libxml2-dev]: /var/chef/cache/cookbooks/rbenv/recipes/default.rb:67:in `from_file'
[2014-08-04T23:14:03+00:00] WARN: Cloning resource attributes for package[libxslt1-dev] from prior resource (CHEF-3694)
[2014-08-04T23:14:03+00:00] WARN: Previous package[libxslt1-dev]: /var/chef/cache/cookbooks/iw-app/recipes/default.rb:74:in `from_file'
[2014-08-04T23:14:03+00:00] WARN: Current package[libxslt1-dev]: /var/chef/cache/cookbooks/rbenv/recipes/default.rb:68:in `from_file'
[2014-08-04T23:14:03+00:00] WARN: Cloning resource attributes for ruby_block[set HOME for rbenv at 1407194043] from prior resource (CHEF-3694)
[2014-08-04T23:14:03+00:00] WARN: Previous ruby_block[set HOME for rbenv at 1407194043]: /var/chef/cache/cookbooks/rbenv/libraries/chef_mixin_rbenv.rb:111:in `with_home_for_user'
[2014-08-04T23:14:03+00:00] WARN: Current ruby_block[set HOME for rbenv at 1407194043]: /var/chef/cache/cookbooks/rbenv/libraries/chef_mixin_rbenv.rb:111:in `with_home_for_user'
[2014-08-04T23:14:03+00:00] WARN: Cloning resource attributes for ruby_block[unset HOME for rbenv 1407194043] from prior resource (CHEF-3694)
[2014-08-04T23:14:03+00:00] WARN: Previous ruby_block[unset HOME for rbenv 1407194043]: /var/chef/cache/cookbooks/rbenv/libraries/chef_mixin_rbenv.rb:125:in `with_home_for_user'
[2014-08-04T23:14:03+00:00] WARN: Current ruby_block[unset HOME for rbenv 1407194043]: /var/chef/cache/cookbooks/rbenv/libraries/chef_mixin_rbenv.rb:125:in `with_home_for_user'
[2014-08-04T23:14:03+00:00] WARN: Cloning resource attributes for execute[apt-get update] from prior resource (CHEF-3694)
[2014-08-04T23:14:03+00:00] WARN: Previous execute[apt-get update]: /var/chef/cache/cookbooks/apt/recipes/default.rb:46:in `from_file'
[2014-08-04T23:14:03+00:00] WARN: Current execute[apt-get update]: /var/chef/cache/cookbooks/postgresql/recipes/ruby.rb:29:in `rescue in from_file'
Recipe: postgresql::client
* package[postgresql-client-9.1] action install (up to date)
* package[libpq-dev] action install (up to date)
Recipe: postgresql::ruby
* chef_gem[pg] action install
================================================================================
Error executing action `install` on resource 'chef_gem[pg]'
================================================================================
Mixlib::ShellOut::ShellCommandFailed
------------------------------------
Expected process to exit with [0], but received '1'
---- Begin output of /opt/chef/embedded/bin/gem install pg -q --no-rdoc --no-ri -v "0.17.1" ----
STDOUT: Building native extensions. This could take a while...
STDERR: ERROR: Error installing pg:
ERROR: Failed to build gem native extension.
/opt/chef/embedded/bin/ruby extconf.rb
checking for pg_config... yes
Using config values from /usr/bin/pg_config
checking for libpq-fe.h... yes
checking for libpq/libpq-fs.h... yes
checking for pg_config_manual.h... yes
checking for PQconnectdb() in -lpq... no
checking for PQconnectdb() in -llibpq... no
checking for PQconnectdb() in -lms/libpq... no
Can't find the PostgreSQL client library (libpq)
*** extconf.rb failed ***
Could not create Makefile due to some reason, probably lack of
necessary libraries and/or headers. Check the mkmf.log file for more
details. You may need configuration options.
Provided configuration options:
--with-opt-dir
--with-opt-include
--without-opt-include=${opt-dir}/include
--with-opt-lib
--without-opt-lib=${opt-dir}/lib
--with-make-prog
--without-make-prog
--srcdir=.
--curdir
--ruby=/opt/chef/embedded/bin/ruby
--with-pg
--without-pg
--with-pg-config
--without-pg-config
--with-pg_config
--without-pg_config
--with-pg-dir
--without-pg-dir
--with-pg-include
--without-pg-include=${pg-dir}/include
--with-pg-lib
--without-pg-lib=${pg-dir}/lib
--with-pqlib
--without-pqlib
--with-libpqlib
--without-libpqlib
--with-ms/libpqlib
--without-ms/libpqlib
Gem files will remain installed in /opt/chef/embedded/lib/ruby/gems/1.9.1/gems/pg-0.17.1 for inspection.
Results logged to /opt/chef/embedded/lib/ruby/gems/1.9.1/gems/pg-0.17.1/ext/gem_make.out
---- End output of /opt/chef/embedded/bin/gem install pg -q --no-rdoc --no-ri -v "0.17.1" ----
Ran /opt/chef/embedded/bin/gem install pg -q --no-rdoc --no-ri -v "0.17.1" returned 1
Cookbook Trace:
---------------
/var/chef/cache/cookbooks/postgresql/recipes/ruby.rb:58:in `rescue in from_file'
/var/chef/cache/cookbooks/postgresql/recipes/ruby.rb:24:in `from_file'
/var/chef/cache/cookbooks/database/recipes/postgresql.rb:20:in `from_file'
/var/chef/cache/cookbooks/iw-app/recipes/db.rb:10:in `from_file'
Resource Declaration:
---------------------
# In /var/chef/cache/cookbooks/postgresql/recipes/ruby.rb
58: chef_gem "pg"
59: rescue Gem::Installer::ExtensionBuildError => e
Compiled Resource:
------------------
# Declared in /var/chef/cache/cookbooks/postgresql/recipes/ruby.rb:58:in `rescue in from_file'
chef_gem("pg") do
provider Chef::Provider::Package::Rubygems
action :install
retries 0
retry_delay 2
guard_interpreter :default
package_name "pg"
version "0.17.1"
timeout 900
gem_binary "/opt/chef/embedded/bin/gem"
cookbook_name "postgresql"
recipe_name "ruby"
end
================================================================================
Recipe Compile Error in /var/chef/cache/cookbooks/iw-app/recipes/db.rb
================================================================================
Mixlib::ShellOut::ShellCommandFailed
------------------------------------
chef_gem[pg] (postgresql::ruby line 58) had an error: Mixlib::ShellOut::ShellCommandFailed: Expected process to exit with [0], but received '1'
---- Begin output of /opt/chef/embedded/bin/gem install pg -q --no-rdoc --no-ri -v "0.17.1" ----
STDOUT: Building native extensions. This could take a while...
STDERR: ERROR: Error installing pg:
ERROR: Failed to build gem native extension.
/opt/chef/embedded/bin/ruby extconf.rb
checking for pg_config... yes
Using config values from /usr/bin/pg_config
checking for libpq-fe.h... yes
checking for libpq/libpq-fs.h... yes
checking for pg_config_manual.h... yes
checking for PQconnectdb() in -lpq... no
checking for PQconnectdb() in -llibpq... no
checking for PQconnectdb() in -lms/libpq... no
Can't find the PostgreSQL client library (libpq)
*** extconf.rb failed ***
Could not create Makefile due to some reason, probably lack of
necessary libraries and/or headers. Check the mkmf.log file for more
details. You may need configuration options.
Provided configuration options:
--with-opt-dir
--with-opt-include
--without-opt-include=${opt-dir}/include
--with-opt-lib
--without-opt-lib=${opt-dir}/lib
--with-make-prog
--without-make-prog
--srcdir=.
--curdir
--ruby=/opt/chef/embedded/bin/ruby
--with-pg
--without-pg
--with-pg-config
--without-pg-config
--with-pg_config
--without-pg_config
--with-pg-dir
--without-pg-dir
--with-pg-include
--without-pg-include=${pg-dir}/include
--with-pg-lib
--without-pg-lib=${pg-dir}/lib
--with-pqlib
--without-pqlib
--with-libpqlib
--without-libpqlib
--with-ms/libpqlib
--without-ms/libpqlib
Gem files will remain installed in /opt/chef/embedded/lib/ruby/gems/1.9.1/gems/pg-0.17.1 for inspection.
Results logged to /opt/chef/embedded/lib/ruby/gems/1.9.1/gems/pg-0.17.1/ext/gem_make.out
---- End output of /opt/chef/embedded/bin/gem install pg -q --no-rdoc --no-ri -v "0.17.1" ----
Ran /opt/chef/embedded/bin/gem install pg -q --no-rdoc --no-ri -v "0.17.1" returned 1
Cookbook Trace:
---------------
/var/chef/cache/cookbooks/postgresql/recipes/ruby.rb:58:in `rescue in from_file'
/var/chef/cache/cookbooks/postgresql/recipes/ruby.rb:24:in `from_file'
/var/chef/cache/cookbooks/database/recipes/postgresql.rb:20:in `from_file'
/var/chef/cache/cookbooks/iw-app/recipes/db.rb:10:in `from_file'
Relevant File Content:
----------------------
/var/chef/cache/cookbooks/postgresql/recipes/ruby.rb:
51: end
52:
53: node['postgresql']['client']['packages'].each do |pg_pack|
54: resources("package[#{pg_pack}]").run_action(:install)
55: end
56:
57: begin
58>> chef_gem "pg"
59: rescue Gem::Installer::ExtensionBuildError => e
60: # Are we an omnibus install?
61: raise if RbConfig.ruby.scan(%r{(chef|opscode)}).empty?
62: # Still here, must be omnibus. Lets make this thing install!
63: Chef::Log.warn 'Failed to properly build pg gem. Forcing properly linking and retrying (omnibus fix)'
64: gem_dir = e.message.scan(%r{will remain installed in ([^ ]+)}).flatten.first
65: raise unless gem_dir
66: gem_name = File.basename(gem_dir)
67: ext_dir = File.join(gem_dir, 'ext')
Running handlers:
[2014-08-04T23:14:06+00:00] ERROR: Running exception handlers
Running handlers complete
[2014-08-04T23:14:06+00:00] ERROR: Exception handlers complete
[2014-08-04T23:14:06+00:00] FATAL: Stacktrace dumped to /var/chef/cache/chef-stacktrace.out
Chef Client failed. 0 resources updated in 34.422955675 seconds
[2014-08-04T23:14:07+00:00] ERROR: chef_gem[pg] (postgresql::ruby line 58) had an error: Mixlib::ShellOut::ShellCommandFailed: Expected process to exit with [0], but received '1'
---- Begin output of /opt/chef/embedded/bin/gem install pg -q --no-rdoc --no-ri -v "0.17.1" ----
STDOUT: Building native extensions. This could take a while...
STDERR: ERROR: Error installing pg:
ERROR: Failed to build gem native extension.
/opt/chef/embedded/bin/ruby extconf.rb
checking for pg_config... yes
Using config values from /usr/bin/pg_config
checking for libpq-fe.h... yes
checking for libpq/libpq-fs.h... yes
checking for pg_config_manual.h... yes
checking for PQconnectdb() in -lpq... no
checking for PQconnectdb() in -llibpq... no
checking for PQconnectdb() in -lms/libpq... no
Can't find the PostgreSQL client library (libpq)
*** extconf.rb failed ***
Could not create Makefile due to some reason, probably lack of
necessary libraries and/or headers. Check the mkmf.log file for more
details. You may need configuration options.
Provided configuration options:
--with-opt-dir
--with-opt-include
--without-opt-include=${opt-dir}/include
--with-opt-lib
--without-opt-lib=${opt-dir}/lib
--with-make-prog
--without-make-prog
--srcdir=.
--curdir
--ruby=/opt/chef/embedded/bin/ruby
--with-pg
--without-pg
--with-pg-config
--without-pg-config
--with-pg_config
--without-pg_config
--with-pg-dir
--without-pg-dir
--with-pg-include
--without-pg-include=${pg-dir}/include
--with-pg-lib
--without-pg-lib=${pg-dir}/lib
--with-pqlib
--without-pqlib
--with-libpqlib
--without-libpqlib
--with-ms/libpqlib
--without-ms/libpqlib
Gem files will remain installed in /opt/chef/embedded/lib/ruby/gems/1.9.1/gems/pg-0.17.1 for inspection.
Results logged to /opt/chef/embedded/lib/ruby/gems/1.9.1/gems/pg-0.17.1/ext/gem_make.out
---- End output of /opt/chef/embedded/bin/gem install pg -q --no-rdoc --no-ri -v "0.17.1" ----
Ran /opt/chef/embedded/bin/gem install pg -q --no-rdoc --no-ri -v "0.17.1" returned 1
[2014-08-04T23:14:07+00:00] FATAL: Chef::Exceptions::ChildConvergeError: Chef run process exited unsuccessfully (exit code 1)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment