Opswork running chef11 on old debian server suddenly stopped working

0

Hi guys, i recently took over this project as the IT and my job is to keep it running till we move to a new tech stack.

Today as we were deploying like usual on the legacy infrastructure, we came across this issue ( please note that i am not familiar with chef or cookbooks ).

Appreciate all the help out there:

================================================================================
Error executing action `run` on resource 'ruby_block[Install the cookbooks specified in the Berksfile and their dependencies]'
================================================================================
 
 
Mixlib::ShellOut::ShellCommandFailed
------------------------------------
Expected process to exit with [0], but received '1'
---- Begin output of /opt/aws/opsworks/local/bin/berks vendor /opt/aws/opsworks/current/berkshelf-cookbooks ----
STDOUT: Resolving cookbook dependencies...
Fetching 'mongodb' from source at mongodb
Fetching cookbook index from https://supermarket.getchef.com...
STDERR: /opt/aws/opsworks/local/lib/ruby/gems/2.0.0/gems/ridley-4.1.0/lib/ridley/chef/cookbook.rb:40:in `from_path': no metadata.json or metadata.rb found at /var/lib/aws/opsworks/berkshelf_cache/cookbooks/php5-ppa-3752532f84d24f64796b56f9b2ffac0fbe429931 (IOError)
from /opt/aws/opsworks/local/lib/ruby/gems/2.0.0/gems/berkshelf-3.2.0/lib/berkshelf/locations/git.rb:85:in `cached_cookbook'
from /opt/aws/opsworks/local/lib/ruby/gems/2.0.0/gems/berkshelf-3.2.0/lib/berkshelf/dependency.rb:126:in `cached_cookbook'
from /opt/aws/opsworks/local/lib/ruby/gems/2.0.0/gems/berkshelf-3.2.0/lib/berkshelf/installer.rb:166:in `block in install_from_universe'
from /opt/aws/opsworks/local/lib/ruby/gems/2.0.0/gems/berkshelf-3.2.0/lib/berkshelf/installer.rb:164:in `each'
from /opt/aws/opsworks/local/lib/ruby/gems/2.0.0/gems/berkshelf-3.2.0/lib/berkshelf/installer.rb:164:in `install_from_universe'
from /opt/aws/opsworks/local/lib/ruby/gems/2.0.0/gems/berkshelf-3.2.0/lib/berkshelf/installer.rb:39:in `run'
from /opt/aws/opsworks/local/lib/ruby/gems/2.0.0/gems/berkshelf-3.2.0/lib/berkshelf/berksfile.rb:370:in `install'
from /opt/aws/opsworks/local/lib/ruby/gems/2.0.0/gems/berkshelf-3.2.0/lib/berkshelf/berksfile.rb:579:in `vendor'
from /opt/aws/opsworks/local/lib/ruby/gems/2.0.0/gems/berkshelf-3.2.0/lib/berkshelf/cli.rb:387:in `vendor'
from /opt/aws/opsworks/local/lib/ruby/gems/2.0.0/gems/thor-0.19.1/lib/thor/command.rb:27:in `run'
from /opt/aws/opsworks/local/lib/ruby/gems/2.0.0/gems/thor-0.19.1/lib/thor/invocation.rb:126:in `invoke_command'
from /opt/aws/opsworks/local/lib/ruby/gems/2.0.0/gems/thor-0.19.1/lib/thor.rb:359:in `dispatch'
from /opt/aws/opsworks/local/lib/ruby/gems/2.0.0/gems/berkshelf-3.2.0/lib/berkshelf/cli.rb:52:in `dispatch'
from /opt/aws/opsworks/local/lib/ruby/gems/2.0.0/gems/thor-0.19.1/lib/thor/base.rb:440:in `start'
from /opt/aws/opsworks/local/lib/ruby/gems/2.0.0/gems/berkshelf-3.2.0/lib/berkshelf/cli.rb:27:in `execute!'
from /opt/aws/opsworks/local/lib/ruby/gems/2.0.0/gems/berkshelf-3.2.0/bin/berks:5:in `<top (required)>'
from /opt/aws/opsworks/local/bin/berks:23:in `load'
from /opt/aws/opsworks/local/bin/berks:23:in `<main>'
---- End output of /opt/aws/opsworks/local/bin/berks vendor /opt/aws/opsworks/current/berkshelf-cookbooks ----
Ran /opt/aws/opsworks/local/bin/berks vendor /opt/aws/opsworks/current/berkshelf-cookbooks returned 1
 
 
Cookbook Trace:
---------------
/var/lib/aws/opsworks/cache.stage1/cookbooks/opsworks_commons/libraries/shellout.rb:9:in `shellout'
/var/lib/aws/opsworks/cache.stage1/cookbooks/opsworks_berkshelf/providers/runner.rb:13:in `block (3 levels) in class_from_file'
 
 
Resource Declaration:
---------------------
# In /var/lib/aws/opsworks/cache.stage1/cookbooks/opsworks_berkshelf/providers/runner.rb
 
11:   ruby_block 'Install the cookbooks specified in the Berksfile and their dependencies' do
12:     block do
13:       Chef::Log.info OpsWorks::ShellOut.shellout(
14:         berks_install_command,
15:         :cwd => ::File.dirname(OpsWorks::Berkshelf.berksfile),
16:         :environment  => {
17:           "BERKSHELF_PATH" => Opsworks::InstanceAgent::Environment.berkshelf_cache_path,
18:           "LC_ALL" => "en_US.UTF-8"
19:         }
20:       )
21: 
22:       ::FileUtils.rm_rf Opsworks::InstanceAgent::Environment.berkshelf_cache_path
23:     end
24: 
25:     only_if do
26:       OpsWorks::Berkshelf.berkshelf_installed? && OpsWorks::Berkshelf.berksfile_available?
27:     end
28:   end
29: end
 
 
 
Compiled Resource:
------------------
# Declared in /var/lib/aws/opsworks/cache.stage1/cookbooks/opsworks_berkshelf/providers/runner.rb:11:in `block in class_from_file'
 
