Closed Bluewind8791 closed 2 years ago
cd /var/log/aws/codedeploy-agent/
해당 날짜의 로그 확인
2022-03-27 23:59:58 ERROR [codedeploy-agent(4046)]: Plugin codedeploy could not be loaded: cannot load such file -- webrick/httputils.
2022-03-27 23:59:58 ERROR [codedeploy-agent(4046)]: booting child: error during start or run: LoadError - cannot load such file -- webrick/httputils - <internal:/usr/share/rubygems/rubygems/core_ext/kernel_require.rb>:148:in `require'
<internal:/usr/share/rubygems/rubygems/core_ext/kernel_require.rb>:148:in `require'
/opt/codedeploy-agent/vendor/gems/aws-sdk-s3-1.81.0/lib/aws-sdk-s3/legacy_signer.rb:7:in `<top (required)>'
<internal:/usr/share/rubygems/rubygems/core_ext/kernel_require.rb>:96:in `require'
<internal:/usr/share/rubygems/rubygems/core_ext/kernel_require.rb>:96:in `require'
/opt/codedeploy-agent/vendor/gems/aws-sdk-s3-1.81.0/lib/aws-sdk-s3/customizations.rb:10:in `<top (required)>'
/opt/codedeploy-agent/vendor/gems/aws-sdk-s3-1.81.0/lib/aws-sdk-s3.rb:39:in `require_relative'
/opt/codedeploy-agent/vendor/gems/aws-sdk-s3-1.81.0/lib/aws-sdk-s3.rb:39:in `<top (required)>'
<internal:/usr/share/rubygems/rubygems/core_ext/kernel_require.rb>:160:in `require'
<internal:/usr/share/rubygems/rubygems/core_ext/kernel_require.rb>:160:in `rescue in require'
<internal:/usr/share/rubygems/rubygems/core_ext/kernel_require.rb>:149:in `require'
/opt/codedeploy-agent/lib/instance_agent/plugins/codedeploy/command_executor.rb:4:in `<top (required)>'
/opt/codedeploy-agent/lib/instance_agent/plugins/codedeploy/register_plugin.rb:2:in `require_relative'
/opt/codedeploy-agent/lib/instance_agent/plugins/codedeploy/register_plugin.rb:2:in `<top (required)>'
<internal:/usr/share/rubygems/rubygems/core_ext/kernel_require.rb>:148:in `require'
<internal:/usr/share/rubygems/rubygems/core_ext/kernel_require.rb>:148:in `require'
/opt/codedeploy-agent/lib/instance_agent/runner/child.rb:17:in `block in load_plugins'
/opt/codedeploy-agent/lib/instance_agent/runner/child.rb:13:in `each'
/opt/codedeploy-agent/lib/instance_agent/runner/child.rb:13:in `load_plugins'
/opt/codedeploy-agent/lib/instance_agent/runner/child.rb:29:in `prepare_run'
/opt/codedeploy-agent/vendor/gems/process_manager-0.0.13/lib/process_manager/child.rb:64:in `block in prepare_run_with_error_handling'
/opt/codedeploy-agent/lib/instance_agent/runner/child.rb:78:in `with_error_handling'
/opt/codedeploy-agent/vendor/gems/process_manager-0.0.13/lib/process_manager/child.rb:63:in `prepare_run_with_error_handling'
/opt/codedeploy-agent/vendor/gems/process_manager-0.0.13/lib/process_manager/child.rb:20:in `start'
/opt/codedeploy-agent/vendor/gems/process_manager-0.0.13/lib/process_manager/master.rb:206:in `block in spawn_child'
/opt/codedeploy-agent/vendor/gems/process_manager-0.0.13/lib/process_manager/master.rb:204:in `fork'
/opt/codedeploy-agent/vendor/gems/process_manager-0.0.13/lib/process_manager/master.rb:204:in `spawn_child'
/opt/codedeploy-agent/vendor/gems/process_manager-0.0.13/lib/process_manager/master.rb:283:in `block (2 levels) in replace_terminated_children'
/opt/codedeploy-agent/vendor/gems/logging-1.8.2/lib/logging/diagnostic_context.rb:323:in `block in create_with_logging_context'
gem install webrick
로 webrick를 설치하여 다시 시도.
아마 ruby를 2에서 3으로 버전업하면서 없어진듯 합니다.
ruby 3를 설치한것이 화근이였던거같아 깡그리 ruby를 삭제. 다시 설치 시도.
삭제하고 yum install ruby
로 설치하니 3버전 이상이 설치되어서 rvm 패키지 관리자를 통하여 설치
rvm 으로 2.7.5를 설치하였지만 deploy install이 설치가 되지않아서 다음의 글을 참고하여 설치
2022-03-28 18:16:07 ERROR [codedeploy-agent(30566)]: Plugin codedeploy could not be loaded: cannot load such file -- webrick/httputils.
2022-03-28 18:16:07 ERROR [codedeploy-agent(30566)]: booting child: error during start or run: LoadError - cannot load such file -- webrick/httputils - <internal:/usr/share/rubygems/rubygems/core_ext/kernel_require.rb>:85:in `require'
새로운 인스턴스로 이관하여 해결
CodeDeploy Event Log