1.2.323.0 does not respect session timeout when using an older version of the ssm-agent
protochron opened this issue · 5 comments
It appears that the change to remove the idle timeout in smux does not respect the regional SSM session timeout if you're using an older version of the agent with some types of SSM documents. Specifically, if you start a StartPortForwardingSession
and leave it idle it will close after ~30s, which is far shorter than the default SSM session timeout.
I'm currently running 3.1.1374
of the ssm-agent since that is the latest version that is available for Debian in the public S3 bucket.
Hi @protochron,
Appreciate for reporting this issue, we just fixed it and released the change in version 1.2.331.0. It is the latest version in public download link: https://docs.aws.amazon.com/systems-manager/latest/userguide/session-manager-working-with-install-plugin.html
Thanks,
Yangtao
I've the same problem, i've just upgraded session manager plugin to the latest version 1.2.331.0 but i still get the same error:
aws ssm start-session --target i-0056d39bfe9xxxxxx --document-name AWS-StartPortForwardingSession --parameters "portNumber"=["22"],"localPortNumber"=["9996"]
Starting session with SessionId: davide.giunchi@xxx.com-09dcd8dd53a17xxxx
Port 9996 opened for sessionId davide.giunchi@xxx.com-09dcd8dd53a17xxxx.
Waiting for connections...
Connection accepted for session [davide.giunchi@xxx.com-09dcd8dd53a17xxxx]
Cannot perform start session: EOF
On the server i'm using:
Name Version Rev Tracking Publisher Notes
amazon-ssm-agent 3.1.1446.0 5923 latest/candidate aws✓ classic
Hi @davidegiunchi
Sorry for the inconvenience, 3.1.1446.0 only works with session-manager-plugin (1.2.323.0) on port forwarding. We already fixed it on both side with a new release, you can pick other Amazon-ssm-agent versions. There is a new agent version just released. 3.1.1476.0.
Thanks
Yangtao
@Yangtao-Hua i've upgrade ssm-agent by downloading https://s3.eu-central-1.amazonaws.com/amazon-ssm-eu-central-1/amazon-ssm-agent/3.1.1476.0/amazon-ssm-agent-ubuntu-amd64.tar.gz , now it works correctly
Thank you!
Hi @Yangtao-Hua
I have the same issue
I am using SSM Agent version: 3.1.1856.0
I am consuming this session-manager-plugin: 1.2.398.0
session is existing after 30 sec of inactivity
When i set this to false https://github.com/aws/session-manager-plugin/blob/mainline/src/sessionmanagerplugin/session/portsession/muxportforwarding.go#L173 it is working normally without timing out