aws / amazon-ssm-agent

An agent to enable remote management of your EC2 instances, on-premises servers, or virtual machines (VMs).
https://aws.amazon.com/systems-manager/
Apache License 2.0
1.03k stars 323 forks source link

ssm-setup-cli.exe fails - "Please run as root/admin. Err: failed to check permissions: exit status 1" #560

Open Mapel88 opened 3 months ago

Mapel88 commented 3 months ago

Hi,

When running ssm-setup-cli.exe with hybrid activation it fails sporadically. some servers were able to install and some failed with the following error: "Please run as root/admin. Err: failed to check permissions: exit status 1"

all installations on all servers are executed by same user which is domain admin & local admin. Also tested with administrator itself.

OS: windows 2016

Any advise or fix planned for this?

VishnuKarthikRavindran commented 3 months ago

Hi @Mapel88, Thanks for reaching out to us. Could you please share more details on the OS version? Is there any difference between the working ones and non working ones?

Nookyx commented 2 months ago

Facing the same issue on Windows Server 2022. It does fail intermittently. Calling the ssm-setup-cli.exe multiple times in exactly the same way will eventually work, usually after about 5 tries.

VishnuKarthikRavindran commented 2 months ago

Thanks for reaching us @Nookyx. We will look into this

Mapel88 commented 2 months ago

Hi @VishnuKarthikRavindran, Sorry, I missed your question. No difference between servers. All running windows 2016 and installed from same image. I started having this issue about 3 weeks ago. I retried to install 3 times but no success. maybe 5th time is a a charm?

EC2 nodes running same OS with ami created from same image usually pass successfully. don't think i encountered this issue with ec2 even though running same command and same configuration.

thanks

VishnuKarthikRavindran commented 2 months ago

Thanks @Mapel88. We were able to repro this issue and will be pushing out the fix in upcoming release.

nervermore2 commented 2 months ago

I faced the same issue while executing ssm-setup-cli.exe

nervermore2 commented 1 month ago

Some additional logs: I tried to run ssm-setup-cli.exe during instance startup script. I verify that:

Write-Output "Current user: $env:USERNAME"

has output Current user: Administrator This still fails. If I log into the instance and run the ssm installer executable. Then it's working.

VishnuKarthikRavindran commented 1 month ago

We have fixed the issue in ssm-setup-cli version - https://github.com/aws/amazon-ssm-agent/releases/tag/3.3.418.0. Please let us know if this issue still persists