Skip to content

CodeDeployAgent service shows its status running, but logs shows error #334

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Closed
AadiMehta opened this issue Oct 5, 2022 · 7 comments
Closed

Comments

@AadiMehta
Copy link

Error in the logs:

2022-09-28 00:32:01 INFO  [codedeploy-agent(49989)]: master 49989: been told to replace child 92509
2022-09-28 00:32:01 INFO  [codedeploy-agent(49989)]: master 49989: not enough child processes running - missing at least 1 - respawning
2022-09-28 00:32:06 INFO  [codedeploy-agent(49989)]: master 49989: Spawned child 1/1
2022-09-28 00:32:07 ERROR [codedeploy-agent(92510)]: Plugin codedeploy could not be loaded: cannot load such file -- webrick/httputils.
2022-09-28 00:32:07 ERROR [codedeploy-agent(92510)]: booting child: error during start or run: LoadError - cannot load such file -- webrick/httputils - <internal:/usr/lib/ruby/vendor_ruby/rubygems/core_ext/kernel_require.rb>:148:in `require'
<internal:/usr/lib/ruby/vendor_ruby/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/lib/ruby/vendor_ruby/rubygems/core_ext/kernel_require.rb>:96:in `require'
<internal:/usr/lib/ruby/vendor_ruby/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/lib/ruby/vendor_ruby/rubygems/core_ext/kernel_require.rb>:160:in `require'
<internal:/usr/lib/ruby/vendor_ruby/rubygems/core_ext/kernel_require.rb>:160:in `rescue in require'
<internal:/usr/lib/ruby/vendor_ruby/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/lib/ruby/vendor_ruby/rubygems/core_ext/kernel_require.rb>:148:in `require'
<internal:/usr/lib/ruby/vendor_ruby/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'
ubuntu@ip-172-31-8-217:~$ sudo service codedeploy-agent status
● codedeploy-agent.service - LSB: AWS CodeDeploy Host Agent
     Loaded: loaded (/etc/init.d/codedeploy-agent; generated)
     Active: active (running) since Wed 2022-09-28 00:20:22 UTC; 1min 56s ago
       Docs: man:systemd-sysv-generator(8)
    Process: 471 ExecStart=/etc/init.d/codedeploy-agent start (code=exited, status=0/SUCCESS)
      Tasks: 4 (limit: 4635)
     Memory: 104.4M
        CPU: 2.485s
     CGroup: /system.slice/codedeploy-agent.service
             ├─707 "codedeploy-agent: master 707" "" "" "" "" "" "" "" "" "" "" "" "" "" "" "" "" "" "" "" "" "" "" "" "" "" "" "" "" "" "" "" "" "" "" ""
             └─709 "codedeploy-agent: InstanceAgent::Plugins::CodeDeployPlugin::CommandPoller of master 707"

Also I have tried restarting the codedeploy agent but nothing worked. I even upgraded codedeploy agent and even ruby, but nothing seems to help.

NEEDED to RESTART the instance to resolve this.

@philstrong
Copy link
Contributor

What version of the agent we're/are you using? What Linux distro?

@AadiMehta
Copy link
Author

OS : Ubuntu 20.04
Version: 1.3.2

@t0shiii
Copy link
Contributor

t0shiii commented Oct 11, 2022

Please provide your Agent version and Ruby runtime version. Docs
Please make sure you are using the latest Agent version with the latest corresponding Ruby version. Docs
Please turn on verbose logging to see debug level messages. Docs
Please provide the corresponding agent log. Docs

@mwjones-aws
Copy link
Contributor

@AadiMehta any update?

@eino-makitalo
Copy link

same here

@t0shiii
Copy link
Contributor

t0shiii commented Mar 29, 2023

@eino-makitalo if you are seeing the same issue, can you provide the following info:
OS Version:
Agent Version:
Ruby Version:
Relevant Log Snippets:

@mwjones-aws
Copy link
Contributor

Please reopen if you still encounter the problem with CodeDeploy Agent 1.6.0

@mwjones-aws mwjones-aws closed this as not planned Won't fix, can't repro, duplicate, stale Apr 12, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

5 participants