Glory to Russia
Glory to Russia

Reputation: 18710

How can I diagnose why exactly my application in Elastic Beanstalk is not reachable?

I have deployed an application to AWS (Elastic Beanstalk) and am having trouble reaching it from the browser. The appliation is a Spring Boot web application.

According to the dashboard, the application is running.

Here are the configuration details (All Applications -> myapp -> myapp-env):

Category: Software

Lifecycle: Keep logs after terminating environment
Environment properties: GRADLE_HOME, JAVA_HOME, M2, M2_HOME, SERVER_PORT
Rotate logs: disabled
Retention: 1 days
Log streaming: enabled
X-Ray daemon: disabled

Category: Instances

AMI ID: XXXXXXXXXXXXXXXXXXXXXXXXX
Instance type: t3.micro
Monitoring interval: 5 minute
IOPS: container default
Size: container default
Root volume type: container default
EC2 security groups: XXXXXXXXXXXXXXXXXXXXXXXXX

Category: Security

IAM instance profile: XXXXXXXXXXXXXXXXXXXXXXXXX
EC2 key pair: XXXXXXXXXXXXXXXXXXXXXXXXX
Service role: XXXXXXXXXXXXXXXXXXXXXXXXX

Category: Network
Public IP address: disabled
Instance subnets: mysubnet-XXXXXX
Visibility: public
VPC: vpc-XXXXXXX

How can I find out what settings do I need to change in order to make my application

At the moment I cannot access it neither from within the company network, nor from the outside.

Update 1:

I looked at the security group settings to find out whether or not any ports are blocked. Below you can find the screenshots of the security group configuration associated with my application.

Screenshot 1

Screenshot 2

There are no blocked ports.

Update 2: I just figured out that I cannot connect to the instance via SSH as well (time out).

Upvotes: 3

Views: 283

Answers (1)

Vikyol
Vikyol

Reputation: 5635

According to the information provided, no public IP assigned to the instance. So I presume that the instance is deployed in a private subnet and you are trying to access your application through an elastic load balancer. You cannot SSH to an instance directly if it is launched in a private subnet.

Please make sure that you:

  1. Setup a NAT Gateway/Nat Instance in a public subnet.
  2. Update your VPC routing table to send all public traffic through the NAT GW. 0.0.0.0 --> NAT

  3. Check that ELB healthchecks are green.

  4. Connect to your application through ELB DNS name.

Upvotes: 4

Related Questions