Hi All,
While doing bootstrap I am getting below error.
====
192.168.63.130 * postgresql_database_user[postgresjira] action createIgnoring mysql2-0.3.17 because its extensions are not built. Try: gem pristine
mysql2 --version 0.3.17
192.168.63.130 Ignoring pg-0.18.4 because its extensions are not built. Try: gem pristine pg --version 0.18.4
192.168.63.130 [2016-09-07T19:02:23+02:00] FATAL: Could not load the required pg gem. Make sure to include the database::postgresql or postgresql::rub
y recipes in your runlist
192.168.63.130
192.168.63.130
192.168.63.130 ================================================================================
192.168.63.130 Error executing action create
on resource 'postgresql_database_user[postgresjira]'
192.168.63.130 ================================================================================
192.168.63.130
192.168.63.130 LoadError
192.168.63.130 ---------
192.168.63.130 cannot load such file – pg
192.168.63.130
192.168.63.130 Cookbook Trace:
192.168.63.130 ---------------
192.168.63.130 /var/chef/cache/cookbooks/database/libraries/provider_database_postgresql_user.rb:32:in load_current_resource' 192.168.63.130 /var/chef/cache/cookbooks/compat_resource/files/lib/chef_compat/monkeypatches/chef/runner.rb:41:in
run_action’
192.168.63.130
192.168.63.130 Resource Declaration:
192.168.63.130 ---------------------
192.168.63.130 # In /var/chef/cache/cookbooks/jira/recipes/database.rb
192.168.63.130
192.168.63.130 20: postgresql_database_user node[‘jira’][‘dbuser’] do
192.168.63.130 21: connection postgresql_connection_info
192.168.63.130 22: password node[‘jira’][‘dbpassword’]
192.168.63.130 23: action :create
192.168.63.130 24: end
192.168.63.130 25:
192.168.63.130
192.168.63.130 Compiled Resource:
192.168.63.130 ------------------
192.168.63.130 # Declared in /var/chef/cache/cookbooks/jira/recipes/database.rb:20:in `from_file’
192.168.63.130
192.168.63.130 postgresql_database_user(“postgresjira”) do
192.168.63.130 provider Chef::Provider::Database::PostgresqlUser
192.168.63.130 action [:create]
192.168.63.130 retries 0
192.168.63.130 retry_delay 2
192.168.63.130 default_guard_interpreter :default
192.168.63.130 username "postgresjira"
192.168.63.130 host "localhost"
192.168.63.130 privileges [:all]
192.168.63.130 login true
192.168.63.130 declared_type :postgresql_database_user
192.168.63.130 cookbook_name "jira"
192.168.63.130 recipe_name "database"
192.168.63.130 connection {:host=>“default-centos-72”, :port=>5432, :username=>“postgres”, :password=>“9iwRm09+gZBUZ8zr/I/K”}
192.168.63.130 password "postgresjira"
192.168.63.130 end
192.168.63.130
192.168.63.130 Platform:
192.168.63.130 ---------
192.168.63.130 x86_64-linux
192.168.63.130
192.168.63.130
192.168.63.130 Running handlers:
192.168.63.130 [2016-09-07T19:02:23+02:00] ERROR: Running exception handlers
192.168.63.130 Running handlers complete
192.168.63.130 [2016-09-07T19:02:23+02:00] ERROR: Exception handlers complete
192.168.63.130 Chef Client failed. 2 resources updated in 21 seconds
192.168.63.130 [2016-09-07T19:02:24+02:00] FATAL: Stacktrace dumped to /var/chef/cache/chef-stacktrace.out
192.168.63.130 [2016-09-07T19:02:24+02:00] FATAL: Please provide the contents of the stacktrace.out file if you file a bug report
192.168.63.130 [2016-09-07T19:02:24+02:00] ERROR: postgresql_database_user[postgresjira] (jira::database line 20) had an error: LoadError: cannot load
such file – pg
192.168.63.130 [2016-09-07T19:02:25+02:00] FATAL: Chef::Exceptions::ChildConvergeError: Chef run process exited unsuccessfully (exit code 1)
I have already added recipe database::postgresql
I have tried the same chef script on local setup using kitchen and it is working fine.
Thanks and Regards,