Net::SSH::Exception: could not settle on compression_client algorithm - capistrano

I'm learning / creating my first Capistrano deployment.
However, I ran into issue before I could get anything working or even tested.
When I run any command, I get mentioned error.
I can ssh to terminal manually.
Here's full debug output:
cap production deploy:check --trace
** Invoke production (first_time)
** Execute production
** Invoke load:defaults (first_time)
** Execute load:defaults
** Invoke deploy:check (first_time)
** Invoke git:check (first_time)
** Invoke git:wrapper (first_time)
** Execute git:wrapper
00:00 git:wrapper
01 mkdir -p /tmp
D, [2017-01-04T11:18:09.551896 #25214] DEBUG -- net.ssh.transport.session[119d510]: establishing connection to gate.paas.datacenter.fi:3022
D, [2017-01-04T11:18:09.589776 #25214] DEBUG -- net.ssh.transport.session[119d510]: connection established
I, [2017-01-04T11:18:09.590718 #25214] INFO -- net.ssh.transport.server_version[119cd54]: negotiating protocol version
D, [2017-01-04T11:18:09.591139 #25214] DEBUG -- net.ssh.transport.server_version[119cd54]: local is `SSH-2.0-Ruby/Net::SSH_4.0.0 x86_64-linux-gnu'
D, [2017-01-04T11:18:09.604129 #25214] DEBUG -- net.ssh.transport.server_version[119cd54]: remote is `SSH-2.0-JSSHProxy'
I, [2017-01-04T11:18:09.605222 #25214] INFO -- net.ssh.transport.algorithms[119c520]: sending KEXINIT
D, [2017-01-04T11:18:09.605828 #25214] DEBUG -- socket[119d1dc]: queueing packet nr 0 type 20 len 1140
D, [2017-01-04T11:18:09.606537 #25214] DEBUG -- socket[119d1dc]: sent 1144 bytes
D, [2017-01-04T11:18:09.606977 #25214] DEBUG -- socket[119d1dc]: read 400 bytes
D, [2017-01-04T11:18:09.607461 #25214] DEBUG -- socket[119d1dc]: received packet nr 0 type 20 len 396
I, [2017-01-04T11:18:09.607901 #25214] INFO -- net.ssh.transport.algorithms[119c520]: got KEXINIT from server
I, [2017-01-04T11:18:09.608375 #25214] INFO -- net.ssh.transport.algorithms[119c520]: negotiating algorithms
cap aborted!
Net::SSH::Exception: could not settle on compression_client algorithm
/var/lib/gems/2.3.0/gems/net-ssh-4.0.0/lib/net/ssh/transport/algorithms.rb:345:in `negotiate'
/var/lib/gems/2.3.0/gems/net-ssh-4.0.0/lib/net/ssh/transport/algorithms.rb:325:in `negotiate_algorithms'
/var/lib/gems/2.3.0/gems/net-ssh-4.0.0/lib/net/ssh/transport/algorithms.rb:200:in `proceed!'
/var/lib/gems/2.3.0/gems/net-ssh-4.0.0/lib/net/ssh/transport/algorithms.rb:149:in `accept_kexinit'
/var/lib/gems/2.3.0/gems/net-ssh-4.0.0/lib/net/ssh/transport/session.rb:210:in `block in poll_message'
/var/lib/gems/2.3.0/gems/net-ssh-4.0.0/lib/net/ssh/transport/session.rb:188:in `loop'
/var/lib/gems/2.3.0/gems/net-ssh-4.0.0/lib/net/ssh/transport/session.rb:188:in `poll_message'
/var/lib/gems/2.3.0/gems/net-ssh-4.0.0/lib/net/ssh/transport/session.rb:225:in `block in wait'
/var/lib/gems/2.3.0/gems/net-ssh-4.0.0/lib/net/ssh/transport/session.rb:223:in `loop'
/var/lib/gems/2.3.0/gems/net-ssh-4.0.0/lib/net/ssh/transport/session.rb:223:in `wait'
/var/lib/gems/2.3.0/gems/net-ssh-4.0.0/lib/net/ssh/transport/session.rb:88:in `initialize'
/var/lib/gems/2.3.0/gems/net-ssh-4.0.0/lib/net/ssh.rb:233:in `new'
/var/lib/gems/2.3.0/gems/net-ssh-4.0.0/lib/net/ssh.rb:233:in `start'
/var/lib/gems/2.3.0/gems/sshkit-1.11.5/lib/sshkit/backends/connection_pool.rb:59:in `call'
/var/lib/gems/2.3.0/gems/sshkit-1.11.5/lib/sshkit/backends/connection_pool.rb:59:in `with'
/var/lib/gems/2.3.0/gems/sshkit-1.11.5/lib/sshkit/backends/netssh.rb:155:in `with_ssh'
/var/lib/gems/2.3.0/gems/sshkit-1.11.5/lib/sshkit/backends/netssh.rb:108:in `execute_command'
/var/lib/gems/2.3.0/gems/sshkit-1.11.5/lib/sshkit/backends/abstract.rb:141:in `block in create_command_and_execute'
/var/lib/gems/2.3.0/gems/sshkit-1.11.5/lib/sshkit/backends/abstract.rb:141:in `tap'
/var/lib/gems/2.3.0/gems/sshkit-1.11.5/lib/sshkit/backends/abstract.rb:141:in `create_command_and_execute'
/var/lib/gems/2.3.0/gems/sshkit-1.11.5/lib/sshkit/backends/abstract.rb:74:in `execute'
/var/lib/gems/2.3.0/gems/capistrano-3.7.1/lib/capistrano/scm/tasks/git.rake:8:in `block (3 levels) in eval_rakefile'
/var/lib/gems/2.3.0/gems/sshkit-1.11.5/lib/sshkit/backends/abstract.rb:29:in `instance_exec'
/var/lib/gems/2.3.0/gems/sshkit-1.11.5/lib/sshkit/backends/abstract.rb:29:in `run'
/var/lib/gems/2.3.0/gems/sshkit-1.11.5/lib/sshkit/runners/parallel.rb:12:in `block (2 levels) in execute'
Tasks: TOP => deploy:check => git:check => git:wrapper

Try ssh -vvv your-ip, look at the logs. Use the compression_client in ssh-options like this:
set :ssh_options, {
forward_agent: true,
compression_client: "zlib"
}

Related

Unable to debug in rubymine with rspec

When running rubymine debug getting Test framework quit unexpectedly error.
Testing started at 11:41 AM ...
/bin/bash -c "env RBENV_VERSION=2.7.0 /home/workstation/.rbenv/libexec/rbenv exec bundle exec ruby /home/workstation/.rbenv/versions/2.7.0/lib/ruby/gems/2.7.0/gems/ruby-debug-ide-0.8.0.beta19/bin/rdebug-ide --key-value --step-over-in-blocks --disable-int-handler --evaluation-timeout 10 --evaluation-control --time-limit 100 --memory-limit 0 --rubymine-protocol-extensions --port 41145 --host 0.0.0.0 --dispatcher-port 37297 -- /home/workstation/.rbenv/versions/2.7.0/bin/rspec /home/workstation/workspace/railsprojects/labx/spec/requests/api/v1/sellers_request_spec.rb --require teamcity/spec/runner/formatter/teamcity/formatter --format 'Spec::Runner::Formatter::TeamcityFormatter' --example 'Api::V1::Sellers POST register'"
/home/workstation/.rbenv/versions/2.7.0/lib/ruby/gems/2.7.0/gems/debase-0.3.0.beta19/lib/debase.rb:7:in `require': cannot load such file -- debase_internals (LoadError)
from /home/workstation/.rbenv/versions/2.7.0/lib/ruby/gems/2.7.0/gems/debase-0.3.0.beta19/lib/debase.rb:7:in `<top (required)>'
from /home/workstation/.rbenv/versions/2.7.0/lib/ruby/gems/2.7.0/gems/ruby-debug-ide-0.8.0.beta19/lib/ruby-debug-ide.rb:9:in `require'
from /home/workstation/.rbenv/versions/2.7.0/lib/ruby/gems/2.7.0/gems/ruby-debug-ide-0.8.0.beta19/lib/ruby-debug-ide.rb:9:in `<top (required)>'
from /home/workstation/.rbenv/versions/2.7.0/lib/ruby/gems/2.7.0/gems/ruby-debug-ide-0.8.0.beta19/bin/rdebug-ide:8:in `require_relative'
from /home/workstation/.rbenv/versions/2.7.0/lib/ruby/gems/2.7.0/gems/ruby-debug-ide-0.8.0.beta19/bin/rdebug-ide:8:in `<main>'
Process finished with exit code 1
Versions
ruby: 2.7.0, rspec-rails: 4.0.0.pre, rails: 6-0-stable, Rubymine
2019.3.1
Only debug is failing if I run tests normally without debug it works fine. What could be the issue?

Dynamically bootstrapping Bare-Metal Nodes to Chef during Kickstart Post Script

I'm working on some automation to build my bare-metal hosts. The automation goes through a kickstart script to install CentOS 7.3, wrapping up by running some post-kickstart install scripts. One of these scripts does the necessary work to install the Chef package, copy over the certs I need, generate the appropriate files, join the node the the org, place it in an appropriate environment and role and then finally run a chef-client.
Everything seems to be working up until I get to the point where I run my chef-client --once command, which is failing on its first run. When I manually login to the box after the fact and run a manual chef-client, I have no issue, runs just fine. The only thing in my run-list is chef-client::default and chef-client::config. Chef Version 19.33.36.
Here is the snippet of bash code where I am bootstrapping to my org and then running chef-client:
cd /opt/chef/bin/
chef-client -c /etc/chef/client.rb
echo "---------------------------------------" >> /tmp/build.log
echo "chef-client -c /etc/chef/client.rb" >> /tmp/build.log
echo "---------------------------------------" >> /tmp/build.log
(cd /etc/chef && /usr/bin/knife node environment set $HOST $CHEF_ENV)
echo "---------------------------------------" >> /tmp/build.log
echo "/usr/bin/knife node environment set $HOST $CHEF_ENV" >> /tmp/build.log
echo "---------------------------------------" >> /tmp/build.log
(cd /etc/chef && /usr/bin/knife node run_list set $HOST role[$CHEF_ROLE])
echo "---------------------------------------" >> /tmp/build.log
echo "/usr/bin/knife node run_list set $HOST role[$CHEF_ROLE]" >>
/tmp/build.log
echo "---------------------------------------" >> /tmp/build.log
CHEF_RUN_OUTPUT=`chef-client --once`
echo "---------------------------------------" >> /tmp/build.log
echo "chef-client --once" >> /tmp/build.log
echo "---------------------------------------" >> /tmp/build.log
echo $CHEF_RUN_OUTPUT >> /tmp/build.log
Here is the log of what is occurring after my post script finishes:
From /var/log/chef/client.log:
[2017-08-18T10:51:51-05:00] INFO: Processing directory[/var/run/chef] action create (chef-client::systemd_service line 56)
[2017-08-18T10:51:51-05:00] INFO: directory[/var/run/chef] created directory /var/run/chef
[2017-08-18T10:51:51-05:00] INFO: directory[/var/run/chef] owner changed to 0
[2017-08-18T10:51:51-05:00] INFO: directory[/var/run/chef] group changed to 0
[2017-08-18T10:51:51-05:00] INFO: Processing directory[/var/cache/chef] action create (chef-client::systemd_service line 56)
[2017-08-18T10:51:51-05:00] INFO: directory[/var/cache/chef] created directory /var/cache/chef
[2017-08-18T10:51:51-05:00] INFO: directory[/var/cache/chef] owner changed to 0
[2017-08-18T10:51:51-05:00] INFO: directory[/var/cache/chef] group changed to 0
[2017-08-18T10:51:51-05:00] INFO: Processing directory[/var/lib/chef] action create (chef-client::systemd_service line 56)
[2017-08-18T10:51:51-05:00] INFO: directory[/var/lib/chef] created directory /var/lib/chef
[2017-08-18T10:51:51-05:00] INFO: directory[/var/lib/chef] owner changed to 0
[2017-08-18T10:51:51-05:00] INFO: directory[/var/lib/chef] group changed to 0
[2017-08-18T10:51:51-05:00] INFO: Processing directory[/var/log/chef] action create (chef-client::systemd_service line 56)
[2017-08-18T10:51:51-05:00] INFO: Processing directory[/etc/chef] action create (chef-client::systemd_service line 56)
[2017-08-18T10:51:51-05:00] INFO: Processing template[/etc/sysconfig/chef-client] action create (chef-client::systemd_service line 27)
[2017-08-18T10:51:51-05:00] INFO: template[/etc/sysconfig/chef-client] created file /etc/sysconfig/chef-client
[2017-08-18T10:51:51-05:00] INFO: template[/etc/sysconfig/chef-client] updated file contents /etc/sysconfig/chef-client
[2017-08-18T10:51:51-05:00] INFO: template[/etc/sysconfig/chef-client] mode changed to 644
[2017-08-18T10:51:51-05:00] INFO: Processing systemd_unit[chef-client.service] action create (chef-client::systemd_service line 56)
[2017-08-18T10:51:51-05:00] INFO: Processing file[/etc/systemd/system/chef-client.service] action create (dynamically defined)
[2017-08-18T10:51:51-05:00] INFO: Running queued delayed notifications before re-raising exception
[2017-08-18T10:51:51-05:00] INFO: template[/etc/sysconfig/chef-client] sending restart action to service[chef-client] (delayed)
[2017-08-18T10:51:51-05:00] INFO: Processing service[chef-client] action restart (chef-client::systemd_service line 62)
[2017-08-18T10:51:51-05:00] INFO: service[chef-client] restarted
[2017-08-18T10:51:51-05:00] ERROR: Running exception handlers
[2017-08-18T10:51:51-05:00] ERROR: Exception handlers complete
[2017-08-18T10:51:51-05:00] INFO: Sending resource update report (run-id: 2a04bb13-bd0e-4fec-b6e0-093bd0bb3ab7)
[2017-08-18T10:51:51-05:00] FATAL: Stacktrace dumped to /var/chef/cache/chef-stacktrace.out
[2017-08-18T10:51:51-05:00] FATAL: Please provide the contents of the stacktrace.out file if you file a bug report
[2017-08-18T10:51:51-05:00] ERROR: systemd_unit[chef-client.service] (chef-client::systemd_service line 56) had an error: Chef::Exceptions::ValidationFailed: file[/etc/systemd/system/chef-client.service] (dynamically defined) had an error: Chef::Exceptions::ValidationFailed: Proposed content for /etc/systemd/system/chef-client.service failed verification #<Chef::Resource::File::Verification:0x000000028b2200>
[2017-08-18T10:51:51-05:00] FATAL: Chef::Exceptions::ChildConvergeError: Chef run process exited unsuccessfully (exit code 1)
From the chef-stacktrace.out:
>>>> Caused by Chef::Exceptions::ValidationFailed: Proposed content for /etc/systemd/system/chef-client.service failed verification #<Chef::Resource::File::Verification:0x000000028b2200>
/opt/chef/embedded/lib/ruby/gems/2.3.0/gems/chef-12.19.33/lib/chef/provider/file.rb:352:in `block in do_validate_content'
/opt/chef/embedded/lib/ruby/gems/2.3.0/gems/chef-12.19.33/lib/chef/provider/file.rb:350:in `each'
/opt/chef/embedded/lib/ruby/gems/2.3.0/gems/chef-12.19.33/lib/chef/provider/file.rb:350:in `do_validate_content'
/opt/chef/embedded/lib/ruby/gems/2.3.0/gems/chef-12.19.33/lib/chef/provider/file.rb:151:in `action_create'
/opt/chef/embedded/lib/ruby/gems/2.3.0/gems/chef-12.19.33/lib/chef/provider.rb:145:in `run_action'
/opt/chef/embedded/lib/ruby/gems/2.3.0/gems/chef-12.19.33/lib/chef/resource.rb:622:in `run_action'
/opt/chef/embedded/lib/ruby/gems/2.3.0/gems/chef-12.19.33/lib/chef/provider/systemd_unit.rb:198:in `manage_unit_file'
/opt/chef/embedded/lib/ruby/gems/2.3.0/gems/chef-12.19.33/lib/chef/provider/systemd_unit.rb:60:in `block in action_create'
/opt/chef/embedded/lib/ruby/gems/2.3.0/gems/chef-12.19.33/lib/chef/mixin/why_run.rb:52:in `add_action'
/opt/chef/embedded/lib/ruby/gems/2.3.0/gems/chef-12.19.33/lib/chef/provider.rb:176:in `converge_by'
/opt/chef/embedded/lib/ruby/gems/2.3.0/gems/chef-12.19.33/lib/chef/provider/systemd_unit.rb:59:in `action_create'
/opt/chef/embedded/lib/ruby/gems/2.3.0/gems/chef-12.19.33/lib/chef/provider.rb:145:in `run_action'
/opt/chef/embedded/lib/ruby/gems/2.3.0/gems/chef-12.19.33/lib/chef/resource.rb:622:in `run_action'
/opt/chef/embedded/lib/ruby/gems/2.3.0/gems/chef-12.19.33/lib/chef/runner.rb:69:in `run_action'
/opt/chef/embedded/lib/ruby/gems/2.3.0/gems/chef-12.19.33/lib/chef/runner.rb:97:in `block (2 levels) in converge'
/opt/chef/embedded/lib/ruby/gems/2.3.0/gems/chef-12.19.33/lib/chef/runner.rb:97:in `each'
/opt/chef/embedded/lib/ruby/gems/2.3.0/gems/chef-12.19.33/lib/chef/runner.rb:97:in `block in converge'
/opt/chef/embedded/lib/ruby/gems/2.3.0/gems/chef-12.19.33/lib/chef/resource_collection/resource_list.rb:94:in `block in execute_each_resource'
/opt/chef/embedded/lib/ruby/gems/2.3.0/gems/chef-12.19.33/lib/chef/resource_collection/stepable_iterator.rb:114:in `call_iterator_block'
/opt/chef/embedded/lib/ruby/gems/2.3.0/gems/chef-12.19.33/lib/chef/resource_collection/stepable_iterator.rb:85:in `step'
/opt/chef/embedded/lib/ruby/gems/2.3.0/gems/chef-12.19.33/lib/chef/resource_collection/stepable_iterator.rb:103:in `iterate'
/opt/chef/embedded/lib/ruby/gems/2.3.0/gems/chef-12.19.33/lib/chef/resource_collection/stepable_iterator.rb:55:in `each_with_index'
/opt/chef/embedded/lib/ruby/gems/2.3.0/gems/chef-12.19.33/lib/chef/resource_collection/resource_list.rb:92:in `execute_each_resource'
/opt/chef/embedded/lib/ruby/gems/2.3.0/gems/chef-12.19.33/lib/chef/runner.rb:96:in `converge'
/opt/chef/embedded/lib/ruby/gems/2.3.0/gems/chef-12.19.33/lib/chef/client.rb:670:in `block in converge'
/opt/chef/embedded/lib/ruby/gems/2.3.0/gems/chef-12.19.33/lib/chef/client.rb:665:in `catch'
/opt/chef/embedded/lib/ruby/gems/2.3.0/gems/chef-12.19.33/lib/chef/client.rb:665:in `converge'
/opt/chef/embedded/lib/ruby/gems/2.3.0/gems/chef-12.19.33/lib/chef/client.rb:704:in `converge_and_save'
/opt/chef/embedded/lib/ruby/gems/2.3.0/gems/chef-12.19.33/lib/chef/client.rb:284:in `run'
/opt/chef/embedded/lib/ruby/gems/2.3.0/gems/chef-12.19.33/lib/chef/application.rb:295:in `block in fork_chef_client'
/opt/chef/embedded/lib/ruby/gems/2.3.0/gems/chef-12.19.33/lib/chef/application.rb:283:in `fork'
/opt/chef/embedded/lib/ruby/gems/2.3.0/gems/chef-12.19.33/lib/chef/application.rb:283:in `fork_chef_client'
/opt/chef/embedded/lib/ruby/gems/2.3.0/gems/chef-12.19.33/lib/chef/application.rb:248:in `block in run_chef_client'
/opt/chef/embedded/lib/ruby/gems/2.3.0/gems/chef-12.19.33/lib/chef/local_mode.rb:44:in `with_server_connectivity'
/opt/chef/embedded/lib/ruby/gems/2.3.0/gems/chef-12.19.33/lib/chef/application.rb:236:in `run_chef_client'
/opt/chef/embedded/lib/ruby/gems/2.3.0/gems/chef-12.19.33/lib/chef/application/client.rb:464:in `sleep_then_run_chef_client'
/opt/chef/embedded/lib/ruby/gems/2.3.0/gems/chef-12.19.33/lib/chef/application/client.rb:451:in `block in interval_run_chef_client'
/opt/chef/embedded/lib/ruby/gems/2.3.0/gems/chef-12.19.33/lib/chef/application/client.rb:450:in `loop'
/opt/chef/embedded/lib/ruby/gems/2.3.0/gems/chef-12.19.33/lib/chef/application/client.rb:450:in `interval_run_chef_client'
/opt/chef/embedded/lib/ruby/gems/2.3.0/gems/chef-12.19.33/lib/chef/application/client.rb:434:in `run_application'
/opt/chef/embedded/lib/ruby/gems/2.3.0/gems/chef-12.19.33/lib/chef/application.rb:59:in `run'
/opt/chef/embedded/lib/ruby/gems/2.3.0/gems/chef-12.19.33/bin/chef-client:26:in `<top (required)>'
/usr/bin/chef-client:57:in `load'
Adding in the chef-client -l debug level logs for further analysis:
[2017-08-23T11:11:19-05:00] DEBUG: Initiating POST to https://chef001/organizations/baremetal-sh-npe/reports/nodes/node/runs/61604df2-38ea-4d3d-9be3-3d93ef8187bc
[2017-08-23T11:11:19-05:00] DEBUG: ---- HTTP Request Header Data: ----
[2017-08-23T11:11:19-05:00] DEBUG: X-Ops-Reporting-Protocol-Version: 0.1.0
[2017-08-23T11:11:19-05:00] DEBUG: Content-Encoding: gzip
[2017-08-23T11:11:19-05:00] DEBUG: X-Ops-Server-API-Version: 1
[2017-08-23T11:11:19-05:00] DEBUG: X-OPS-SIGN: algorithm=sha1;version=1.1;
[2017-08-23T11:11:19-05:00] DEBUG: X-OPS-USERID: t9301bmh1001
[2017-08-23T11:11:19-05:00] DEBUG: X-OPS-TIMESTAMP: 2017-08-23T16:11:19Z
[2017-08-23T11:11:19-05:00] DEBUG: X-OPS-CONTENT-HASH: khFZ3GcjogWXzfxs5/c8VQOIK/0=
[2017-08-23T11:11:19-05:00] DEBUG: X-OPS-AUTHORIZATION-1: A3v+4H3vj4baFTprTLXLW9rEUP5qOSu95VC3oXJi8A0GUPqP8D1JK+Fn4C/k
[2017-08-23T11:11:19-05:00] DEBUG: X-OPS-AUTHORIZATION-2: Mksf+LkEIyV+RpNZ/qoRUFeKk90HIViK6+bU31GAkZLArr0aNJHEaBQTOmq7
[2017-08-23T11:11:19-05:00] DEBUG: X-OPS-AUTHORIZATION-3: zEWHWKHPDdw7coQ4VSi/uqQML20K2fSB5e5mRffnqdHu8cYafmzOEXM/dBcR
[2017-08-23T11:11:19-05:00] DEBUG: X-OPS-AUTHORIZATION-4: ozK/ATHfxqK/h3PpEdetfNDRsoLF3z2dsNeBepArtOkpVbi900UkANib1CFD
[2017-08-23T11:11:19-05:00] DEBUG: X-OPS-AUTHORIZATION-5: K4nMY8HbS6SLAjzwZR9+k6WojXwM5Ea5w5o5QKfAvLyAvQJjjOBRh1IIPC+m
[2017-08-23T11:11:19-05:00] DEBUG: X-OPS-AUTHORIZATION-6: mnggHfPZWY3Nat12n6DVR/dFz+xStrPe7P799ZHivA==
[2017-08-23T11:11:19-05:00] DEBUG: HOST: chef001.target.com:443
[2017-08-23T11:11:19-05:00] DEBUG: X-REMOTE-REQUEST-ID: 61604df2-38ea-4d3d-9be3-3d93ef8187bc
[2017-08-23T11:11:19-05:00] DEBUG: Content-Length: 2092
[2017-08-23T11:11:19-05:00] DEBUG: ---- End HTTP Request Header Data ----
[2017-08-23T11:11:19-05:00] DEBUG: ---- HTTP Status and Header Data: ----
[2017-08-23T11:11:19-05:00] DEBUG: HTTP 1.1 200 OK
[2017-08-23T11:11:19-05:00] DEBUG: server: openresty/1.11.2.1
[2017-08-23T11:11:19-05:00] DEBUG: date: Wed, 23 Aug 2017 16:11:19 GMT
[2017-08-23T11:11:19-05:00] DEBUG: content-type: application/json
[2017-08-23T11:11:19-05:00] DEBUG: content-length: 2
[2017-08-23T11:11:19-05:00] DEBUG: connection: close
[2017-08-23T11:11:19-05:00] DEBUG: ---- End HTTP Status/Header Data ----
[2017-08-23T11:11:19-05:00] DEBUG: Audit Reports are disabled. Skipping sending reports.
[2017-08-23T11:11:19-05:00] FATAL: Stacktrace dumped to /var/chef/cache/chef-stacktrace.out
[2017-08-23T11:11:19-05:00] FATAL: Please provide the contents of the stacktrace.out file if you file a bug report
[2017-08-23T11:11:19-05:00] DEBUG: Chef::Exceptions::ValidationFailed: systemd_unit[chef-client.service] (chef-client::systemd_service line 56) had an error: Chef::Exceptions::ValidationFailed: file[/etc/systemd/system/chef-client.service] (dynamically defined) had an error: Chef::Exceptions::Valida tionFailed: Proposed content for /etc/systemd/system/chef-client.service failed verification #<Chef::Resource::File::Verification:0x000000063fa808>
/opt/chef/embedded/lib/ruby/gems/2.3.0/gems/chef-12.19.36/lib/chef/provider/file.rb:352:in `block in do_validate_content'
/opt/chef/embedded/lib/ruby/gems/2.3.0/gems/chef-12.19.36/lib/chef/provider/file.rb:350:in `each'
/opt/chef/embedded/lib/ruby/gems/2.3.0/gems/chef-12.19.36/lib/chef/provider/file.rb:350:in `do_validate_content'
/opt/chef/embedded/lib/ruby/gems/2.3.0/gems/chef-12.19.36/lib/chef/provider/file.rb:151:in `action_create'
/opt/chef/embedded/lib/ruby/gems/2.3.0/gems/chef-12.19.36/lib/chef/provider.rb:145:in `run_action'
/opt/chef/embedded/lib/ruby/gems/2.3.0/gems/chef-12.19.36/lib/chef/resource.rb:622:in `run_action'
/opt/chef/embedded/lib/ruby/gems/2.3.0/gems/chef-12.19.36/lib/chef/provider/systemd_unit.rb:198:in `manage_unit_file'
/opt/chef/embedded/lib/ruby/gems/2.3.0/gems/chef-12.19.36/lib/chef/provider/systemd_unit.rb:60:in `block in action_create'
/opt/chef/embedded/lib/ruby/gems/2.3.0/gems/chef-12.19.36/lib/chef/mixin/why_run.rb:52:in `add_action'
/opt/chef/embedded/lib/ruby/gems/2.3.0/gems/chef-12.19.36/lib/chef/provider.rb:176:in `converge_by'
/opt/chef/embedded/lib/ruby/gems/2.3.0/gems/chef-12.19.36/lib/chef/provider/systemd_unit.rb:59:in `action_create'
/opt/chef/embedded/lib/ruby/gems/2.3.0/gems/chef-12.19.36/lib/chef/provider.rb:145:in `run_action'
/opt/chef/embedded/lib/ruby/gems/2.3.0/gems/chef-12.19.36/lib/chef/resource.rb:622:in `run_action'
/opt/chef/embedded/lib/ruby/gems/2.3.0/gems/chef-12.19.36/lib/chef/runner.rb:69:in `run_action'
/opt/chef/embedded/lib/ruby/gems/2.3.0/gems/chef-12.19.36/lib/chef/runner.rb:97:in `block (2 levels) in converge'
/opt/chef/embedded/lib/ruby/gems/2.3.0/gems/chef-12.19.36/lib/chef/runner.rb:97:in `each'
/opt/chef/embedded/lib/ruby/gems/2.3.0/gems/chef-12.19.36/lib/chef/runner.rb:97:in `block in converge'
/opt/chef/embedded/lib/ruby/gems/2.3.0/gems/chef-12.19.36/lib/chef/resource_collection/resource_list.rb:94:in `block in execute_each_resource'
/opt/chef/embedded/lib/ruby/gems/2.3.0/gems/chef-12.19.36/lib/chef/resource_collection/stepable_iterator.rb:114:in `call_iterator_block'
/opt/chef/embedded/lib/ruby/gems/2.3.0/gems/chef-12.19.36/lib/chef/resource_collection/stepable_iterator.rb:85:in `step'
/opt/chef/embedded/lib/ruby/gems/2.3.0/gems/chef-12.19.36/lib/chef/resource_collection/stepable_iterator.rb:103:in `iterate'
/opt/chef/embedded/lib/ruby/gems/2.3.0/gems/chef-12.19.36/lib/chef/resource_collection/stepable_iterator.rb:55:in `each_with_index'
/opt/chef/embedded/lib/ruby/gems/2.3.0/gems/chef-12.19.36/lib/chef/resource_collection/resource_list.rb:92:in `execute_each_resource'
/opt/chef/embedded/lib/ruby/gems/2.3.0/gems/chef-12.19.36/lib/chef/runner.rb:96:in `converge'
/opt/chef/embedded/lib/ruby/gems/2.3.0/gems/chef-12.19.36/lib/chef/client.rb:670:in `block in converge'
/opt/chef/embedded/lib/ruby/gems/2.3.0/gems/chef-12.19.36/lib/chef/client.rb:665:in `catch'
/opt/chef/embedded/lib/ruby/gems/2.3.0/gems/chef-12.19.36/lib/chef/client.rb:665:in `converge'
/opt/chef/embedded/lib/ruby/gems/2.3.0/gems/chef-12.19.36/lib/chef/client.rb:704:in `converge_and_save'
/opt/chef/embedded/lib/ruby/gems/2.3.0/gems/chef-12.19.36/lib/chef/client.rb:284:in `run'
/opt/chef/embedded/lib/ruby/gems/2.3.0/gems/chef-12.19.36/lib/chef/application.rb:295:in `block in fork_chef_client'
/opt/chef/embedded/lib/ruby/gems/2.3.0/gems/chef-12.19.36/lib/chef/application.rb:283:in `fork'
/opt/chef/embedded/lib/ruby/gems/2.3.0/gems/chef-12.19.36/lib/chef/application.rb:283:in `fork_chef_client'
/opt/chef/embedded/lib/ruby/gems/2.3.0/gems/chef-12.19.36/lib/chef/application.rb:248:in `block in run_chef_client'
/opt/chef/embedded/lib/ruby/gems/2.3.0/gems/chef-12.19.36/lib/chef/local_mode.rb:44:in `with_server_connectivity'
/opt/chef/embedded/lib/ruby/gems/2.3.0/gems/chef-12.19.36/lib/chef/application.rb:236:in `run_chef_client'
/opt/chef/embedded/lib/ruby/gems/2.3.0/gems/chef-12.19.36/lib/chef/application/client.rb:464:in `sleep_then_run_chef_client'
/opt/chef/embedded/lib/ruby/gems/2.3.0/gems/chef-12.19.36/lib/chef/application/client.rb:451:in `block in interval_run_chef_client'
/opt/chef/embedded/lib/ruby/gems/2.3.0/gems/chef-12.19.36/lib/chef/application/client.rb:450:in `loop'
/opt/chef/embedded/lib/ruby/gems/2.3.0/gems/chef-12.19.36/lib/chef/application/client.rb:450:in `interval_run_chef_client'
/opt/chef/embedded/lib/ruby/gems/2.3.0/gems/chef-12.19.36/lib/chef/application/client.rb:434:in `run_application'
/opt/chef/embedded/lib/ruby/gems/2.3.0/gems/chef-12.19.36/lib/chef/application.rb:59:in `run'
/opt/chef/embedded/lib/ruby/gems/2.3.0/gems/chef-12.19.36/bin/chef-client:26:in `<top (required)>'
/usr/bin/chef-client:57:in `load'
/usr/bin/chef-client:57:in `<main>'
>>>> Caused by Chef::Exceptions::ValidationFailed: Proposed content for /etc/systemd/system/chef-client.service failed verification #<Chef::Resource:: File::Verification:0x000000063fa808>
/opt/chef/embedded/lib/ruby/gems/2.3.0/gems/chef-12.19.36/lib/chef/provider/file.rb:352:in `block in do_validate_content'
/opt/chef/embedded/lib/ruby/gems/2.3.0/gems/chef-12.19.36/lib/chef/provider/file.rb:350:in `each'
/opt/chef/embedded/lib/ruby/gems/2.3.0/gems/chef-12.19.36/lib/chef/provider/file.rb:350:in `do_validate_content'
/opt/chef/embedded/lib/ruby/gems/2.3.0/gems/chef-12.19.36/lib/chef/provider/file.rb:151:in `action_create'
/opt/chef/embedded/lib/ruby/gems/2.3.0/gems/chef-12.19.36/lib/chef/provider.rb:145:in `run_action'
/opt/chef/embedded/lib/ruby/gems/2.3.0/gems/chef-12.19.36/lib/chef/resource.rb:622:in `run_action'
/opt/chef/embedded/lib/ruby/gems/2.3.0/gems/chef-12.19.36/lib/chef/provider/systemd_unit.rb:198:in `manage_unit_file'
/opt/chef/embedded/lib/ruby/gems/2.3.0/gems/chef-12.19.36/lib/chef/provider/systemd_unit.rb:60:in `block in action_create'
/opt/chef/embedded/lib/ruby/gems/2.3.0/gems/chef-12.19.36/lib/chef/mixin/why_run.rb:52:in `add_action'
/opt/chef/embedded/lib/ruby/gems/2.3.0/gems/chef-12.19.36/lib/chef/provider.rb:176:in `converge_by'
/opt/chef/embedded/lib/ruby/gems/2.3.0/gems/chef-12.19.36/lib/chef/provider/systemd_unit.rb:59:in `action_create'
/opt/chef/embedded/lib/ruby/gems/2.3.0/gems/chef-12.19.36/lib/chef/provider.rb:145:in `run_action'
/opt/chef/embedded/lib/ruby/gems/2.3.0/gems/chef-12.19.36/lib/chef/resource.rb:622:in `run_action'
/opt/chef/embedded/lib/ruby/gems/2.3.0/gems/chef-12.19.36/lib/chef/runner.rb:69:in `run_action'
/opt/chef/embedded/lib/ruby/gems/2.3.0/gems/chef-12.19.36/lib/chef/runner.rb:97:in `block (2 levels) in converge'
/opt/chef/embedded/lib/ruby/gems/2.3.0/gems/chef-12.19.36/lib/chef/runner.rb:97:in `each'
/opt/chef/embedded/lib/ruby/gems/2.3.0/gems/chef-12.19.36/lib/chef/runner.rb:97:in `block in converge'
/opt/chef/embedded/lib/ruby/gems/2.3.0/gems/chef-12.19.36/lib/chef/resource_collection/resource_list.rb:94:in `block in execute_each_resource'
/opt/chef/embedded/lib/ruby/gems/2.3.0/gems/chef-12.19.36/lib/chef/resource_collection/stepable_iterator.rb:114:in `call_iterator_block'
/opt/chef/embedded/lib/ruby/gems/2.3.0/gems/chef-12.19.36/lib/chef/resource_collection/stepable_iterator.rb:85:in `step'
/opt/chef/embedded/lib/ruby/gems/2.3.0/gems/chef-12.19.36/lib/chef/resource_collection/stepable_iterator.rb:103:in `iterate'
/opt/chef/embedded/lib/ruby/gems/2.3.0/gems/chef-12.19.36/lib/chef/resource_collection/stepable_iterator.rb:55:in `each_with_index'
/opt/chef/embedded/lib/ruby/gems/2.3.0/gems/chef-12.19.36/lib/chef/resource_collection/resource_list.rb:92:in `execute_each_resource'
/opt/chef/embedded/lib/ruby/gems/2.3.0/gems/chef-12.19.36/lib/chef/runner.rb:96:in `converge'
/opt/chef/embedded/lib/ruby/gems/2.3.0/gems/chef-12.19.36/lib/chef/client.rb:670:in `block in converge'
/opt/chef/embedded/lib/ruby/gems/2.3.0/gems/chef-12.19.36/lib/chef/client.rb:665:in `catch'
/opt/chef/embedded/lib/ruby/gems/2.3.0/gems/chef-12.19.36/lib/chef/client.rb:665:in `converge'
/opt/chef/embedded/lib/ruby/gems/2.3.0/gems/chef-12.19.36/lib/chef/client.rb:704:in `converge_and_save'
/opt/chef/embedded/lib/ruby/gems/2.3.0/gems/chef-12.19.36/lib/chef/client.rb:284:in `run'
/opt/chef/embedded/lib/ruby/gems/2.3.0/gems/chef-12.19.36/lib/chef/application.rb:295:in `block in fork_chef_client'
/opt/chef/embedded/lib/ruby/gems/2.3.0/gems/chef-12.19.36/lib/chef/application.rb:283:in `fork'
/opt/chef/embedded/lib/ruby/gems/2.3.0/gems/chef-12.19.36/lib/chef/application.rb:283:in `fork_chef_client'
/opt/chef/embedded/lib/ruby/gems/2.3.0/gems/chef-12.19.36/lib/chef/application.rb:248:in `block in run_chef_client'
/opt/chef/embedded/lib/ruby/gems/2.3.0/gems/chef-12.19.36/lib/chef/local_mode.rb:44:in `with_server_connectivity'
/opt/chef/embedded/lib/ruby/gems/2.3.0/gems/chef-12.19.36/lib/chef/application.rb:236:in `run_chef_client'
/opt/chef/embedded/lib/ruby/gems/2.3.0/gems/chef-12.19.36/lib/chef/application/client.rb:464:in `sleep_then_run_chef_client'
/opt/chef/embedded/lib/ruby/gems/2.3.0/gems/chef-12.19.36/lib/chef/application/client.rb:451:in `block in interval_run_chef_client'
/opt/chef/embedded/lib/ruby/gems/2.3.0/gems/chef-12.19.36/lib/chef/application/client.rb:450:in `loop'
/opt/chef/embedded/lib/ruby/gems/2.3.0/gems/chef-12.19.36/lib/chef/application/client.rb:450:in `interval_run_chef_client'
/opt/chef/embedded/lib/ruby/gems/2.3.0/gems/chef-12.19.36/lib/chef/application/client.rb:434:in `run_application'
/opt/chef/embedded/lib/ruby/gems/2.3.0/gems/chef-12.19.36/lib/chef/application.rb:59:in `run'
/opt/chef/embedded/lib/ruby/gems/2.3.0/gems/chef-12.19.36/bin/chef-client:26:in `<top (required)>'
/usr/bin/chef-client:57:in `load'
/usr/bin/chef-client:57:in `<main>'
[2017-08-23T11:11:19-05:00] ERROR: systemd_unit[chef-client.service] (chef-client::systemd_service line 56) had an error: Chef::Exceptions::Validation Failed: file[/etc/systemd/system/chef-client.service] (dynamically defined) had an error: Chef::Exceptions::ValidationFailed: Proposed content for /et c/systemd/system/chef-client.service failed verification #<Chef::Resource::File::Verification:0x000000063fa808>
[2017-08-23T11:11:20-05:00] FATAL: Chef::Exceptions::ChildConvergeError: Chef run process exited unsuccessfully (exit code 1)
Any thoughts on why my first run is going south? My intention is to have the node placed in it's appropriate env and role, and then for the box to run all the appropriate recipes associated with the env/role.
Thanks!
You would need to use the full path, but just use knife bootstrap and it will take care of this.

Error executing action `install` on resource 'package[pgdg-centos93]'

Environment
Chef
CentOS
PostGres
Rails
Amazon cloud server
$ cat /etc/redhat-release
CentOS release 6.7 (Final)
$ uname -a
Linux ip-10-0-0-250 2.6.32-504.8.1.el6.x86_64 #1 SMP Wed Jan 28 21:11:36 UTC 2015 x86_64 x86_64 x86_64 GNU/Linux
Put an Amazon CentOS instance to sleep for a couple of months and started it again today. To bring everything up-to-date, the "magic" should happen (figure of speech) with sudo chef-client, at least that was what was expected. And to my current experience for this particular , Chef has brought to my project almost more overhead than gain in time. (NOTE: This is a side comment related to a personal experience.)
Here is my latest headache
Recipe: postgresql::yum_pgdg_postgresql
* remote_file[/var/chef/cache/pgdg-centos93-9.3-1.noarch.rpm] action create (up to date)
* package[pgdg-centos93] action install
================================================================================
Error executing action `install` on resource 'package[pgdg-centos93]'
================================================================================
Chef::Exceptions::Exec
----------------------
rpm -U /var/chef/cache/pgdg-centos93-9.3-1.noarch.rpm returned 2, expected 0
Resource Declaration:
---------------------
# In /var/chef/cache/cookbooks/postgresql/recipes/yum_pgdg_postgresql.rb
43: package repo_rpm_package do
44: provider Chef::Provider::Package::Rpm
45: source "#{Chef::Config[:file_cache_path]}/#{repo_rpm_filename}"
46: action :install
47: end
Compiled Resource:
------------------
# Declared in /var/chef/cache/cookbooks/postgresql/recipes/yum_pgdg_postgresql.rb:43:in `from_file'
package("pgdg-centos93") do
provider Chef::Provider::Package::Rpm
action [:install]
retries 0
retry_delay 2
guard_interpreter :default
package_name "pgdg-centos93"
source "/var/chef/cache/pgdg-centos93-9.3-1.noarch.rpm"
version "9.3-1"
cookbook_name "postgresql"
recipe_name "yum_pgdg_postgresql"
end
Running handlers:
[2016-02-02T12:34:02+00:00] ERROR: Running exception handlers
Running handlers complete
[2016-02-02T12:34:02+00:00] ERROR: Exception handlers complete
[2016-02-02T12:34:02+00:00] FATAL: Stacktrace dumped to /var/chef/cache/chef-stacktrace.out
Chef Client failed. 8 resources updated in 42.119165396 seconds
[2016-02-02T12:34:03+00:00] ERROR: package[pgdg-centos93] (postgresql::yum_pgdg_postgresql line 43) had an error: Chef::Exceptions::Exec: rpm -U /var/chef/cache/pgdg-centos93-9.3-1.noarch.rpm returned 2, expected 0
[2016-02-02T12:34:03+00:00] FATAL: Chef::Exceptions::ChildConvergeError: Chef run process exited unsuccessfully (exit code 1)
Any pointers are most desperately welcomed. I just don't manage to understand the ERROR
UPDATE
As suggested
$ sudo rpm -U /var/chef/cache/pgdg-centos93-9.3-1.noarch.rpm
[sudo] password for ed:
package pgdg-centos93-9.3-2.noarch (which is newer than pgdg-centos93-9.3-1.noarch) is already installed
Running Chef in debug mode
* package[pgdg-centos93] action install[2016-02-02T14:05:16+00:00] INFO: Processing package[pgdg-centos93] action install (postgresql::yum_pgdg_postgresql line 43)
[2016-02-02T14:05:16+00:00] DEBUG: package[pgdg-centos93] checking rpm status
[2016-02-02T14:05:17+00:00] DEBUG: package[pgdg-centos93] checking install state
[2016-02-02T14:05:17+00:00] DEBUG: package[pgdg-centos93] current version is 9.3-2
[2016-02-02T14:05:17+00:00] DEBUG: Executing rpm -U /var/chef/cache/pgdg-centos93-9.3-1.noarch.rpm
[2016-02-02T14:05:17+00:00] DEBUG: ---- Begin output of rpm -U /var/chef/cache/pgdg-centos93-9.3-1.noarch.rpm ----
[2016-02-02T14:05:17+00:00] DEBUG: STDOUT:
[2016-02-02T14:05:17+00:00] DEBUG: STDERR: package pgdg-centos93-9.3-2.noarch (which is newer than pgdg-centos93-9.3-1.noarch) is already installed
[2016-02-02T14:05:17+00:00] DEBUG: ---- End output of rpm -U /var/chef/cache/pgdg-centos93-9.3-1.noarch.rpm ----
[2016-02-02T14:05:17+00:00] DEBUG: Ran rpm -U /var/chef/cache/pgdg-centos93-9.3-1.noarch.rpm returned 2
================================================================================
Error executing action `install` on resource 'package[pgdg-centos93]'
================================================================================
Chef::Exceptions::Exec
----------------------
rpm -U /var/chef/cache/pgdg-centos93-9.3-1.noarch.rpm returned 2, expected 0
---- Begin output of rpm -U /var/chef/cache/pgdg-centos93-9.3-1.noarch.rpm ----
STDOUT: STDERR: package pgdg-centos93-9.3-2.noarch (which is newer than pgdg-centos93-9.3-1.noarch) is already installed
---- End output of rpm -U /var/chef/cache/pgdg-centos93-9.3-1.noarch.rpm ----
Resource Declaration:
---------------------
# In /var/chef/cache/cookbooks/postgresql/recipes/yum_pgdg_postgresql.rb
43: package repo_rpm_package do
44: provider Chef::Provider::Package::Rpm
45: source "#{Chef::Config[:file_cache_path]}/#{repo_rpm_filename}"
46: action :install
47: end
Compiled Resource:
------------------
# Declared in /var/chef/cache/cookbooks/postgresql/recipes/yum_pgdg_postgresql.rb:43:in `from_file'
package("pgdg-centos93") do
provider Chef::Provider::Package::Rpm
action [:install]
retries 0
retry_delay 2
guard_interpreter :default
package_name "pgdg-centos93"
source "/var/chef/cache/pgdg-centos93-9.3-1.noarch.rpm"
version "9.3-1"
cookbook_name "postgresql"
recipe_name "yum_pgdg_postgresql"
end
[2016-02-02T14:05:17+00:00] INFO: Running queued delayed notifications before re-raising exception
[2016-02-02T14:05:17+00:00] DEBUG: Re-raising exception: Chef::Exceptions::Exec - package[pgdg-centos93] (postgresql::yum_pgdg_postgresql line 43) had an error: Chef::Exceptions::Exec: rpm -U /var/chef/cache/pgdg-centos93-9.3-1.noarch.rpm returned 2, expected 0
---- Begin output of rpm -U /var/chef/cache/pgdg-centos93-9.3-1.noarch.rpm ----
STDOUT: STDERR: package pgdg-centos93-9.3-2.noarch (which is newer than pgdg-centos93-9.3-1.noarch) is already installed
---- End output of rpm -U /var/chef/cache/pgdg-centos93-9.3-1.noarch.rpm ----
/opt/chef/embedded/lib/ruby/gems/1.9.1/gems/chef-11.12.4/lib/chef/mixin/command.rb:158:in `handle_command_failures'
/opt/chef/embedded/lib/ruby/gems/1.9.1/gems/chef-11.12.4/lib/chef/mixin/command.rb:104:in `run_command_and_return_stdout_stderr'
/opt/chef/embedded/lib/ruby/gems/1.9.1/gems/chef-11.12.4/lib/chef/mixin/command.rb:79:in `run_command'
/opt/chef/embedded/lib/ruby/gems/1.9.1/gems/chef-11.12.4/lib/chef/mixin/command.rb:171:in `run_command_with_systems_locale'
/opt/chef/embedded/lib/ruby/gems/1.9.1/gems/chef-11.12.4/lib/chef/provider/package/rpm.rb:98:in `install_package'
/opt/chef/embedded/lib/ruby/gems/1.9.1/gems/chef-11.12.4/lib/chef/provider/package.rb:82:in `block in action_install'
/opt/chef/embedded/lib/ruby/gems/1.9.1/gems/chef-11.12.4/lib/chef/mixin/why_run.rb:52:in `call'
/opt/chef/embedded/lib/ruby/gems/1.9.1/gems/chef-11.12.4/lib/chef/mixin/why_run.rb:52:in `add_action'
/opt/chef/embedded/lib/ruby/gems/1.9.1/gems/chef-11.12.4/lib/chef/provider.rb:155:in `converge_by'
/opt/chef/embedded/lib/ruby/gems/1.9.1/gems/chef-11.12.4/lib/chef/provider/package.rb:80:in `action_install'
/opt/chef/embedded/lib/ruby/gems/1.9.1/gems/chef-11.12.4/lib/chef/provider.rb:120:in `run_action'
/opt/chef/embedded/lib/ruby/gems/1.9.1/gems/chef-11.12.4/lib/chef/resource.rb:637:in `run_action'
/opt/chef/embedded/lib/ruby/gems/1.9.1/gems/chef-11.12.4/lib/chef/runner.rb:49:in `run_action'
/opt/chef/embedded/lib/ruby/gems/1.9.1/gems/chef-11.12.4/lib/chef/runner.rb:81:in `block (2 levels) in converge'
/opt/chef/embedded/lib/ruby/gems/1.9.1/gems/chef-11.12.4/lib/chef/runner.rb:81:in `each'
/opt/chef/embedded/lib/ruby/gems/1.9.1/gems/chef-11.12.4/lib/chef/runner.rb:81:in `block in converge'
/opt/chef/embedded/lib/ruby/gems/1.9.1/gems/chef-11.12.4/lib/chef/resource_collection.rb:98:in `block in execute_each_resource'
/opt/chef/embedded/lib/ruby/gems/1.9.1/gems/chef-11.12.4/lib/chef/resource_collection/stepable_iterator.rb:116:in `call'
/opt/chef/embedded/lib/ruby/gems/1.9.1/gems/chef-11.12.4/lib/chef/resource_collection/stepable_iterator.rb:116:in `call_iterator_block'
/opt/chef/embedded/lib/ruby/gems/1.9.1/gems/chef-11.12.4/lib/chef/resource_collection/stepable_iterator.rb:85:in `step'
/opt/chef/embedded/lib/ruby/gems/1.9.1/gems/chef-11.12.4/lib/chef/resource_collection/stepable_iterator.rb:104:in `iterate'
/opt/chef/embedded/lib/ruby/gems/1.9.1/gems/chef-11.12.4/lib/chef/resource_collection/stepable_iterator.rb:55:in `each_with_index'
/opt/chef/embedded/lib/ruby/gems/1.9.1/gems/chef-11.12.4/lib/chef/resource_collection.rb:96:in `execute_each_resource'
/opt/chef/embedded/lib/ruby/gems/1.9.1/gems/chef-11.12.4/lib/chef/runner.rb:80:in `converge'
/opt/chef/embedded/lib/ruby/gems/1.9.1/gems/chef-11.12.4/lib/chef/client.rb:345:in `converge'
/opt/chef/embedded/lib/ruby/gems/1.9.1/gems/chef-11.12.4/lib/chef/client.rb:431:in `do_run'
/opt/chef/embedded/lib/ruby/gems/1.9.1/gems/chef-11.12.4/lib/chef/client.rb:213:in `block in run'
/opt/chef/embedded/lib/ruby/gems/1.9.1/gems/chef-11.12.4/lib/chef/client.rb:207:in `fork'
/opt/chef/embedded/lib/ruby/gems/1.9.1/gems/chef-11.12.4/lib/chef/client.rb:207:in `run'
/opt/chef/embedded/lib/ruby/gems/1.9.1/gems/chef-11.12.4/lib/chef/application.rb:217:in `run_chef_client'
/opt/chef/embedded/lib/ruby/gems/1.9.1/gems/chef-11.12.4/lib/chef/application/client.rb:328:in `block in run_application'
/opt/chef/embedded/lib/ruby/gems/1.9.1/gems/chef-11.12.4/lib/chef/application/client.rb:317:in `loop'
/opt/chef/embedded/lib/ruby/gems/1.9.1/gems/chef-11.12.4/lib/chef/application/client.rb:317:in `run_application'
/opt/chef/embedded/lib/ruby/gems/1.9.1/gems/chef-11.12.4/lib/chef/application.rb:67:in `run'
/opt/chef/embedded/lib/ruby/gems/1.9.1/gems/chef-11.12.4/bin/chef-client:26:in `<top (required)>'
/usr/bin/chef-client:23:in `load'
/usr/bin/chef-client:23:in `<main>'
Running handlers:
[2016-02-02T14:05:17+00:00] ERROR: Running exception handlers
Running handlers complete
[2016-02-02T14:05:17+00:00] ERROR: Exception handlers complete
[2016-02-02T14:05:17+00:00] FATAL: Stacktrace dumped to /var/chef/cache/chef-stacktrace.out
[2016-02-02T14:05:17+00:00] DEBUG: Chef::Exceptions::Exec: package[pgdg-centos93] (postgresql::yum_pgdg_postgresql line 43) had an error: Chef::Exceptions::Exec: rpm -U /var/chef/cache/pgdg-centos93-9.3-1.noarch.rpm returned 2, expected 0
---- Begin output of rpm -U /var/chef/cache/pgdg-centos93-9.3-1.noarch.rpm ----
STDOUT: STDERR: package pgdg-centos93-9.3-2.noarch (which is newer than pgdg-centos93-9.3-1.noarch) is already installed
---- End output of rpm -U /var/chef/cache/pgdg-centos93-9.3-1.noarch.rpm ----
/opt/chef/embedded/lib/ruby/gems/1.9.1/gems/chef-11.12.4/lib/chef/mixin/command.rb:158:in `handle_command_failures'
/opt/chef/embedded/lib/ruby/gems/1.9.1/gems/chef-11.12.4/lib/chef/mixin/command.rb:104:in `run_command_and_return_stdout_stderr'
/opt/chef/embedded/lib/ruby/gems/1.9.1/gems/chef-11.12.4/lib/chef/mixin/command.rb:79:in `run_command'
/opt/chef/embedded/lib/ruby/gems/1.9.1/gems/chef-11.12.4/lib/chef/mixin/command.rb:171:in `run_command_with_systems_locale'
/opt/chef/embedded/lib/ruby/gems/1.9.1/gems/chef-11.12.4/lib/chef/provider/package/rpm.rb:98:in `install_package'
/opt/chef/embedded/lib/ruby/gems/1.9.1/gems/chef-11.12.4/lib/chef/provider/package.rb:82:in `block in action_install'
/opt/chef/embedded/lib/ruby/gems/1.9.1/gems/chef-11.12.4/lib/chef/mixin/why_run.rb:52:in `call'
/opt/chef/embedded/lib/ruby/gems/1.9.1/gems/chef-11.12.4/lib/chef/mixin/why_run.rb:52:in `add_action'
/opt/chef/embedded/lib/ruby/gems/1.9.1/gems/chef-11.12.4/lib/chef/provider.rb:155:in `converge_by'
/opt/chef/embedded/lib/ruby/gems/1.9.1/gems/chef-11.12.4/lib/chef/provider/package.rb:80:in `action_install'
/opt/chef/embedded/lib/ruby/gems/1.9.1/gems/chef-11.12.4/lib/chef/provider.rb:120:in `run_action'
/opt/chef/embedded/lib/ruby/gems/1.9.1/gems/chef-11.12.4/lib/chef/resource.rb:637:in `run_action'
/opt/chef/embedded/lib/ruby/gems/1.9.1/gems/chef-11.12.4/lib/chef/runner.rb:49:in `run_action'
/opt/chef/embedded/lib/ruby/gems/1.9.1/gems/chef-11.12.4/lib/chef/runner.rb:81:in `block (2 levels) in converge'
/opt/chef/embedded/lib/ruby/gems/1.9.1/gems/chef-11.12.4/lib/chef/runner.rb:81:in `each'
/opt/chef/embedded/lib/ruby/gems/1.9.1/gems/chef-11.12.4/lib/chef/runner.rb:81:in `block in converge'
/opt/chef/embedded/lib/ruby/gems/1.9.1/gems/chef-11.12.4/lib/chef/resource_collection.rb:98:in `block in execute_each_resource'
/opt/chef/embedded/lib/ruby/gems/1.9.1/gems/chef-11.12.4/lib/chef/resource_collection/stepable_iterator.rb:116:in `call'
/opt/chef/embedded/lib/ruby/gems/1.9.1/gems/chef-11.12.4/lib/chef/resource_collection/stepable_iterator.rb:116:in `call_iterator_block'
/opt/chef/embedded/lib/ruby/gems/1.9.1/gems/chef-11.12.4/lib/chef/resource_collection/stepable_iterator.rb:85:in `step'
/opt/chef/embedded/lib/ruby/gems/1.9.1/gems/chef-11.12.4/lib/chef/resource_collection/stepable_iterator.rb:104:in `iterate'
/opt/chef/embedded/lib/ruby/gems/1.9.1/gems/chef-11.12.4/lib/chef/resource_collection/stepable_iterator.rb:55:in `each_with_index'
/opt/chef/embedded/lib/ruby/gems/1.9.1/gems/chef-11.12.4/lib/chef/resource_collection.rb:96:in `execute_each_resource'
/opt/chef/embedded/lib/ruby/gems/1.9.1/gems/chef-11.12.4/lib/chef/runner.rb:80:in `converge'
/opt/chef/embedded/lib/ruby/gems/1.9.1/gems/chef-11.12.4/lib/chef/client.rb:345:in `converge'
/opt/chef/embedded/lib/ruby/gems/1.9.1/gems/chef-11.12.4/lib/chef/client.rb:431:in `do_run'
/opt/chef/embedded/lib/ruby/gems/1.9.1/gems/chef-11.12.4/lib/chef/client.rb:213:in `block in run'
/opt/chef/embedded/lib/ruby/gems/1.9.1/gems/chef-11.12.4/lib/chef/client.rb:207:in `fork'
/opt/chef/embedded/lib/ruby/gems/1.9.1/gems/chef-11.12.4/lib/chef/client.rb:207:in `run'
/opt/chef/embedded/lib/ruby/gems/1.9.1/gems/chef-11.12.4/lib/chef/application.rb:217:in `run_chef_client'
/opt/chef/embedded/lib/ruby/gems/1.9.1/gems/chef-11.12.4/lib/chef/application/client.rb:328:in `block in run_application'
/opt/chef/embedded/lib/ruby/gems/1.9.1/gems/chef-11.12.4/lib/chef/application/client.rb:317:in `loop'
/opt/chef/embedded/lib/ruby/gems/1.9.1/gems/chef-11.12.4/lib/chef/application/client.rb:317:in `run_application'
/opt/chef/embedded/lib/ruby/gems/1.9.1/gems/chef-11.12.4/lib/chef/application.rb:67:in `run'
/opt/chef/embedded/lib/ruby/gems/1.9.1/gems/chef-11.12.4/bin/chef-client:26:in `<top (required)>'
/usr/bin/chef-client:23:in `load'
/usr/bin/chef-client:23:in `<main>'
Chef Client failed. 8 resources updated in 42.825243439 seconds
[2016-02-02T14:05:17+00:00] INFO: Sending resource update report (run-id: ac041d25-eba7-4865-a20a-d16ffa60acef)
[2016-02-02T14:05:17+00:00] DEBUG: {"action"=>"end", "resources"=>[{"type"=>"ruby_block", "name"=>"run-iptables-resources-early", "id"=>"run-iptables-resources-early", "after"=>{}, "before"=>{}, "duration"=>"16183", "delta"=>"", "result"=>"run", "cookbook_name"=>"simple_iptables", "cookbook_version"=>"0.6.0"}, {"type"=>"package", "name"=>"pgdg-centos93", "id"=>"pgdg-centos93", "after"=>{:version=>"9.3-1", :options=>nil}, "before"=>{:version=>"9.3-2", :options=>nil}, "duration"=>"961", "delta"=>"", "result"=>"install", "cookbook_name"=>"postgresql", "cookbook_version"=>"3.4.0"}], "status"=>"failure", "run_list"=>"[\"role[website]\"]", "total_res_count"=>"27", "data"=>{"exception"=>{"class"=>"#<Chef::Exceptions::Exec: package[pgdg-centos93] (postgresql::yum_pgdg_postgresql line 43) had an error: Chef::Exceptions::Exec: rpm -U /var/chef/cache/pgdg-centos93-9.3-1.noarch.rpm returned 2, expected 0\n---- Begin output of rpm -U /var/chef/cache/pgdg-centos93-9.3-1.noarch.rpm ----\nSTDOUT: STDERR: \tpackage pgdg-centos93-9.3-2.noarch (which is newer than pgdg-centos93-9.3-1.noarch) is already installed\n---- End output of rpm -U /var/chef/cache/pgdg-centos93-9.3-1.noarch.rpm ----\n>", "message"=>"package[pgdg-centos93] (postgresql::yum_pgdg_postgresql line 43) had an error: Chef::Exceptions::Exec: rpm -U /var/chef/cache/pgdg-centos93-9.3-1.noarch.rpm returned 2, expected 0\n---- Begin output of rpm -U /var/chef/cache/pgdg-centos93-9.3-1.noarch.rpm ----\nSTDOUT: STDERR: \tpackage pgdg-centos93-9.3-2.noarch (which is newer than pgdg-centos93-9.3-1.noarch) is already installed\n---- End output of rpm -U /var/chef/cache/pgdg-centos93-9.3-1.noarch.rpm ----\n", "backtrace"=>"[\"/opt/chef/embedded/lib/ruby/gems/1.9.1/gems/chef-11.12.4/lib/chef/mixin/command.rb:158:in `handle_command_failures'\",\"/opt/chef/embedded/lib/ruby/gems/1.9.1/gems/chef-11.12.4/lib/chef/mixin/command.rb:104:in `run_command_and_return_stdout_stderr'\",\"/opt/chef/embedded/lib/ruby/gems/1.9.1/gems/chef-11.12.4/lib/chef/mixin/command.rb:79:in `run_command'\",\"/opt/chef/embedded/lib/ruby/gems/1.9.1/gems/chef-11.12.4/lib/chef/mixin/command.rb:171:in `run_command_with_systems_locale'\",\"/opt/chef/embedded/lib/ruby/gems/1.9.1/gems/chef-11.12.4/lib/chef/provider/package/rpm.rb:98:in `install_package'\",\"/opt/chef/embedded/lib/ruby/gems/1.9.1/gems/chef-11.12.4/lib/chef/provider/package.rb:82:in `block in action_install'\",\"/opt/chef/embedded/lib/ruby/gems/1.9.1/gems/chef-11.12.4/lib/chef/mixin/why_run.rb:52:in `call'\",\"/opt/chef/embedded/lib/ruby/gems/1.9.1/gems/chef-11.12.4/lib/chef/mixin/why_run.rb:52:in `add_action'\",\"/opt/chef/embedded/lib/ruby/gems/1.9.1/gems/chef-11.12.4/lib/chef/provider.rb:155:in `converge_by'\",\"/opt/chef/embedded/lib/ruby/gems/1.9.1/gems/chef-11.12.4/lib/chef/provider/package.rb:80:in `action_install'\",\"/opt/chef/embedded/lib/ruby/gems/1.9.1/gems/chef-11.12.4/lib/chef/provider.rb:120:in `run_action'\",\"/opt/chef/embedded/lib/ruby/gems/1.9.1/gems/chef-11.12.4/lib/chef/resource.rb:637:in `run_action'\",\"/opt/chef/embedded/lib/ruby/gems/1.9.1/gems/chef-11.12.4/lib/chef/runner.rb:49:in `run_action'\",\"/opt/chef/embedded/lib/ruby/gems/1.9.1/gems/chef-11.12.4/lib/chef/runner.rb:81:in `block (2 levels) in converge'\",\"/opt/chef/embedded/lib/ruby/gems/1.9.1/gems/chef-11.12.4/lib/chef/runner.rb:81:in `each'\",\"/opt/chef/embedded/lib/ruby/gems/1.9.1/gems/chef-11.12.4/lib/chef/runner.rb:81:in `block in converge'\",\"/opt/chef/embedded/lib/ruby/gems/1.9.1/gems/chef-11.12.4/lib/chef/resource_collection.rb:98:in `block in execute_each_resource'\",\"/opt/chef/embedded/lib/ruby/gems/1.9.1/gems/chef-11.12.4/lib/chef/resource_collection/stepable_iterator.rb:116:in `call'\",\"/opt/chef/embedded/lib/ruby/gems/1.9.1/gems/chef-11.12.4/lib/chef/resource_collection/stepable_iterator.rb:116:in `call_iterator_block'\",\"/opt/chef/embedded/lib/ruby/gems/1.9.1/gems/chef-11.12.4/lib/chef/resource_collection/stepable_iterator.rb:85:in `step'\",\"/opt/chef/embedded/lib/ruby/gems/1.9.1/gems/chef-11.12.4/lib/chef/resource_collection/stepable_iterator.rb:104:in `iterate'\",\"/opt/chef/embedded/lib/ruby/gems/1.9.1/gems/chef-11.12.4/lib/chef/resource_collection/stepable_iterator.rb:55:in `each_with_index'\",\"/opt/chef/embedded/lib/ruby/gems/1.9.1/gems/chef-11.12.4/lib/chef/resource_collection.rb:96:in `execute_each_resource'\",\"/opt/chef/embedded/lib/ruby/gems/1.9.1/gems/chef-11.12.4/lib/chef/runner.rb:80:in `converge'\",\"/opt/chef/embedded/lib/ruby/gems/1.9.1/gems/chef-11.12.4/lib/chef/client.rb:345:in `converge'\",\"/opt/chef/embedded/lib/ruby/gems/1.9.1/gems/chef-11.12.4/lib/chef/client.rb:431:in `do_run'\",\"/opt/chef/embedded/lib/ruby/gems/1.9.1/gems/chef-11.12.4/lib/chef/client.rb:213:in `block in run'\",\"/opt/chef/embedded/lib/ruby/gems/1.9.1/gems/chef-11.12.4/lib/chef/client.rb:207:in `fork'\",\"/opt/chef/embedded/lib/ruby/gems/1.9.1/gems/chef-11.12.4/lib/chef/client.rb:207:in `run'\",\"/opt/chef/embedded/lib/ruby/gems/1.9.1/gems/chef-11.12.4/lib/chef/application.rb:217:in `run_chef_client'\",\"/opt/chef/embedded/lib/ruby/gems/1.9.1/gems/chef-11.12.4/lib/chef/application/client.rb:328:in `block in run_application'\",\"/opt/chef/embedded/lib/ruby/gems/1.9.1/gems/chef-11.12.4/lib/chef/application/client.rb:317:in `loop'\",\"/opt/chef/embedded/lib/ruby/gems/1.9.1/gems/chef-11.12.4/lib/chef/application/client.rb:317:in `run_application'\",\"/opt/chef/embedded/lib/ruby/gems/1.9.1/gems/chef-11.12.4/lib/chef/application.rb:67:in `run'\",\"/opt/chef/embedded/lib/ruby/gems/1.9.1/gems/chef-11.12.4/bin/chef-client:26:in `<top (required)>'\",\"/usr/bin/chef-client:23:in `load'\",\"/usr/bin/chef-client:23:in `<main>'\"]", "description"=>{"title"=>"Error executing action `install` on resource 'package[pgdg-centos93]'", "sections"=>[{"Chef::Exceptions::Exec"=>"rpm -U /var/chef/cache/pgdg-centos93-9.3-1.noarch.rpm returned 2, expected 0\n---- Begin output of rpm -U /var/chef/cache/pgdg-centos93-9.3-1.noarch.rpm ----\nSTDOUT: STDERR: \tpackage pgdg-centos93-9.3-2.noarch (which is newer than pgdg-centos93-9.3-1.noarch) is already installed\n---- End output of rpm -U /var/chef/cache/pgdg-centos93-9.3-1.noarch.rpm ----\n"}, {"Resource Declaration:"=>"# In /var/chef/cache/cookbooks/postgresql/recipes/yum_pgdg_postgresql.rb\n\n 43: package repo_rpm_package do\n 44: provider Chef::Provider::Package::Rpm\n 45: source \"\#{Chef::Config[:file_cache_path]}/\#{repo_rpm_filename}\"\n 46: action :install\n 47: end\n"}, {"Compiled Resource:"=>"# Declared in /var/chef/cache/cookbooks/postgresql/recipes/yum_pgdg_postgresql.rb:43:in `from_file'\n\npackage(\"pgdg-centos93\") do\n provider Chef::Provider::Package::Rpm\n action [:install]\n retries 0\n retry_delay 2\n guard_interpreter :default\n package_name \"pgdg-centos93\"\n source \"/var/chef/cache/pgdg-centos93-9.3-1.noarch.rpm\"\n version \"9.3-1\"\n cookbook_name \"postgresql\"\n recipe_name \"yum_pgdg_postgresql\"\nend\n"}]}}}, "start_time"=>"2016-02-02 14:04:41 +0000", "end_time"=>"2016-02-02 14:05:17 +0000"}
[2016-02-02T14:05:17+00:00] DEBUG: Sending compressed run data...
[2016-02-02T14:05:17+00:00] DEBUG: Signing the request as ec2-production-web
[2016-02-02T14:05:17+00:00] DEBUG: String to sign: 'Method:POST
Hashed Path:ZNfsXWm0ScG9Y7tct4xU2t8Ruc4=
X-Ops-Content-Hash:JebmaJ0FR9SKdg1Whn6EXf9AjeY=
X-Ops-Timestamp:2016-02-02T14:05:17Z
X-Ops-UserId:ec2-production-web'
Header hash: {"X-Ops-Sign"=>"algorithm=sha1;version=1.0;", "X-Ops-Userid"=>"ec2-production-web", "X-Ops-Timestamp"=>"2016-02-02T14:05:17Z", "X-Ops-Content-Hash"=>"JebmaJ0FR9SKdg1Whn6EXf9AjeY=", "X-Ops-Authorization-1"=>"i25tlVgWl76JsqbNZFU9HKNBWbeIUUdOOIkInmsgw4cPI8zctpzNRZi9e5JF", "X-Ops-Authorization-2"=>"flygf7pnwtIH0UFpUJSukmHAklqGL2pQlMy3oRoSxQhzvYTW+njD4SznjEY/", "X-Ops-Authorization-3"=>"Cf0nkNUkf0mlch5oTiU9PD6md/irpT0IIv+fYCBS1HRoYpbiJVWuYqHchgOo", "X-Ops-Authorization-4"=>"Ir0DnFtZ4SFucPATkHWQMxx/c1tAY1sSoQZv02kceDJVPuMAarRI8gKzOQ6+", "X-Ops-Authorization-5"=>"Z6TBmJWXVqdRU4CAvjihr87hVadAYQQZURuQCEwsnxFUnxDZkrz1jDV+PnhQ", "X-Ops-Authorization-6"=>"uXPPOgdI5DuF45RvJfoFO8AvTkg+QCEwkqwCAY+e3w=="}
[2016-02-02T14:05:17+00:00] DEBUG: Initiating POST to https://api.opscode.com/organizations/[filtered]/reports/nodes/ec2-production-web/runs/ac041d25-eba7-4865-a20a-d16ffa60acef
[2016-02-02T14:05:17+00:00] DEBUG: ---- HTTP Request Header Data: ----
[2016-02-02T14:05:17+00:00] DEBUG: X-Ops-Reporting-Protocol-Version: 0.1.0
[2016-02-02T14:05:17+00:00] DEBUG: Content-Encoding: gzip
[2016-02-02T14:05:17+00:00] DEBUG: X-OPS-SIGN: algorithm=sha1;version=1.0;
[2016-02-02T14:05:17+00:00] DEBUG: X-OPS-USERID: ec2-production-web
[2016-02-02T14:05:17+00:00] DEBUG: X-OPS-TIMESTAMP: 2016-02-02T14:05:17Z
[2016-02-02T14:05:17+00:00] DEBUG: X-OPS-CONTENT-HASH: JebmaJ0FR9SKdg1Whn6EXf9AjeY=
[2016-02-02T14:05:17+00:00] DEBUG: X-OPS-AUTHORIZATION-1: i25tlVgWl76JsqbNZFU9HKNBWbeIUUdOOIkInmsgw4cPI8zctpzNRZi9e5JF
[2016-02-02T14:05:17+00:00] DEBUG: X-OPS-AUTHORIZATION-2: flygf7pnwtIH0UFpUJSukmHAklqGL2pQlMy3oRoSxQhzvYTW+njD4SznjEY/
[2016-02-02T14:05:17+00:00] DEBUG: X-OPS-AUTHORIZATION-3: Cf0nkNUkf0mlch5oTiU9PD6md/irpT0IIv+fYCBS1HRoYpbiJVWuYqHchgOo
[2016-02-02T14:05:17+00:00] DEBUG: X-OPS-AUTHORIZATION-4: Ir0DnFtZ4SFucPATkHWQMxx/c1tAY1sSoQZv02kceDJVPuMAarRI8gKzOQ6+
[2016-02-02T14:05:17+00:00] DEBUG: X-OPS-AUTHORIZATION-5: Z6TBmJWXVqdRU4CAvjihr87hVadAYQQZURuQCEwsnxFUnxDZkrz1jDV+PnhQ
[2016-02-02T14:05:17+00:00] DEBUG: X-OPS-AUTHORIZATION-6: uXPPOgdI5DuF45RvJfoFO8AvTkg+QCEwkqwCAY+e3w==
[2016-02-02T14:05:17+00:00] DEBUG: HOST: api.opscode.com:443
[2016-02-02T14:05:17+00:00] DEBUG: X-REMOTE-REQUEST-ID: ac041d25-eba7-4865-a20a-d16ffa60acef
[2016-02-02T14:05:17+00:00] DEBUG: Content-Length: 1391
[2016-02-02T14:05:17+00:00] DEBUG: ---- End HTTP Request Header Data ----
[2016-02-02T14:05:18+00:00] DEBUG: ---- HTTP Status and Header Data: ----
[2016-02-02T14:05:18+00:00] DEBUG: HTTP 1.1 200 OK
[2016-02-02T14:05:18+00:00] DEBUG: content-type: application/json
[2016-02-02T14:05:18+00:00] DEBUG: date: Tue, 02 Feb 2016 14:05:18 GMT
[2016-02-02T14:05:18+00:00] DEBUG: server: openresty/1.9.3.1
[2016-02-02T14:05:18+00:00] DEBUG: content-length: 2
[2016-02-02T14:05:18+00:00] DEBUG: connection: Close
[2016-02-02T14:05:18+00:00] DEBUG: ---- End HTTP Status/Header Data ----
[2016-02-02T14:05:18+00:00] ERROR: package[pgdg-centos93] (postgresql::yum_pgdg_postgresql line 43) had an error: Chef::Exceptions::Exec: rpm -U /var/chef/cache/pgdg-centos93-9.3-1.noarch.rpm returned 2, expected 0
---- Begin output of rpm -U /var/chef/cache/pgdg-centos93-9.3-1.noarch.rpm ----
STDOUT: STDERR: package pgdg-centos93-9.3-2.noarch (which is newer than pgdg-centos93-9.3-1.noarch) is already installed
---- End output of rpm -U /var/chef/cache/pgdg-centos93-9.3-1.noarch.rpm ----
[2016-02-02T14:05:18+00:00] FATAL: Chef::Exceptions::ChildConvergeError: Chef run process exited unsuccessfully (exit code 1)
[ed#ip-10-0-0-250 ~]$
UPDATE 2
Removed package pgdg-centos93-9.3-2.noarch which was newer than the one Chef was trying to install
yum remove pgdg-centos93-9.3-2.noarch
then ran sudo chef-client -l debug again.
Ran into another blocking issue that once resolved takes me to the first problem I had. So I am going in circles. Will validate the one helpful answer because, I believe that there is no easy solution to my problem.
The error is that the command rpm -U /var/chef/cache/pgdg-centos93-9.3-1.noarch.rpm has an exit code of 2, which indicates there was an error. Either run that command by hand to see the error details or run chef-client -l debug to enable Chef's debug-level output which will include the stdout and stderr from the subprocess.
So your broader question: Chef is not magic nor is it a Platform-as-a-Service on its own. Chef itself offers fairly basic primitives like package installs and templated config files, and in general those just do what they say on the tin. When you start either building your own complex cookbooks or using the community cookbooks you can get much more turn-key magic like "add this to your run list and out pops a PostgreSQL server" but with that complexity comes a lot more bugs. Community cookbooks especially are of widely varying quality and you should always check if something is from an author you personally or institutionally trust and if not probably read all the code in it and make sure you like it. Same basic process as with any software development environment when you start consuming external tools/libraries/gems/packages/etc.

Peer authentication failed

At my VPS server, I do:
rake db:migrate RAILS_ENV=production
But, I get this error:
/usr/local/rvm/gems/ruby-2.2.1/gems/fog-core-1.24.0/lib/fog/core/collection.rb:148: warning: circular argument reference - filters
/usr/local/rvm/gems/ruby-2.2.1/gems/fog-1.23.0/lib/fog/rackspace/mock_data.rb:42: warning: duplicated key at line 80 ignored: "name"
/usr/local/rvm/gems/ruby-2.2.1/gems/simple_form-3.0.2/lib/simple_form/inputs/boolean_input.rb:38: warning: circular argument reference - unchecked_value
rake aborted!
PG::ConnectionBad: FATAL: Peer authentication failed for user "myuser"
/usr/local/rvm/gems/ruby-2.2.1/gems/activerecord-4.1.6/lib/active_record/connection_adapters/postgresql_adapter.rb:888:in `initialize'
/usr/local/rvm/gems/ruby-2.2.1/gems/activerecord-4.1.6/lib/active_record/connection_adapters/postgresql_adapter.rb:888:in `new'
/usr/local/rvm/gems/ruby-2.2.1/gems/activerecord-4.1.6/lib/active_record/connection_adapters/postgresql_adapter.rb:888:in `connect'
/usr/local/rvm/gems/ruby-2.2.1/gems/activerecord-4.1.6/lib/active_record/connection_adapters/postgresql_adapter.rb:568:in `initialize'
/usr/local/rvm/gems/ruby-2.2.1/gems/activerecord-4.1.6/lib/active_record/connection_adapters/postgresql_adapter.rb:41:in `new'
/usr/local/rvm/gems/ruby-2.2.1/gems/activerecord-4.1.6/lib/active_record/connection_adapters/postgresql_adapter.rb:41:in `postgresql_connection'
/usr/local/rvm/gems/ruby-2.2.1/gems/activerecord-4.1.6/lib/active_record/connection_adapters/abstract/connection_pool.rb:435:in `new_connection'
/usr/local/rvm/gems/ruby-2.2.1/gems/activerecord-4.1.6/lib/active_record/connection_adapters/abstract/connection_pool.rb:445:in `checkout_new_connection'
/usr/local/rvm/gems/ruby-2.2.1/gems/activerecord-4.1.6/lib/active_record/connection_adapters/abstract/connection_pool.rb:416:in `acquire_connection'
/usr/local/rvm/gems/ruby-2.2.1/gems/activerecord-4.1.6/lib/active_record/connection_adapters/abstract/connection_pool.rb:351:in `block in checkout'
/usr/local/rvm/gems/ruby-2.2.1/gems/activerecord-4.1.6/lib/active_record/connection_adapters/abstract/connection_pool.rb:350:in `checkout'
/usr/local/rvm/gems/ruby-2.2.1/gems/activerecord-4.1.6/lib/active_record/connection_adapters/abstract/connection_pool.rb:265:in `block in connection'
/usr/local/rvm/gems/ruby-2.2.1/gems/activerecord-4.1.6/lib/active_record/connection_adapters/abstract/connection_pool.rb:264:in `connection'
/usr/local/rvm/gems/ruby-2.2.1/gems/activerecord-4.1.6/lib/active_record/connection_adapters/abstract/connection_pool.rb:541:in `retrieve_connection'
/usr/local/rvm/gems/ruby-2.2.1/gems/activerecord-4.1.6/lib/active_record/connection_handling.rb:113:in `retrieve_connection'
/usr/local/rvm/gems/ruby-2.2.1/gems/activerecord-4.1.6/lib/active_record/connection_handling.rb:87:in `connection'
/usr/local/rvm/gems/ruby-2.2.1/gems/activerecord-4.1.6/lib/active_record/migration.rb:909:in `initialize'
/usr/local/rvm/gems/ruby-2.2.1/gems/activerecord-4.1.6/lib/active_record/migration.rb:807:in `new'
/usr/local/rvm/gems/ruby-2.2.1/gems/activerecord-4.1.6/lib/active_record/migration.rb:807:in `up'
/usr/local/rvm/gems/ruby-2.2.1/gems/activerecord-4.1.6/lib/active_record/migration.rb:785:in `migrate'
/usr/local/rvm/gems/ruby-2.2.1/gems/activerecord-4.1.6/lib/active_record/railties/databases.rake:34:in `block (2 levels) in <top (required)>'
Tasks: TOP => db:migrate
database.yml:
production:
adapter: postgresql
encoding: unicode
database: mydatabase
pool: 5
username: myuser
password: mypassword
What possible reason would this be? although myuser is the owner of mydatabase
How solve this?

Undefined method when running db:schema:dump using pg_power gem

I have a migration I am trying to run to generate postgresql schemas using pg_power.
class CreateSchemas < ActiveRecord::Migration
def change
create_schema 'deprecated'
create_schema 'leaf'
create_schema 'mmp'
create_schema 'mmp_static'
create_schema 'nass'
create_schema 'static'
end
end
When I run the migration, I get the following error
** Invoke db:migrate (first_time)
** Invoke environment (first_time)
** Execute environment
** Invoke db:load_config (first_time)
** Execute db:load_config
** Execute db:migrate
** Invoke db:_dump (first_time)
** Execute db:_dump
** Invoke db:schema:dump (first_time)
** Invoke environment
** Invoke db:load_config
** Execute db:schema:dump
rake aborted!
undefined method `[]' for nil:NilClass
/Users/Pro777/.bundler/ruby/2.0.0/pg_power-36a643247425/lib/pg_power/schema_dumper/extension_methods.rb:17:in `block in dump_extensions'
/Users/Pro777/.bundler/ruby/2.0.0/pg_power-36a643247425/lib/pg_power/schema_dumper/extension_methods.rb:15:in `map'
/Users/Pro777/.bundler/ruby/2.0.0/pg_power-36a643247425/lib/pg_power/schema_dumper/extension_methods.rb:15:in `dump_extensions'
/Users/Pro777/.bundler/ruby/2.0.0/pg_power-36a643247425/lib/pg_power/schema_dumper/extension_methods.rb:6:in `header_with_extensions'
/Library/Ruby/Gems/2.0.0/gems/activerecord-4.0.0/lib/active_record/schema_dumper.rb:26:in `dump'
/Library/Ruby/Gems/2.0.0/gems/activerecord-4.0.0/lib/active_record/schema_dumper.rb:21:in `dump'
/Library/Ruby/Gems/2.0.0/gems/activerecord-4.0.0/lib/active_record/railties/databases.rake:244:in `block (4 levels) in <top (required)>'
/Library/Ruby/Gems/2.0.0/gems/activerecord-4.0.0/lib/active_record/railties/databases.rake:243:in `open'
/Library/Ruby/Gems/2.0.0/gems/activerecord-4.0.0/lib/active_record/railties/databases.rake:243:in `block (3 levels) in <top (required)>'
I should say I'm using ruby 2.0, rails 4.0, and the rails4 branch of pg_power.
The library was tested with Ruby <= 1.9.3 (you are using 2.0) and ActiveRecord 3.
It was tested with Rails 3.1.x and 3.2.x, Ruby 1.8.7 REE and 1.9.3.
Moreover, there seems to be some incompatibilities with Rails 4.
The library doesn't use public ActiveRecord API but uses monkey patching (alias_method_chain). I won't be surprise if the exception is because the library does not currently work with Rails 4.
In order to fix the issue you should look what changed in the ActiveRecord internals from Rails 3 to Rails 4 and update the corresponding overrides in the Gem. It may be a small or huge effort, depending on the amount of changes.
I encourage you find an alternative and report the issue in the official issue tracker.
When you was trying to run pg_power against rails4, it really didn't work well.
Now, pg_power supports rails4, you must use 2.X.X version.