aws / aws-codedeploy-agent

Host Agent for AWS CodeDeploy
https://aws.amazon.com/codedeploy
Apache License 2.0
329 stars 187 forks source link

Agent not working after self update #144

Closed starrago closed 6 years ago

starrago commented 6 years ago

2017-12-11 15:43:27 ERROR [codedeploy-agent(16258)]: booting child: error during start or run: NoMethodError - undefined method underscore' for Seahorse::Util:Module - /root/aws-codedeploy-agent/lib/instance_agent/plugins/codedeploy/command_executor.rb:51:incommand' /root/aws-codedeploy-agent/lib/instance_agent/plugins/codedeploy/command_executor.rb:76:in <class:CommandExecutor>' /root/aws-codedeploy-agent/lib/instance_agent/plugins/codedeploy/command_executor.rb:20:in' /root/aws-codedeploy-agent/lib/instance_agent/plugins/codedeploy/command_executor.rb:18:in <module:Plugins>' /root/aws-codedeploy-agent/lib/instance_agent/plugins/codedeploy/command_executor.rb:17:in' /root/aws-codedeploy-agent/lib/instance_agent/plugins/codedeploy/command_executor.rb:16:in <top (required)>' /root/aws-codedeploy-agent/lib/instance_agent/plugins/codedeploy/register_plugin.rb:2:inrequire_relative' /root/aws-codedeploy-agent/lib/instance_agent/plugins/codedeploy/register_plugin.rb:2:in <top (required)>' /usr/lib/ruby/2.3.0/rubygems/core_ext/kernel_require.rb:120:inrequire' /usr/lib/ruby/2.3.0/rubygems/core_ext/kernel_require.rb:120:in require' /root/aws-codedeploy-agent/lib/instance_agent/runner/child.rb:16:inblock in load_plugins' /root/aws-codedeploy-agent/lib/instance_agent/runner/child.rb:12:in each' /root/aws-codedeploy-agent/lib/instance_agent/runner/child.rb:12:inload_plugins' /root/aws-codedeploy-agent/lib/instance_agent/runner/child.rb:28:in prepare_run' /opt/codedeploy-agent/vendor/gems/process_manager-0.0.13/lib/process_manager/child.rb:64:inblock in prepare_run_with_error_handling' /root/aws-codedeploy-agent/lib/instance_agent/runner/child.rb:55:in with_error_handling' /opt/codedeploy-agent/vendor/gems/process_manager-0.0.13/lib/process_manager/child.rb:63:inprepare_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:inblock 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:inspawn_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' /var/lib/gems/2.3.0/gems/logging-1.8.2/lib/logging/diagnostic_context.rb:323:inblock in create_with_logging_context' 2017-12-11 15:43:27 INFO [codedeploy-agent(15390)]: master 15390: Received CHLD - cleaning dead child process 2017-12-11 15:43:27 INFO [codedeploy-agent(15390)]: master 15390: been told to replace child 16258 2017-12-11 15:43:27 INFO [codedeploy-agent(15390)]: master 15390: not enough child processes running - missing at least 1 - respawning 2017-12-11 15:43:32 INFO [codedeploy-agent(15390)]: master 15390: Spawned child 1/1 2017-12-11 15:43:32 ERROR [codedeploy-agent(16262)]: booting child: error during start or run: NoMethodError - undefined method underscore' for Seahorse::Util:Module - /root/aws-codedeploy-agent/lib/instance_agent/plugins/codedeploy/command_executor.rb:51:incommand' /root/aws-codedeploy-agent/lib/instance_agent/plugins/codedeploy/command_executor.rb:76:in <class:CommandExecutor>' /root/aws-codedeploy-agent/lib/instance_agent/plugins/codedeploy/command_executor.rb:20:in' /root/aws-codedeploy-agent/lib/instance_agent/plugins/codedeploy/command_executor.rb:18:in <module:Plugins>' /root/aws-codedeploy-agent/lib/instance_agent/plugins/codedeploy/command_executor.rb:17:in' /root/aws-codedeploy-agent/lib/instance_agent/plugins/codedeploy/command_executor.rb:16:in <top (required)>' /root/aws-codedeploy-agent/lib/instance_agent/plugins/codedeploy/register_plugin.rb:2:inrequire_relative' /root/aws-codedeploy-agent/lib/instance_agent/plugins/codedeploy/register_plugin.rb:2:in <top (required)>' /usr/lib/ruby/2.3.0/rubygems/core_ext/kernel_require.rb:120:inrequire' /usr/lib/ruby/2.3.0/rubygems/core_ext/kernel_require.rb:120:in require' /root/aws-codedeploy-agent/lib/instance_agent/runner/child.rb:16:inblock in load_plugins' /root/aws-codedeploy-agent/lib/instance_agent/runner/child.rb:12:in each' /root/aws-codedeploy-agent/lib/instance_agent/runner/child.rb:12:inload_plugins' /root/aws-codedeploy-agent/lib/instance_agent/runner/child.rb:28:in prepare_run' /opt/codedeploy-agent/vendor/gems/process_manager-0.0.13/lib/process_manager/child.rb:64:inblock in prepare_run_with_error_handling' /root/aws-codedeploy-agent/lib/instance_agent/runner/child.rb:55:in with_error_handling' /opt/codedeploy-agent/vendor/gems/process_manager-0.0.13/lib/process_manager/child.rb:63:inprepare_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:inblock 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:inspawn_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' /var/lib/gems/2.3.0/gems/logging-1.8.2/lib/logging/diagnostic_context.rb:323:inblock in create_with_logging_context' 2017-12-11 15:43:32 INFO [codedeploy-agent(15390)]: master 15390: Received CHLD - cleaning dead child process 2017-12-11 15:43:32 INFO [codedeploy-agent(15390)]: master 15390: been told to replace child 16262 2017-12-11 15:43:32 INFO [codedeploy-agent(15390)]: master 15390: not enough child processes running - missing at least 1 - respawning ^C

