SSM Agent update problems

1

I'm having issues with SSM for the last 3 days with the RUN COMMAND on the AWS-UpdateSSMAgent document. It tries to upgrade to the latest version of amazon-ssm-agent but failed to do so. I tried to refresh the snap from 3.1.1188.0 but no updates available.. also tried to remove and reinstall the package but still get the 3.1.1188.0 version.

My Windows Server instance get updated but all the Ubuntu 20.04LTS and 22.04LTS have issues with that update. I know 22.04 is not fully supported by SSM but the ssm agent update document always worked prior to the last 3 days.

Anyone having similar issues?

Here's the log:

Successfully downloaded manifest
Successfully downloaded updater version 3.1.1446.0
Updating amazon-ssm-agent from 3.1.1188.0 to 3.1.1446.0
Successfully downloaded https://s3.ca-central-1.amazonaws.com/amazon-ssm-ca-central-1/amazon-ssm-agent/3.1.1188.0/amazon-ssm-agent-ubuntu-amd64.tar.gz
Successfully downloaded https://s3.ca-central-1.amazonaws.com/amazon-ssm-ca-central-1/amazon-ssm-agent/3.1.1446.0/amazon-ssm-agent-ubuntu-amd64.tar.gz
Initiating amazon-ssm-agent update to 3.1.1446.0
failed to install amazon-ssm-agent 3.1.1446.0, ErrorMessage=The execution of command returned Exit Status: 125
exit status 125
Initiating rollback amazon-ssm-agent to 3.1.1188.0
failed to install amazon-ssm-agent 3.1.1188.0, ErrorMessage=The execution of command returned Exit Status: 125
exit status 125
Failed to update amazon-ssm-agent to 3.1.1446.0
  • Same Issue Here. Cannot update to 3.1.1446.0 and rolls back. Rollback also fails.

질문됨 2년 전1644회 조회
2개 답변
2
수락된 답변

Hi,

Thank you for reaching out to us, it appears that your issues is related to new version of snapd (new snapd version v2.55.5 released 10 days ago), AWS is aware of the issue in the interim. You can test the workaround below and revert your snapd to previous version:

To confirm is issue, check /var/lib/amazon/ssm/update/stderr

$sudo cat /var/lib/amazon/ssm/update/stderr
 error: cannot perform the following tasks:
   - Make current revision for snap "amazon-ssm-agent" unavailable (snap "amazon-ssm-agent" has running apps (amazon-ssm-agent))

To resolve,

$sudo snap revert snapd                                                         <--- Command used to revert snapd
2022-05-30T13:27:29Z INFO Waiting for automatic snapd restart...
snapd reverted to 2.54.4

After reverting back to snapd 2.54.4,

I was then able to successfully update my instance

snap list  <---- After 
Name              Version     Rev    Tracking          Publisher   Notes
amazon-ssm-agent  3.1.1476.0  5950   latest/candidate  aws✓        classic
core18            20220428    2409   latest/stable     canonical✓  base
snapd             2.54.4      15177  latest/stable     canonical✓  snapd

Once you downgraded the snapd daemon, please try to update instance again using RunCommand AWS-UpdateSSMAgent . Let me know if this helps

profile pictureAWS
지원 엔지니어
Lundi
답변함 2년 전
0

Hi! Good day!

What happens when you have a Quick Setup with an "Organizational" type configuration?

If the snapd version is reverted, the SSMUpdate association (Scan instances for missing patches daily) will update it again "snapd" and the workaround will stop working. Is there any other alternative?

How will AWS notify us when they have fixed this issue?

Best regards

답변함 2년 전

로그인하지 않았습니다. 로그인해야 답변을 게시할 수 있습니다.

좋은 답변은 질문에 명확하게 답하고 건설적인 피드백을 제공하며 질문자의 전문적인 성장을 장려합니다.

질문 답변하기에 대한 가이드라인

관련 콘텐츠