containers-roadmap icon indicating copy to clipboard operation
containers-roadmap copied to clipboard

[ECS Fargate] [Bug]: after exec into ecs container inputs are not accepted in terminal

Open aldenbe opened this issue 8 months ago • 1 comments

After running ecs execute-command using aws cli seemingly randomly but quite frequently key inputs do not register within the container shell session.

Operating system: Windows 11

AWS cli versions tested where issue occurs: - aws-cli/2.8.6 Python/3.9.11 Windows/10 exe/AMD64 prompt/off - aws-cli/2.13.26 Python/3.11.6 Windows/10 exe/AMD64 prompt/off - aws-cli/2.13.32 Python/3.11.6 Windows/10 exe/AMD64 prompt/off

Command:

aws ecs execute-command  \
    --region <region> \
    --cluster  <cluster>  \
    --task <task> \
    --container <container> \
    --command "/bin/sh" \
    --interactive

Response:

The Session Manager plugin was installed successfully. Use the AWS CLI to start a session.


Starting session with SessionId: ecs-execute-command-<id>
<WORKDIR> #

This is where the issue occurs. Frequently no further inputs are accepted past this point. I am unable to determine any pattern between occurrences of this issue. I have tested this in powershell, command prompt, and cygwin. Across all three opening a new terminal each time, pasting the same exact command and making no further inputs until the connection completes.

This issue has persisted across fresh windows installs on one computer (desktop using wired keyboard and mouse). When testing on a separate computer (laptop using integrated keyboard and mouse) the issue does still occur with no inputs but extremely rarely, however inputs are no longer accepted after connection 100% of the time when inputs are made during connection process, this does not seem to effect the issue on the desktop which will often register inputs made while connecting within the shell after connection.

aldenbe avatar Nov 03 '23 19:11 aldenbe

For Windows, go to the Windows Defender Firewall, and add a rule that allows the "session-manager-plugin.exe" to accept inbound connections. I had exactly the same behaviour as you, but problem was solved after dealing with the FW.

er1kv avatar May 13 '24 15:05 er1kv