ruby_block("Install the cookbooks specified in the Berksfile and their dependencies") do
action "run"
retries 0
retry_delay 2
block_name "Install the cookbooks specified in the Berksfile and their dependencies"
cookbook_name "opsworks_berkshelf"
block #<Proc:0x007fde75baca10@/var/lib/aws/opsworks/cache.stage1/cookbooks/opsworks_berkshelf/providers/runner.rb:12>
only_if { #code block }
end
 
 
 
[2023-08-31T14:27:41+02:00] INFO: Running queued delayed notifications before re-raising exception
[2023-08-31T14:27:41+02:00] ERROR: Running exception handlers
[2023-08-31T14:27:41+02:00] ERROR: Exception handlers complete
[2023-08-31T14:27:41+02:00] FATAL: Stacktrace dumped to /var/lib/aws/opsworks/cache.stage1/chef-stacktrace.out
[2023-08-31T14:27:41+02:00] ERROR: ruby_block[Install the cookbooks specified in the Berksfile and their dependencies] (/var/lib/aws/opsworks/cache.stage1/cookbooks/opsworks_berkshelf/providers/runner.rb line 11) had an error: Mixlib::ShellOut::ShellCommandFailed: Expected process to exit with [0], but received '1'
---- Begin output of /opt/aws/opsworks/local/bin/berks vendor /opt/aws/opsworks/current/berkshelf-cookbooks ----
STDOUT: Resolving cookbook dependencies...
Fetching 'mongodb' from source at mongodb
Fetching cookbook index from https://supermarket.getchef.com...
STDERR: /opt/aws/opsworks/local/lib/ruby/gems/2.0.0/gems/ridley-4.1.0/lib/ridley/chef/cookbook.rb:40:in `from_path': no metadata.json or metadata.rb found at /var/lib/aws/opsworks/berkshelf_cache/cookbooks/php5-ppa-3752532f84d24f64796b56f9b2ffac0fbe429931 (IOError)
from /opt/aws/opsworks/local/lib/ruby/gems/2.0.0/gems/berkshelf-3.2.0/lib/berkshelf/locations/git.rb:85:in `cached_cookbook'
from /opt/aws/opsworks/local/lib/ruby/gems/2.0.0/gems/berkshelf-3.2.0/lib/berkshelf/dependency.rb:126:in `cached_cookbook'
from /opt/aws/opsworks/local/lib/ruby/gems/2.0.0/gems/berkshelf-3.2.0/lib/berkshelf/installer.rb:166:in `block in install_from_universe'
from /opt/aws/opsworks/local/lib/ruby/gems/2.0.0/gems/berkshelf-3.2.0/lib/berkshelf/installer.rb:164:in `each'
from /opt/aws/opsworks/local/lib/ruby/gems/2.0.0/gems/berkshelf-3.2.0/lib/berkshelf/installer.rb:164:in `install_from_universe'
from /opt/aws/opsworks/local/lib/ruby/gems/2.0.0/gems/berkshelf-3.2.0/lib/berkshelf/installer.rb:39:in `run'
from /opt/aws/opsworks/local/lib/ruby/gems/2.0.0/gems/berkshelf-3.2.0/lib/berkshelf/berksfile.rb:370:in `install'
from /opt/aws/opsworks/local/lib/ruby/gems/2.0.0/gems/berkshelf-3.2.0/lib/berkshelf/berksfile.rb:579:in `vendor'
from /opt/aws/opsworks/local/lib/ruby/gems/2.0.0/gems/berkshelf-3.2.0/lib/berkshelf/cli.rb:387:in `vendor'
from /opt/aws/opsworks/local/lib/ruby/gems/2.0.0/gems/thor-0.19.1/lib/thor/command.rb:27:in `run'
from /opt/aws/opsworks/local/lib/ruby/gems/2.0.0/gems/thor-0.19.1/lib/thor/invocation.rb:126:in `invoke_command'
from /opt/aws/opsworks/local/lib/ruby/gems/2.0.0/gems/thor-0.19.1/lib/thor.rb:359:in `dispatch'
from /opt/aws/opsworks/local/lib/ruby/gems/2.0.0/gems/berkshelf-3.2.0/lib/berkshelf/cli.rb:52:in `dispatch'
from /opt/aws/opsworks/local/lib/ruby/gems/2.0.0/gems/thor-0.19.1/lib/thor/base.rb:440:in `start'
from /opt/aws/opsworks/local/lib/ruby/gems/2.0.0/gems/berkshelf-3.2.0/lib/berkshelf/cli.rb:27:in `execute!'
from /opt/aws/opsworks/local/lib/ruby/gems/2.0.0/gems/berkshelf-3.2.0/bin/berks:5:in `<top (required)>'
from /opt/aws/opsworks/local/bin/berks:23:in `load'
from /opt/aws/opsworks/local/bin/berks:23:in `<main>'
---- End output of /opt/aws/opsworks/local/bin/berks vendor /opt/aws/opsworks/current/berkshelf-cookbooks ----
Ran /opt/aws/opsworks/local/bin/berks vendor /opt/aws/opsworks/current/berkshelf-cookbooks returned 1
[2023-08-31T14:27:41+02:00] FATAL: Chef::Exceptions::ChildConvergeError: Chef run process exited unsuccessfully (exit code 1)
Mike
gefragt vor 8 Monaten59 Aufrufe
Keine Antworten

Du bist nicht angemeldet. Anmelden um eine Antwort zu veröffentlichen.

Eine gute Antwort beantwortet die Frage klar, gibt konstruktives Feedback und fördert die berufliche Weiterentwicklung des Fragenstellers.

Richtlinien für die Beantwortung von Fragen