aws / amazon-ssm-agent

An agent to enable remote management of your EC2 instances, on-premises servers, or virtual machines (VMs).
https://aws.amazon.com/systems-manager/
Apache License 2.0
1.06k stars 322 forks source link

Snap refresh error #304

Closed GJKrupa closed 4 years ago

GJKrupa commented 4 years ago

The snap (running on Ubuntu 18.04) failed to auto-refresh this morning and now we're left with a corrupt version that can't be either removed or refreshed because it's trying to stop a systemd unit that doesn't exist. The logs for the failed change are:

root@openvpn:/var/log# snap change 4
Status  Spawn               Ready               Summary
Done    today at 03:01 UTC  today at 03:02 UTC  Ensure prerequisites for "amazon-ssm-agent" are available
Undone  today at 03:01 UTC  today at 03:02 UTC  Download snap "amazon-ssm-agent" (2012) from channel "latest/stable/ubuntu-18.04"
Done    today at 03:01 UTC  today at 03:01 UTC  Fetch and check assertions for snap "amazon-ssm-agent" (2012)
Undone  today at 03:01 UTC  today at 03:01 UTC  Mount snap "amazon-ssm-agent" (2012)
Undone  today at 03:01 UTC  today at 03:01 UTC  Run pre-refresh hook of "amazon-ssm-agent" snap if present
Error   today at 03:01 UTC  today at 03:01 UTC  Stop snap "amazon-ssm-agent" services
Hold    today at 03:01 UTC  today at 03:01 UTC  Remove aliases for snap "amazon-ssm-agent"
Hold    today at 03:01 UTC  today at 03:01 UTC  Make current revision for snap "amazon-ssm-agent" unavailable
Hold    today at 03:01 UTC  today at 03:01 UTC  Copy snap "amazon-ssm-agent" data
Hold    today at 03:01 UTC  today at 03:01 UTC  Setup snap "amazon-ssm-agent" (2012) security profiles
Hold    today at 03:01 UTC  today at 03:01 UTC  Make snap "amazon-ssm-agent" (2012) available to the system
Hold    today at 03:01 UTC  today at 03:01 UTC  Automatically connect eligible plugs and slots of snap "amazon-ssm-agent"
Hold    today at 03:01 UTC  today at 03:01 UTC  Set automatic aliases for snap "amazon-ssm-agent"
Hold    today at 03:01 UTC  today at 03:01 UTC  Setup snap "amazon-ssm-agent" aliases
Hold    today at 03:01 UTC  today at 03:01 UTC  Run post-refresh hook of "amazon-ssm-agent" snap if present
Hold    today at 03:01 UTC  today at 03:01 UTC  Start snap "amazon-ssm-agent" (2012) services
Hold    today at 03:01 UTC  today at 03:01 UTC  Clean up "amazon-ssm-agent" (2012) install
Hold    today at 03:01 UTC  today at 03:01 UTC  Run configure hook of "amazon-ssm-agent" snap if present
Hold    today at 03:01 UTC  today at 03:01 UTC  Run health check of "amazon-ssm-agent" snap
Done    today at 03:01 UTC  today at 03:02 UTC  Consider re-refresh of "amazon-ssm-agent"

......................................................................
Stop snap "amazon-ssm-agent" services

2020-08-28T03:01:57Z ERROR [--root / is-enabled snap.amazon-ssm-agent.amazon-ssm-agent.service] failed with exit status 1: Failed to get unit file state for snap.amazon-ssm-agent.amazon-ssm-agent.service: No such file or directory
GJKrupa commented 4 years ago

Turns out it was a connectivity issue during AMI provisioning. Closing.