New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
aws ssm start-session end with **Cannot perform start session: EOF** #354
Comments
Thanks for reaching out to us! Could you please share logs for Session Manager plugin for us to investigate this further? More information on logging can be found here - https://docs.aws.amazon.com/systems-manager/latest/userguide/session-manager-working-with-install-plugin.html#install-plugin-configure-logs. |
I had similar issue with "aws ecs execute-command ..." and it seems it's related to tty being not available when running in ci I fixed it with "unbuffer aws ecs execute-command ..." to run it with tty available |
It's linked to tty. I bypass the problem with ssm send-command with remote script execution |
@alxsbn Can you explain more what you meant by "ssm send-command with remote script execution"? We're running into the same issue with
I don't know if this makes a difference, but we're using ECS with Fargate, not EC2. |
@emmahsax Our first reflex was to run a ssh command, then the others commands we need (for us it was linked to CD, so rsync a repo then restart a pm2 service). Since we have this tty problem we just write a shell script with our commands an fire him with ssm send-command |
I have the same problem, I followed https://docs.aws.amazon.com/systems-manager/latest/userguide/session-preferences-shell-config.html to add I enabled logging and see:
and the logs end there. I saw the same issue when running
It also messes up the terminal, I have to I'm using version |
Session manager plugin has been designed to be invoked from a terminal for shell scenarios so it can interpret control sequences returned by pseudo terminal and display appropriately. When a shell session is started, session manager plugin also fetches terminal size on client machine and sends it to pseudo terminal on target server. We suspect one of these actions might be failing for you. Please let us know if you are invoking session manager plugin from a terminal and still seeing error of |
Yes, I am invoking it from a terminal. I haven't changed anything about the instances I'm connecting to, they're launched from an AMI I baked weeks ago. It's working today, without changing anything in my local environment (same version of
ah, I think I get it. When I try the same command from a terminal with an enormous scrollback, it fails with |
Thanks for letting us know that you were able to get past this issue. |
@olfway You saved my day! I had the exact same issue and |
More on Side note, you can run single commands like so
|
maybe this command can help
|
Hello, any update about this? |
@baguilarq, please read the entire thread and links before commenting. This ticket should be closed. I have posted a solution for this problem above. |
Can you elaborate how is this solve the issue? It doesn't for me and I have both |
did you try to do that without break lines? |
Thank you. The command that I tried to execute is what OP tried: I added |
This question should be closed, as I've answered it already above. Historically, the command Thus |
I try to instanciate a vanilla
aws ssm start-session
on a Github actions Jobs (without SSH).The session is well instanciated (i can see it on the AWS Session Manager dashboard) but always finish with a Cannot perform start session: EOF
FYI I can instanciated a sesion outside of GH actions (.e.g. on my laptop) with the same account / role / policy / instances (ami-0ea4a063871686f37).
Here's my job YAML :
The results :
Here are the CLI tools packaged with Ubuntu-latest virtual env (20.04.2 LTS) :
The text was updated successfully, but these errors were encountered: