0

I have a load balancer configured in a public vpc subnet to route traffic from HTTPS (443) to an instance in a private vpc subnet over HTTP (8080). The setup worked fine for about 24 hours, until the java process on the instance crashed. At this point, the health check started failing and the instance began showing as unhealthy.

I've since restarted the process and can make local 'curl' requests locally on the EC2 instance, as well as from the NAT instance I have in the public subnet (same subnet as the load balancer). Despite the instance being in a healthy state, the load balancer still shows it as unhealthy.

What seems particularly odd to me is that the access log on the EC2 instance no longer shows any attempts from the Load Balancer to access the healthcheck URL. I enabled logging on the load balancer to an S3 bucket but this has only shown a single GET request with a 503 error code. I've tried unregistering the instance from the load balancer and re-registering it but that made no difference. Stopping and starting the instance and re-registering it with the load balancer also made no difference

Any ideas why the load balancer isn't even attempting to access the instance?

Thanks for any suggestions!

  • What does AWS support say? – EEAA Apr 04 '14 at 12:16
  • I'm waiting for their response (and will post the answer if I get one) but thought the community would be a good place to start. – Alasdair Ross Apr 04 '14 at 12:24
  • Still no answer from AWS support forums, however de-registering the instance, restarting the instance, re-registering the instance...and waiting 18 hours did seem to have an effect. Finally the load balancer started sending healthchecks which show in the application access logs. – Alasdair Ross May 22 '14 at 09:17

1 Answers1

0

It could also be an issue with the .htaccess rules in your public html folder. Is your .htaccess folder rewriting to a folder?

It was an issue for me also, where the default health check is set to http:80/index.php But my rewrite was to a folder on the server. So it gave status as unhealthy.

Although i would like to keep my rewrites with .htacess on, but removing .htacess rules allowed elb to ping my public html folder and declare instances as healthy.

Please do let me know if it helps. Thanks

kasperd
  • 30,455
  • 17
  • 76
  • 124
  • Good suggestion, but I think it's unlikely in this case. The application runs under JBoss, but even the JBoss proxy settings did not change between it working and being broken. – Alasdair Ross May 22 '14 at 09:15
  • Here's what can be done. If you have installed apache on your server, you can keep a healthcheck file on your public html folder and point that in the elb as well. In that way, you should be able to check the status of the instances unless if you want to check JBoss server status, which i think in this case is not the purpose. – ravibalgi May 31 '14 at 04:17