Reputation: 2492
I'm trying to create an Elastic Beanstalk environment running on PHP, but everytime that I try, the health of the environment changes to severe, and it never changes.
During the creation process, I have uploaded a .zip file with my code, and changed a bit the settings of the environment so it will be suitable for my website (for example, added HTTPS listener and changed the instance type to m4.xlarge).
In the event log, I see how it creates everything, including instances, security groups, load balancers and stuff, but after it creates everything, I get the following messages:
Environment health has transitioned from Pending to Severe. ELB processes are not healthy on all instances. Initialization in progress (running for 11 minutes). None of the instances are sending data. ELB health is failing or not available for all instances.
Stack named 'awseb-e-pxfrhmrp2m-stack' aborted operation. Current state: 'CREATE_FAILED' Reason: The following resource(s) failed to create: [AWSEBInstanceLaunchWaitCondition].
LaunchWaitCondition failed. The expected number of EC2 instances were not initialized within the given time. Rebuild the environment. If this persists, contact support.
I couldn't understand why it is happening, which is very frustrating.
If you could please help me solve it, that would be wonderful as I'm dealing with this situation for a few hours already and couldn't find any solution. I tried rebuilding the environment, terminating it and starting it from scratch, uploading a previous version of my code, but so far none of the above has worked.
Upvotes: 1
Views: 2040
Reputation: 2952
It sounds like your instances can't send their statuses to Elastic Beanstalk.
I am assuming the reason for this, is because you are deploying your instances into private subnets, with no access to EB, so what I suggest is:
Verify that the subnets in which your ec2-instances are being deployed are either public subnets (i.e subnets with a route table with a route to an internet gateway), or private subnets behind a nat gateway (i.e. subnets with a route table with a route to a NAT gateway).
Upvotes: 3