Handshake timed out.

1

I'm encountering following error message whenever I want to start a session with an instance, either via cli or via console:

Your session has been terminated for the following reasons: ----------ERROR------- Encountered error while initiating handshake. Handshake timed out. Please ensure that you have the latest version of the session manager plugin.

The plugin is the latest as far as I can tell. Re-checked everything regarding settings and such but no solution as of yet. Anyone come across this error and found a solution or has any ideas what to check?

Thanks!

  • In my case iam using custom KSM Key for SSM Session .. some one delete the Key accidently. on AWS Systems Manager => Session Manager => Preferences => KMS encryption - I disabled this it could able to connect with SSM Later planning to create a new KMS for SSM

demandé il y a 5 ans2649 vues
4 réponses
0

Could you please upgrade SSM Agent to latest version and try Session Manager from console? If issue still persists, kindly look for any errors in SSM Agent logs.

Thanks!

répondu il y a 5 ans
0

It has to do with the KMS key, I've put in a custom KMS key instead of the default TLS one and that causes the issue. Will have to look into it some other day as I need to continue with the setup. I thought I set the permissions on the key correct but maybe I've overlooked something.

répondu il y a 5 ans
0

Hi, Were you finally able to fix this?

tapas09
répondu il y a 4 ans
0

I am also having the same error and please find below the extract from SSM agent logs. I am having this issue only while using KMS key for session encryption