pivanlo commented 6 years ago

Hi @starrago !

I got the same error (NoMethodError - undefined method underscore' for Seahorse::Util:Module) after installing the agent on my EC2 instance following these instructions:

https://docs.aws.amazon.com/codedeploy/latest/userguide/codedeploy-agent-operations-install-linux.html

I installed this version: releases/codedeploy-agent-1.0-1.1352.noarch.rpm

Could you solve this problem?

asaf-erlich commented 6 years ago

What ruby version are you using? What OS are you using? What gems do you have installed? I see in the logs at the end it says "not enough child processes running - missing at least 1 - respawning". Did the agent self-recover or did it stay dead?

ghost commented 6 years ago

Having the same issue on Linux:

2018-03-21 10:02:31 ERROR [codedeploy-agent(125821)]: booting child: error during start or run: NoMethodError - undefined method underscore' for Seahorse::Util:Module - /opt/codedeploy-agent/lib/instance_agent/plugins/codedeploy/command_executor.rb:51:incommand' /opt/codedeploy-agent/lib/instance_agent/plugins/codedeploy/command_executor.rb:76:in <class:CommandExecutor>' /opt/codedeploy-agent/lib/instance_agent/plugins/codedeploy/command_executor.rb:20:in' /opt/codedeploy-agent/lib/instance_agent/plugins/codedeploy/command_executor.rb:18:in <module:Plugins>' /opt/codedeploy-agent/lib/instance_agent/plugins/codedeploy/command_executor.rb:17:in' /opt/codedeploy-agent/lib/instance_agent/plugins/codedeploy/command_executor.rb:16:in <top (required)>' /opt/codedeploy-agent/lib/instance_agent/plugins/codedeploy/register_plugin.rb:2:inrequire_relative' /opt/codedeploy-agent/lib/instance_agent/plugins/codedeploy/register_plugin.rb:2:in <top (required)>' /usr/local/rvm/rubies/ruby-2.4.0/lib/ruby/site_ruby/2.4.0/rubygems/core_ext/kernel_require.rb:120:inrequire' /usr/local/rvm/rubies/ruby-2.4.0/lib/ruby/site_ruby/2.4.0/rubygems/core_ext/kernel_require.rb:120:in require' /opt/codedeploy-agent/lib/instance_agent/runner/child.rb:17:inblock 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:inload_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:inblock 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:inprepare_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:inblock 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:inspawn_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' /usr/local/rvm/gems/ruby-2.4.0/gems/logging-1.8.2/lib/logging/diagnostic_context.rb:323:inblock in create_with_logging_context' 2018-03-21 10:02:31 INFO [codedeploy-agent(6808)]: master 6808: Received CHLD - cleaning dead child process 2018-03-21 10:02:31 INFO [codedeploy-agent(6808)]: master 6808: been told to replace child 125821 2018-03-21 10:02:31 INFO [codedeploy-agent(6808)]: master 6808: not enough child processes running - missing at least 1 - respawning

Gem list attached. Is there any insight available as to what this long-standing issue could be?

gemlist.txt

rohkat-aws commented 6 years ago

@cjthorpe What version of the agent are we talking about?

rohkat-aws commented 6 years ago

@starrago @cjthorpe closing it, as havent got any response.