Skip to main content

Railo on Amazon Elastic Beanstalk: Server health is set to red

I have been trying to follow documentation (limited) on how to deploy a Railo application into Amazon Elastic Beanstalk, and came across some recurring issues.  If you are new to Railo+Beanstalk, check out this helpful blog:

The problems I encountered were:

- Deploying via the Eclipse tools yields an error that it could not "detect" the application,
- The application / server health is set to RED (meaning monitoring fails)
- Port 80 fails

Here is what I have found to overcome these issues:

First, add a file called "health.html" to the root of your application.  Note that it is not a ".cfm" file.  This is intentional.  What I've found is that Amazon's health monitoring makes use of the http HEAD request.  Railo on Tomcat6 (the default Elastic Beanstalk environment) chokes on this, resulting in a failure.

When you launch your application, specify the health URL to check to point to your health.html file, which will always properly respond to HEAD requests.

My app was also trying to use temporary disk space, which is a no-no in default Amazon EC2 instances.  You need to mount an EBS disk or S3 bucket to do that.

These discoveries fixed the first 2 problems above.  I will circle back later and address the issue of getting proper health monitoring working, but for now, this at least lets you properly deploy your application and take advantage of the auto-scaling.

For the port 80 issue, I figured out that both your beanstalk AND ec2 security groups need to include port 80 access to the world.  It has something to do with the way the elastic loadbalancer is provisioned.  I launched my environment before applying the port 80 policy, then applied the port 80 policy, and it still didn't work.  I needed to then terminate and re-build the environment, after which it worked.


Popular posts from this blog

Making Macbook Air with 128GB SSD usable with Bootcamp

I recently got a new Macbook Air 11" (the 2012 version) and loaded it with goodies like 8GB ram and 2GHz Core i7.  What I DIDN'T upgrade was the internal SSD.  My config came with 128GB SSD and I refused to pay $300+ to upgrade it to 256GB.  Yeah I know, some call me cheap, but SSds cost $75-$150 for 240GB, so adding another 128GB for $300 seemed way too steep for me.  I figured "ok, I'm going to make 128G work!"

Here is the story of how that went...

Installing python 3.4.x on OSX El Capitan

I love "brew" package manager, but sometimes being too progressive breaks things.  I have several python apps that I maintain that get deployed to AWS using Elastic Beanstalk.  AWS eb can deploy with python 2.7 or 3.4.  Any recent 'brew install python3" will get 3.5.1. #annoying

Dell XPS M1330 + Snow Leopard Hackintosh

I have been working with a Dell XPS M1330 laptop for a few years now.  It doesn't quite match up to the newest notebooks in terms of performance, but it certainly still has some life in it.  I had previously installed OSX 10.5.x on it as an experiment, and had moderate success.  I decided to revisit this idea again to install Snow Leopard (OSX 10.6) on the Dell M1330, and keep some notes for those of you brave enough to Hackintosh your own machine...