SSM Ping status Connection lost

0

hi, i spunned up 2 instances and also deployed ssm agents on it at the same time. it all run fine until one day one of the ssm instances have lost connection. the instance still works fine but somehow the agent refused to connect. tried to give the instance AmazonSSMManagedInstanceCore and restart the agent, but it's still doesn't work. both of the instance use ssm agent 3.2.1705.0. i tried to hit aws ssm endpoint and it shows no error nor time out.

any idea to fix this? thanks.

seargex
已提问 5 个月前81 查看次数
1 回答
0

In order for instances to get managed by Systems Manager (SSM), there are few prerequisites which needs to be met:

  1. SSM Agent is installed and running
  2. Connectivity to SSM endpoints over port 443
  3. Connectivity to IMDS (instance metadata)
  4. IAM role attached with sufficient permissions

If the two instances went into "ConnectionLost" state (1), then I would suggest validating above prerequisites.

If all of the above prerequisites are met, then you can run "ssm-cli" diagnostic tool (2) and review the agent logs to identify the reason for "ConnectionLost" status.

SSM-CLI Tool:-

(-) Windows : & 'C:\Program Files\Amazon\SSM\ssm-cli.exe' get-diagnostics --output table

(-) Linux : ssm-cli get-diagnostics --output table

SSM Agent logs:-

(-) Windows : %PROGRAMDATA%\Amazon\SSM\Logs\

(-) Linux : /var/log/amazon/ssm/


References:-

(1) https://repost.aws/knowledge-center/systems-manager-ec2-instance-not-appear

(2) https://docs.aws.amazon.com/systems-manager/latest/userguide/ssm-cli.html

AWS
支持工程师
Aamir_H
已回答 2 个月前

您未登录。 登录 发布回答。

一个好的回答可以清楚地解答问题和提供建设性反馈,并能促进提问者的职业发展。

回答问题的准则