aws-quickstart / quickstart-microsoft-rdgateway

AWS Quick Start Team
Apache License 2.0
48 stars 87 forks source link

CloudFormation fails #40

Open seyedk opened 3 years ago

seyedk commented 3 years ago

The CloudFormation template with existing VPC (domain-joined) keeps failing. The RDGW instances gets to running state and after a few minutes, it terminates the instances without any clue: image

Also, The CloudFormation gets stuck in the RDGWAutoScalingGroup for more than 40 minutes then failed with this message

Group did not stabilize. {current/minSize/maxSize} group size = {0/2/2}.

here's the screenshot showing what I got after an hour of wait:

image

davmayd commented 3 years ago

Can you please deploy the stack with stack deletion disabled, so the instances remain up after failure, and then RDP into the instance and review the logs? The Windows event log for Desired State Configuration could be helpful. The issue may be due to an issue with your VPC, AD environment, security groups, NACLs, etc.

sicg05 commented 3 years ago

The CloudFormation template with existing VPC (domain-joined) keeps failing. The RDGW instances gets to running state and after a few minutes, it terminates the instances without any clue: image

Also, The CloudFormation gets stuck in the RDGWAutoScalingGroup for more than 40 minutes then failed with this message

Group did not stabilize. {current/minSize/maxSize} group size = {0/2/2}.

here's the screenshot showing what I got after an hour of wait:

image

Did you ever find a solution? I'm having the same issue with this template. I've tried it as a standalone and as join to domain. Any help is appreciated.

bborup commented 3 years ago

Same issue.

bborup commented 3 years ago

Maybe this helps (it occurs over and over) - At 2021-10-29T17:34:31Z a user request update of AutoScalingGroup constraints to min: 1, max: 1, desired: 1 changing the desired capacity from 0 to 1. At 2021-10-29T17:34:34Z an instance was started in response to a difference between desired and actual capacity, increasing the capacity from 0 to 1.

Launching a new EC2 instance: i-nnnnnnnnnnnn. Status Reason: Instance failed to complete user's Lifecycle Action: Lifecycle Action with token xxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxxx was abandoned: Lifecycle Action Completed with ABANDON Result

dkropman-Slalom commented 2 years ago

I have the same problem as @bborup . I have been unable to determine why it is failing.

Gninieb commented 1 year ago

You can solve the problem by setting the public subnets of the VPC to Enable auto-assign public IPv4 address.

In the Code: The public subnet definitions begin at line 771. Note at line 803 that the MapPublicIpOnLaunch property for this first subnet is set to True. All remaining public subnets are configured similarly. This would mean that if the EC2 launch template/wizard didn't specify to assign a public IP, then the subnet would still assign one automatically(if it's activated).

The launch template/wizard didn't specify to assign a public IP so you have to activate IP auto-assign for the public subnet.

ritzdan commented 1 year ago

This solution works, but please note setting auto-assign public IPv4 address is elsewhere considered anti-best practice and will create exceptions in Security Hub. https://docs.aws.amazon.com/securityhub/latest/userguide/securityhub-standards-fsbp-controls.html#fsbp-ec2-15. It would be better if the template was updated.