I have an EC2 instance (Instance-A) that sits behind an ELB (single instance at the moment). The server runs on Wildfly 11.
Target group shows the instance is healthy. And I can use curl using ip address from another instance (Instance-B) in a different vpc.
But it returns 502 when I curl the ELB dns name from Instance-B. Any idea where to look at?
Access log entry,
http 2019-11-11T22:57:04.899824Z app/DummyELB-2/b71c4db727f11413 172.31.14.179:60746 10.1.4.217:80 -1 -1 -1 502 - 127 293 "GET http://internal-dummyelb-2-1122730003.ap-southeast-2.elb.amazonaws.com:80/ HTTP/1.1" "curl/7.61.1" - - arn:aws:elasticloadbalancing:ap-southeast-2:xxx:targetgroup/DummyTG-2/738f12f02eeddb57 "Root=1-5dc9e740-f43a035fdc04fec2373217d6" "-" "-" 0 2019-11-11T22:57:04.898000Z "forward" "-" "-" "10.1.4.217:80" "-"
- Update -
The ELB is internal and the instance is private. I also have a separate private instance (with a index.html on apache server) and an internal ELB that has no problem with curling ELB DNS.