AWSEBInstanceLaunchWaitCondition error on deploying Java app on Elastic Beanstalk

0

Hello, I keep having issues when trying to deploy a simple Java (.war) application to Elastic Beankstalk. Basically, everyime I get these messages on the events tab:

Environment health has transitioned from Pending to Info. Initialization in progress (running for 15 minutes). None of the instances are sending data

Stack named 'awseb-e-9w3kfgvpjf-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.

The steps I did were pretty basic, I just added the application name, .war file, SERVER_PORT 5000 environment variable and used the option called Create and use new service role on the Configure service access step, creating a new role for EC2 instance profile with the following two permission policies: AWSElasticBeanstalkWebTier and AWSElasticBeanstalkWorkerTier. Do you have any idea what could got wrong? If I try to get the logs I get an error saying that it failed to retrieve requested logs.

Daniel
asked 4 months ago343 views
2 Answers
0
Accepted Answer

Hello, are the instances provision in private subnets? If so, please make sure the instance can communicate to Beanstalk service and other services like ELB: https://docs.aws.amazon.com/elasticbeanstalk/latest/dg/vpc.html#services-vpc-private Thanks.

Zen
answered 4 months ago
profile picture
EXPERT
reviewed 3 months ago
0

Thanks for the answer Zen, I managed to fix it. The problem was like you said that the application was deployed into a private subnet. I went to EC2 > Instances > selected the running EC2 instance > opened the assigned subnet from the Subnet ID inside Instance summary > it opened the Subnets table inside VPC > clicked the subnet ID > Route table > selected the route from the Route table ID > Actions > Edit subnet associations > checked a subnet which did not had the rds-pvt prefix in its name. Now it have the additional destination to 0.0.0.0/0 and target set to Internet Gateway. After this change I was able to create a new Elastic Beanstalk instance which was completed in just a few minutes without any errors.

Daniel
answered 4 months ago

You are not logged in. Log in to post an answer.

A good answer clearly answers the question and provides constructive feedback and encourages professional growth in the question asker.

Guidelines for Answering Questions