Closed matchbookmac closed 2 years ago
@matchbookmac did you install ruby sdk after installing the agent ?
The instance this happened on has been running the agent with no problem since 11/8/2018. At that time, agent was installed with:
#!/bin/bash
CODEDEPLOY_INSTALLER_URL="https://aws-codedeploy-us-east-1.s3.amazonaws.com/latest/install"
RVM_INSTALLER_URL="https://raw.githubusercontent.com/wayneeseguin/rvm/stable/binscripts/rvm-installer"
curl -sSL https://rvm.io/mpapis.asc | gpg --import -
curl -sSL "$RVM_INSTALLER_URL" | bash -s stable --ruby={2.3.0,2.4.1,2.4.2,2.4.3} --gems=bundler,dotenv,pry
usermod -aG rvm root
usermod -aG rvm ubuntu
cd /home/ubuntu || true
wget "$CODEDEPLOY_INSTALLER_URL"
chmod +x ./install
bash -l -c "ruby ./install auto"
service codedeploy-agent start
The logs show the agent running normally until first instance of this error at 2019-07-24 01:16:07
server time.
2019-07-24 01:05:51 INFO [codedeploy-agent(1657)]: Version file found in /opt/codedeploy-agent/.version with agent version OFFICIAL_1.0-1.1597_deb.
2019-07-24 01:06:51 INFO [codedeploy-agent(1657)]: [Aws::CodeDeployCommand::Client 200 60.154567 0 retries] poll_host_command(host_identifier:"arn:aws:ec2:us-east-1:368304857153:instance/i-0feb9a1ce7078f68f")
2019-07-24 01:06:52 INFO [codedeploy-agent(1657)]: Version file found in /opt/codedeploy-agent/.version with agent version OFFICIAL_1.0-1.1597_deb.
2019-07-24 01:07:52 INFO [codedeploy-agent(1657)]: [Aws::CodeDeployCommand::Client 200 60.154421 0 retries] poll_host_command(host_identifier:"arn:aws:ec2:us-east-1:368304857153:instance/i-0feb9a1ce7078f68f")
2019-07-24 01:07:53 INFO [codedeploy-agent(1657)]: Version file found in /opt/codedeploy-agent/.version with agent version OFFICIAL_1.0-1.1597_deb.
2019-07-24 01:08:54 INFO [codedeploy-agent(1657)]: [Aws::CodeDeployCommand::Client 200 60.708441 0 retries] poll_host_command(host_identifier:"arn:aws:ec2:us-east-1:368304857153:instance/i-0feb9a1ce7078f68f")
2019-07-24 01:08:55 INFO [codedeploy-agent(1657)]: Version file found in /opt/codedeploy-agent/.version with agent version OFFICIAL_1.0-1.1597_deb.
2019-07-24 01:09:55 INFO [codedeploy-agent(1657)]: [Aws::CodeDeployCommand::Client 200 60.232362 0 retries] poll_host_command(host_identifier:"arn:aws:ec2:us-east-1:368304857153:instance/i-0feb9a1ce7078f68f")
2019-07-24 01:09:56 INFO [codedeploy-agent(1657)]: Version file found in /opt/codedeploy-agent/.version with agent version OFFICIAL_1.0-1.1597_deb.
2019-07-24 01:10:57 INFO [codedeploy-agent(1657)]: [Aws::CodeDeployCommand::Client 200 60.406749 0 retries] poll_host_command(host_identifier:"arn:aws:ec2:us-east-1:368304857153:instance/i-0feb9a1ce7078f68f")
2019-07-24 01:10:58 INFO [codedeploy-agent(1657)]: Version file found in /opt/codedeploy-agent/.version with agent version OFFICIAL_1.0-1.1597_deb.
2019-07-24 01:11:58 INFO [codedeploy-agent(1657)]: [Aws::CodeDeployCommand::Client 200 60.677543 0 retries] poll_host_command(host_identifier:"arn:aws:ec2:us-east-1:368304857153:instance/i-0feb9a1ce7078f68f")
2019-07-24 01:11:59 INFO [codedeploy-agent(1657)]: Version file found in /opt/codedeploy-agent/.version with agent version OFFICIAL_1.0-1.1597_deb.
2019-07-24 01:13:00 INFO [codedeploy-agent(1657)]: [Aws::CodeDeployCommand::Client 200 60.52441 0 retries] poll_host_command(host_identifier:"arn:aws:ec2:us-east-1:368304857153:instance/i-0feb9a1ce7078f68f")
2019-07-24 01:13:01 INFO [codedeploy-agent(1657)]: Version file found in /opt/codedeploy-agent/.version with agent version OFFICIAL_1.0-1.1597_deb.
2019-07-24 01:14:01 INFO [codedeploy-agent(1657)]: [Aws::CodeDeployCommand::Client 200 60.248747 0 retries] poll_host_command(host_identifier:"arn:aws:ec2:us-east-1:368304857153:instance/i-0feb9a1ce7078f68f")
2019-07-24 01:14:02 INFO [codedeploy-agent(1657)]: Version file found in /opt/codedeploy-agent/.version with agent version OFFICIAL_1.0-1.1597_deb.
2019-07-24 01:15:02 INFO [codedeploy-agent(1657)]: [Aws::CodeDeployCommand::Client 200 60.160273 0 retries] poll_host_command(host_identifier:"arn:aws:ec2:us-east-1:368304857153:instance/i-0feb9a1ce7078f68f")
2019-07-24 01:15:03 INFO [codedeploy-agent(1657)]: Version file found in /opt/codedeploy-agent/.version with agent version OFFICIAL_1.0-1.1597_deb.
2019-07-24 01:15:07 INFO [codedeploy-agent(22326)]: Checking first if any deployment lifecycle event is in progress master 1653
2019-07-24 01:15:07 INFO [codedeploy-agent(22326)]: Stopping master 1653
2019-07-24 01:15:07 INFO [codedeploy-agent(1653)]: master 1653: Received TERM - stopping children and shutting down
2019-07-24 01:15:07 INFO [codedeploy-agent(1657)]: InstanceAgent::Plugins::CodeDeployPlugin::CommandPoller of master 1653: Received TERM - setting internal shutting down flag and possibly finishing last run
2019-07-24 01:15:07 INFO [codedeploy-agent(1657)]: InstanceAgent::Plugins::CodeDeployPlugin::CommandPoller: Gracefully shutting down agent child threads now, will wait up to 7200 seconds
2019-07-24 01:15:07 INFO [codedeploy-agent(1657)]: InstanceAgent::Plugins::CodeDeployPlugin::CommandPoller: All agent child threads have been shut down
2019-07-24 01:15:07 INFO [codedeploy-agent(1657)]: agent exiting now
2019-07-24 01:16:04 INFO [codedeploy-agent(1657)]: [Aws::CodeDeployCommand::Client 200 61.19316 0 retries] poll_host_command(host_identifier:"arn:aws:ec2:us-east-1:368304857153:instance/i-0feb9a1ce7078f68f")
2019-07-24 01:16:05 INFO [codedeploy-agent(1657)]: InstanceAgent::Plugins::CodeDeployPlugin::CommandPoller of master 1653: shutting down
2019-07-24 01:16:07 INFO [codedeploy-agent(22462)]: master 22462: Spawned child 1/1
2019-07-24 01:16:07 ERROR [codedeploy-agent(22466)]: 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:in `command'
/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 `<module:CodeDeployPlugin>'
/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 `<module:InstanceAgent>'
/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:in `require_relative'
/opt/codedeploy-agent/lib/instance_agent/plugins/codedeploy/register_plugin.rb:2:in `<top (required)>'
/usr/local/rvm/rubies/ruby-2.3.0/lib/ruby/2.3.0/rubygems/core_ext/kernel_require.rb:55:in `require'
Deployments started failing without getting to ApplicationStop event. Output of logs (below) indicates a
NoMethodError
is preventing the agent from functioning.VERSION:
agent_version: OFFICIAL_1.0-1.1597_deb
Logs: