Closed johan-smits closed 3 years ago
The managed instance id is generated and stored on the server side at registration time and passed back to the agent to be stored in /opt/aws/ssm/data/
, so I'm not sure why the managed instance id would on your ubuntu box without manual interference or reregistration. You can try editing the managed instance id in /opt/aws/ssm/data/Vault/Store/RegistrationKey
to the correct managed instance id but the fact that it has changed makes me question the validity of the rest of that file (which contains other registration info to validate against). Please deregister your server, create a new activation, and register again to get your server back to a normal state.
@gianniLesl thanks for the suggestion, when I do this it give this error in the log:
Entering SSM Agent hibernate - error occurred in RequestManagedInstanceRoleToken: ValidationException: 2 validation errors detected: Value 'mi-df9b5838' at 'instanceId' failed to satisfy constraint: Member must have length greater than or equal to 20; Value 'mi-df9b5838' at 'instanceId' failed to satisfy constraint: Member must satisfy regular expression pattern: ^mi-\w{17}$
status code: 400, request id: d731d459-f82c-4a83-954b-f559811104d7
Removing the file makes the node pop-up but I have this in the logs now:
2021-05-28 07:12:41 WARN error while loading server info%!(EXTRA *errors.errorString=Failed to load instance info from vault. Data file of RegistrationKey is missing.)
Are you able to deregister the machine and register with ssm again?
@gianniLesl how can I do this?
Hi @johan-smits, Please follow steps 4-6 in the below link for registration and deregistration -
@VishnuKarthikRavindran The deregistration option is greyed out from the console. But this option is for all instances the same.
Create a new activation in Systems Manager and on your instance run
sudo amazon-ssm-agent -register -code "{activation-code}" -id "{activation-id}" -region "{activation-region}"
Reply "Yes" when the agent responds "Instance already registered. Would you like to override existing with new registration information?"
If that does not work try running sudo amazon-ssm-agent -clear
and running the register command again
I have a old Ubuntu 14:04 server that has been upgraded through the years to 20.04. The node has a old (short) instance ID and when I want to start the ssm agent I get this error:
Note that it shows a long instance ID that is not the one of the node. It fails to register in the portal.
I have removed the old package and installed the snap version of the ssm manager.