Forum Discussion
Monitoring a HTTP 204 response
HTTP monitor - Send string: GET /queryable - Receive string: HTTP/1.x 204 No Content
HTTP monitor - Send string: GET /queryable - Receive string: 204
HTTP monitor - Send string: GET /queryable - Receive string:
I verified externally that requests to this page do in fact return "HTTP/1.x 204 No Content" in the headers. I also ran tcpdump from the load balancer, but I'm not too sure of the output. Here is what I found:
0x0000 00d4 0800 4500 0034 e822 4000 4006 24aa ....E..4."@.@.$.
0x0010 0a0a 0ce7 0a0a 0cfd 1f9a be02 051c 495b ..............I[
0x0020 ca52 e327 8010 05a8 7231 0000 0101 080a .R.'....r1......
0x0030 2f5c a179 97be 8ec9 /\.y....
Is anyone doing something similar? If so, please let me know how to accomplish this.
Thanks.
5 Replies
- hoolio
Cirrostratus
There aren't any HTTP headers in the tcpdump snippet you've posted. Are you sure that's the full response the server sends in response to the monitor request?
Can you try an HTTP 1.1 formatted request for the send string with a receive string of HTTP to start with?
GET /queryable HTTP/1.1\r\nHost: \r\nConnection: Close\r\n
Aaron - rjordan
Nimbostratus
Thanks for the quick response. I modified the send string as requested and I now see some interesting stuff in the tcp dump. Here is my GET request:
0x0000 00d4 0800 4500 0078 72b1 4000 4006 99d7 ....E..xr.@.@...
0x0010 0a0a 0cfd 0a0a 0ce7 a881 1f9a 61c5 4643 ............a.FC
0x0020 9d90 b443 8018 16d0 b3c4 0000 0101 080a ...C............
0x0030 97e3 5ff9 2f81 7276 4745 5420 2f71 7565 .._./.rvGET./que
0x0040 7279 6162 6c65 2048 5454 502f 312e 310d ryable.HTTP/1.1.
0x0050 0a48 6f73 743a 3130 2e31 302e 3132 2e32 .Host:10.10.12.2
0x0060 3331 200d 0a43 6f6e 6e65 6374 696f 6e3a 31...Connection:
0x0070 2043 6c6f 7365 0d0a 0d0a 0d0a .Close......
And here is the response:
0x0000 00d4 0800 4500 00cf c637 4000 4006 45fa ....E....7@.@.E.
0x0010 0a0a 0ce7 0a0a 0cfd 1f9a a881 9d90 b443 ...............C
0x0020 61c5 4687 8018 05a8 9912 0000 0101 080a a.F.............
0x0030 2f81 727a 97e3 5ff9 4854 5450 2f31 2e31 /.rz.._.HTTP/1.1
0x0040 2032 3034 204e 6f20 436f 6e74 656e 740d .204.No.Content.
0x0050 0a53 6572 7665 723a 2044 6973 636f 7665 .Server:.Discove
0x0060 7279 2045 6e67 696e 6520 2832 2e36 2e39 ry.Engine.(2.6.9
0x0070 290d 0a58 2d44 6973 636f 7665 7279 2d49 )..X-Discovery-I
0x0080 6e73 7461 6e63 653a 2063 3738 3332 3262 nstance:.c78322b
0x0090 6338 6135 6433 3131 3666 3032 6464 3832 c8a5d3116f02dd82
0x00a0 6238 3435 3265 6638 640d 0a58 2d52 6571 b8452ef8d..X-Req
0x00b0 7565 7374 2d54 696d 653a 2030 0d0a 436f uest-Time:.0..Co
0x00c0 6e6e 6563 7469 6f6e 3a20 636c 6f73 650d nnection:.close.
0x00d0 0a0d 0a ...
The monitor is still failing. I still can't tell what my response sting should look like based on the response in the tcpdump.
Thanks. - rjordan
Nimbostratus
Actually, changing my response string toHTTP/1.1 204 No Content
appears to work!!! Is there any way I can modify the GET request so I don't have to specify the host?
Edit: Nevermind, I figured it out. It works like a charm now. Thanks very much for you help. - hoolio
Cirrostratus
Most servers will respond with an empty host header value, so try to use Host: with no value.
Aaron - T_Kapanka_13663
Nimbostratus
How did you get this to work? What kind of monitor were you using? When I try to create a 204-based monitor, it always marks the pool as down. I'm using the web console to the LTM v11.4.
Send String: GET /isAlive\n\r
Receive String: HTTP/1.1 204 No Content
From this post, it sounds like it can't be done: https://devcentral.f5.com/questions/health-monitors-and-status-codes but it sounds like you were able to. Thoughts?
Help guide the future of your DevCentral Community!
What tools do you use to collaborate? (1min - anonymous)Recent Discussions
Related Content
* Getting Started on DevCentral
* Community Guidelines
* Community Terms of Use / EULA
* Community Ranking Explained
* Community Resources
* Contact the DevCentral Team
* Update MFA on account.f5.com
