aws / aws-codedeploy-agent

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

aws-codedeploy-agent installed by ssm not working on amazon official ec2 image ubuntu 22.04 #337

Closed dikhin closed 1 year ago

dikhin commented 1 year ago

The ssm agent log shows the codedeploy agent has been installed. However, the CodeDeploy deployment failed saying "CodeDeploy agent was not able to receive the lifecycle event. Check the CodeDeploy agent logs on your host and make sure the agent is running and can connect to the CodeDeploy server."

I log in to the EC2 instance and the code deploy log doesn't exist, there isn't any sign of code deploy agent running.

2022-10-24 10:53:47 INFO [ssm-agent-worker] [MessageService] [CommandProcessorWrapper] received plugin: configurePackage result from Processor 2022-10-24 10:53:47 INFO [ssm-agent-worker] [MessageService] [MGSInteractor] received reply for RunCommandResult aws.ssm.1120cce6-a151-49fc-82a0-4884d7a4f815.i-07fa4947e09c00631 with message 2022-10-24 10:53:47 INFO [ssm-agent-worker] [MessageService] [MGSInteractor] Got reply msg Id c0f6fd0e-e2c3-4883-a2df-4c06fa562e44 for RunCommandResult aws.ssm.1120cce6-a151-49fc-82a0-4884d7 2022-10-24 10:53:47 INFO [ssm-agent-worker] [MessageService] [MGSInteractor] started reply processing - c0f6fd0e-e2c3-4883-a2df-4c06fa562e44 2022-10-24 10:53:47 INFO [ssm-agent-worker] [MessageService] [MGSInteractor] Sending reply { "additionalInfo": { "agent": { "lang": "en-US", "name": "amazon-ssm-agent", "os": "", "osver": "1", "ver": "" }, "dateTime": "2022-10-24T10:53:47.842Z", "runId": "", "runtimeStatusCounts": { "Skipped": 1, "Success": 1 } }, "documentStatus": "InProgress", "documentTraceOutput": "", "runtimeStatus": { "configurePackage": { "status": "Success", "code": 0, "name": "aws:configurePackage", "output": "AWSCodeDeployAgent 1.4.1 is already installed\n", "startDateTime": "2022-10-24T10:53:35.604Z", "endDateTime": "2022-10-24T10:53:47.841Z", "outputS3BucketName": "", "outputS3KeyPrefix": "", "stepName": "", "standardOutput": "AWSCodeDeployAgent 1.4.1 is already installed\n", "standardError": "" } } }

t0shiii commented 1 year ago

Ubuntu 22.04 is currently not supported due to an incompatible ruby version. We are working to add support for Ruby 3.x with an upcoming version. Please see #301 for more details