J_W__Koebel_442
Dec 09, 2009Nimbostratus
Monitors Won't Check HTTP Status Code
Hi everyone,
I'm trying to revise our currently lacking health monitors to keep better track of the status of each node. We run JBoss servlets on top of Tomcat to serve up a web application over HTTP; occasionally Java errors cause the application to crash on one node. Currently we don't have any way of detecting this; the receive string on our monitors is blank and they accept any response as valid.
I'm trying to get the health monitors to only mark a pool member as "good" if the HTTP status code is 200.
Here's what I'm checking:
SEND String: "GET /Jakarta/Login.do HTTP/1.1\r\n\nHost:\r\n\nConnection: close\r\n\r\n"
RECEIVE String: "HTTP/1.1 200 OK"
I verified using CURL that the proper codes are being set.
curl http://10.32.41.245:30200/Jakarta/Login.do -I
HTTP/1.1 200 OK
Server: Apache-Coyote/1.1
X-Powered-By: Servlet 2.4; JBoss-4.0.4.GA (build: CVSTag=JBoss_4_0_4_GA date=200605151000)/Tomcat-5.5
Set-Cookie: JSESSIONID=2327E0E333F2697DEB355CB9685DC811;
Content-Type: text/html;charset=UTF-8
Content-Length: 6868
Date: Thu, 10 Dec 2009 00:10:56 GMT
And yet....my health monitor marks the pool as "down" in that configuration.
If I make the RECEIVE string "200" by itself, it marks the pool as "up" even when it is CLEARLY down, as in this case:
SEND String: "GET /Jakarta/Login.do HTTP/1.1\r\n\nHost:\r\n\nConnection: close\r\n\r\n"
RECEIVE String: "200"
pool members marked "up", but the server itself is responding that it's dead:
curl http://10.32.41.245:30200/Jakarta/Login.do -I
HTTP/1.1 404 Servlet action is not available
Server: Apache-Coyote/1.1
ETag: W/"743-1254223556000"
Last-Modified: Tue, 29 Sep 2009 11:25:56 GMT
Content-Type: text/html
Content-Length: 743
Date: Thu, 10 Dec 2009 00:08:31 GMT
Any thoughts?