首页 > 解决方案 > Target group always unhealthy on port 8087 - running spring boot app through application load balancer

问题描述

I am new to AWS. I have an Application load balancer which listens on http:80 and https:443. To this I have attached a target group at port 8087. I have an EC2 instance running a spring boot app on port 8087. This is ec2 is added as target to d above mentioned target group. Now when I try to access my swagger page of app using alb url - https://alb-4444554.us-east-1.elb.amazonaws.com/demo/api/swagger-ui.html (dummy url) , it doesn't load.Because my target group health check on port 8087 fails with code 400. I am able to access swagger page directly from ec2 url and port 8087 . But not through ALB. I want any request coming to my alb to be directed to this ec2 spring boot app.

标签: amazon-web-servicesspring-bootamazon-ec2routesaws-application-load-balancer

解决方案


推荐阅读