.net app not running on 8080 port after implementing application load balancer in aws

I have a machine which is running .net core app.

i have set up reverse porxy so that so that port 80 points to 8343 and have 8080 to port 5000 default kerstrel port.

all was working find i was able to run both my .net app.

Now i have implemented elastic load balancer in front of my machine. i am able to run the app service which runs on 80 but not able to get the app running on 8080 to work.

Failed to bind to address http://127.0.0.1:5000: address already in use. 

i had port http: 80 listener forwarding to my target group which holds my machine. Went ahead and added http:8080 forwarding to same target group.

Note:

  1. machine is within a VPC
  2. security group of load balancer has all traffic open as well.

i am not sure what might be causing this issue. is it load balancer causing this? anything at VPC end that needs to be done ?

Add Comment
1 Answer(s)

step 1 : you need to kill that process which is using the port. re run your dontnet file. It will work.

with respect to having both 80 and 8080 traffic on ELB. You need to have two individual listners for that. One for port 80 and other for port 8080 and both should point to target groups which have at least one instance to handle the traffic from that port.

in reference : AWS Load Balancer to multiple ports on the same server with no PAT

Add Comment

Your Answer

By posting your answer, you agree to the privacy policy and terms of service.