One of my Amazon Elastic Compute Cloud (Amazon EC2) instances that's managed by AWS OpsWorks Stacks is stuck in the "setup_failed" state. Why won't my OpsWorks Stacks instance enter the "online" state, and how do I troubleshoot the issue?
Short description
An OpsWorks Stacks instance can enter the setup_failed state and not start during a setup lifecycle event for a variety of reasons. However, the problem is usually because one of the following resources is misconfigured:
- Custom recipes
- Applications
- Custom Berkshelf cookbooks
- Custom JSON that's used to override stack attributes
For more information on how to troubleshoot instances in the setup_failed state, see Logging in to a failed instance in the OpsWorks User Guide.
Note: For instances stuck in the start_failed state, see Why is my AWS OpsWorks Stacks instance not starting and stuck in the "start_failed" state?
Resolution
Verify that your instance's Amazon Elastic Block Store (Amazon EBS) volume is configured correctly
Review Registering Amazon EBS volumes with a stack and make sure that your instance meets all of the requirements listed.
Verify that your custom recipe is configured correctly
Review your instance's Chef logs to identify what's causing the issue. Then, debug your custom recipe based on the error message that's recorded in the logs.
For more information, see Recipes in the OpsWorks User Guide.
Verify that your instance has enough memory to allocate during the setup lifecycle event
For instructions on how to review your instance's memory metrics, see Monitoring Stacks using Amazon CloudWatch.