0

我一直在使用会话管理器连接到我在 ec2 实例上的 django 项目。最近,我使用会话管理器连接到服务器。在对 settings.py 进行更改后,我sudo python3 manage.py runserver照常运行命令,以确保在我的代码中没有发现错误。然而,检查并没有完成,按下ctrl c并没有终止进程,所以几分钟后我决定重新加载页面。我立即重新加载了浏览器页面,我被阻止使用会话管理器评估服务器。当我尝试连接时,出现以下错误:


We weren’t able to connect to your instance. Common reasons for this include:

1. SSM Agent isn't installed on the instance. You can install the agent on both Windows instances and Linux instances.
2. The required IAM instance profile isn't attached to the instance. You can attach a profile using AWS Systems Manager Quick Setup.
3. Session Manager setup is incomplete. For more information, see Session Manager Prerequisites.

我不知道为什么我突然被阻止评估服务器并且该错误似乎没有帮助。请问我该怎么做?当我开始遇到与 ssh 的连接问题时,我激活了会话管理器。现在我完全失去了对服务器的评估。

4

1 回答 1

0

经过一番检查,我能够修复错误。我注意到status checks实例的 1/2。系统可达性检查显示passed,但实例可达性检查failed。我所做的是启用实例终止保护(这似乎是解决方案),然后重新启动实例。

于 2021-10-23T03:46:18.603 回答