2020-06-18 07:24:05 INFO [ssm-session-worker] [aztecse-tu-ics-dlt-test-infraadmin-0ed1bc492dde6bf3b] document: aztecse-tu-ics-dlt-test-infraadmin-0ed1bc492dde6bf3b worker started
2020-06-18 07:24:05 INFO [ssm-session-worker] [aztecse-tu-ics-dlt-test-infraadmin-0ed1bc492dde6bf3b] channel: aztecse-tu-ics-dlt-test-infraadmin-0ed1bc492dde6bf3b found
2020-06-18 07:24:05 INFO [ssm-session-worker] [aztecse-tu-ics-dlt-test-infraadmin-0ed1bc492dde6bf3b] inter process communication started
2020-06-18 07:24:05 INFO [ssm-session-worker] [aztecse-tu-ics-dlt-test-infraadmin-0ed1bc492dde6bf3b] [DataBackend] received plugin config message
2020-06-18 07:24:05 INFO [ssm-session-worker] [aztecse-tu-ics-dlt-test-infraadmin-0ed1bc492dde6bf3b] [DataBackend] {"DocumentInformation":{"DocumentID":"aztecse-tu-ics-dlt-test-infraadmin-0ed1bc492dde6bf3b","CommandID":"aztecse-tu-ics-dlt-test-infraadmin-0ed1bc492dde6bf3b","AssociationID":"","InstanceID":"i-089a4582db171334c","MessageID":"aztecse-tu-ics-dlt-test-infraadmin-0ed1bc492dde6bf3b","RunID":"2020-06-18T07-24-05.615Z","CreatedDate":"52433-03-17 09:33:34 +0000 UTC","DocumentName":"","DocumentVersion":"","DocumentStatus":"InProgress","RunCount":0,"ProcInfo":{"Pid":31185,"StartTime":"2020-06-18T07:24:05.616193696Z"},"ClientId":"","RunAsUser":""},"DocumentType":"StartSession","SchemaVersion":"1.0","InstancePluginsInformation":[{"Configuration":{"Settings":null,"Properties":null,"OutputS3KeyPrefix":"","OutputS3BucketName":"","S3EncryptionEnabled":true,"CloudWatchLogGroup":"","CloudWatchEncryptionEnabled":true,"OrchestrationDirectory":"/var/lib/amazon/ssm/i-089a4582db171334c/session/orchestration/aztecse-tu-ics-dlt-test-infraadmin-0ed1bc492dde6bf3b/Standard_Stream","MessageId":"aztecse-tu-ics-dlt-test-infraadmin-0ed1bc492dde6bf3b","BookKeepingFileName":"aztecse-tu-ics-dlt-test-infraadmin-0ed1bc492dde6bf3b","PluginName":"Standard_Stream","PluginID":"Standard_Stream","DefaultWorkingDirectory":"","Preconditions":null,"IsPreconditionEnabled":false,"CurrentAssociations":null,"SessionId":"aztecse-tu-ics-dlt-test-infraadmin-0ed1bc492dde6bf3b","ClientId":"","KmsKeyId":"f9451b69-559d-4f1d-9fe8-684f9a465711","RunAsEnabled":false,"RunAsUser":""},"Name":"Standard_Stream","Result":{"pluginID":"","pluginName":"","status":"","code":0,"output":null,"startDateTime":"0001-01-01T00:00:00Z","endDateTime":"0001-01-01T00:00:00Z","outputS3BucketName":"","outputS3KeyPrefix":"","stepName":"","error":"","standardOutput":"","standardError":""},"Id":"Standard_Stream"}],"CancelInformation":{"CancelMessageID":"","CancelCommandID":"","Payload":"","DebugInfo":""},"IOConfig":{"OrchestrationDirectory":"/var/lib/amazon/ssm/i-089a4582db171334c/session/orchestration/aztecse-tu-ics-dlt-test-infraadmin-0ed1bc492dde6bf3b","OutputS3BucketName":"","OutputS3KeyPrefix":"","CloudWatchConfig":{"LogGroupName":"","LogStreamPrefix":"","LogGroupEncryptionEnabled":false}}}
2020-06-18 07:24:05 INFO [ssm-session-worker] [aztecse-tu-ics-dlt-test-infraadmin-0ed1bc492dde6bf3b] [DataBackend] Running plugin Standard_Stream
2020-06-18 07:24:05 INFO [ssm-session-worker] [aztecse-tu-ics-dlt-test-infraadmin-0ed1bc492dde6bf3b] [DataBackend] [pluginName=Standard_Stream] Setting up datachannel for session: aztecse-tu-ics-dlt-test-infraadmin-0ed1bc492dde6bf3b, requestId: 0b73fbe8-fec8-44e2-b8cd-84da1896281a, clientId: 
2020-06-18 07:24:05 INFO [ssm-session-worker] [aztecse-tu-ics-dlt-test-infraadmin-0ed1bc492dde6bf3b] [DataBackend] [pluginName=Standard_Stream] Opening websocket connection to: wss://ssmmessages.eu-central-1.amazonaws.com/v1/data-channel/aztecse-tu-ics-dlt-test-infraadmin-0ed1bc492dde6bf3b?role=publish_subscribe
2020-06-18 07:24:05 INFO [ssm-session-worker] [aztecse-tu-ics-dlt-test-infraadmin-0ed1bc492dde6bf3b] [DataBackend] [pluginName=Standard_Stream] Successfully opened websocket connection to: wss://ssmmessages.eu-central-1.amazonaws.com/v1/data-channel/aztecse-tu-ics-dlt-test-infraadmin-0ed1bc492dde6bf3b?role=publish_subscribe
2020-06-18 07:24:05 INFO [ssm-session-worker] [aztecse-tu-ics-dlt-test-infraadmin-0ed1bc492dde6bf3b] [DataBackend] [pluginName=Standard_Stream] Initiating Handshake
2020-06-18 07:24:11 WARN [ssm-session-worker] [aztecse-tu-ics-dlt-test-infraadmin-0ed1bc492dde6bf3b] [DataBackend] [pluginName=Standard_Stream] Unknown handshake client action found, SessionType
2020-06-18 07:24:20 ERROR [ssm-session-worker] [aztecse-tu-ics-dlt-test-infraadmin-0ed1bc492dde6bf3b] [DataBackend] [pluginName=Standard_Stream] Encountered error while initiating handshake. Handshake timed out. Please ensure that you have the latest version of the session manager plugin.
2020-06-18 07:24:20 INFO [ssm-session-worker] [aztecse-tu-ics-dlt-test-infraadmin-0ed1bc492dde6bf3b] [DataBackend] [pluginName=Standard_Stream] Closing datachannel with channel Id aztecse-tu-ics-dlt-test-infraadmin-0ed1bc492dde6bf3b
2020-06-18 07:24:20 INFO [ssm-session-worker] [aztecse-tu-ics-dlt-test-infraadmin-0ed1bc492dde6bf3b] [DataBackend] [pluginName=Standard_Stream] Closing websocket channel connection to: wss://ssmmessages.eu-central-1.amazonaws.com/v1/data-channel/aztecse-tu-ics-dlt-test-infraadmin-0ed1bc492dde6bf3b?role=publish_subscribe
2020-06-18 07:24:20 INFO [ssm-session-worker] [aztecse-tu-ics-dlt-test-infraadmin-0ed1bc492dde6bf3b] [DataBackend] [pluginName=Standard_Stream] Successfully closed websocket connection to: 10.251.9.96:443

The error message I could identify is Unknown handshake client action found, SessionType
Could you please look

répondu il y a 4 ans

Vous n'êtes pas connecté. Se connecter pour publier une réponse.

Une bonne réponse répond clairement à la question, contient des commentaires constructifs et encourage le développement professionnel de la personne qui pose la question.

Instructions pour répondre aux questions