Forum Discussion
Raj_57800
Nimbostratus
Apr 15, 2010Monitor using host header
I am trying to setup a monitor page using host header. It is working when when it is done manually but not when created as a monitor page. Request experts advice. Thanks
Testing through Telnet
[root@devbox:Active] ~ telnet 165.28.92.111 80 Trying 165.28.81.111... Connected to 165.28.92.111. Escape character is '^]'. GET /monitor/f5bigip.html HTTP/1.1 Host: dev-apps.test.com:80 Connection: close HTTP/1.1 200 OK Content-Type: text/html Last-Modified: Wed, 14 Apr 2010 20:24:28 GMT Accept-Ranges: bytes ETag: "c877f7b10dcca1:0" Server: Microsoft-IIS/7.0 X-Powered-By: ASP.NET Date: Wed, 14 Apr 2010 21:30:20 GMT Connection: close Content-Length: 67 Development - East Node Up Connection closed by foreign host.
[root@devbox:Active] ~ telnet 165.28.92.111 80 Trying 165.28.92.111... Connected to 165.28.81.111. Escape character is '^]'. GET /monitor/f5bigip.html HTTP/1.1\r\nHost: dev-apps.test.com:80\r\nConnection: close\r\n HTTP/1.1 400 Bad Request Content-Type: text/html; charset=us-ascii Server: Microsoft-HTTPAPI/2.0 Date: Wed, 14 Apr 2010 21:29:10 GMT Connection: close Content-Length: 311 Bad Request Bad Request HTTP Error 400. The request is badly formed. Connection closed by foreign host.
My monitor page
GET /monitor/f5bigip.html HTTP/1.1\r\nHost: dev-apps.test.com:80\r\nConnection: close\r\n
Return string
Node Up
Raj
- hoolio
Cirrostratus
Hi Raj, - smp_86112
Cirrostratus
I think you might need an additional \r\n at the end - like this, as there must be a blank line to terminate the request??? - Raj_57800
Nimbostratus
I tried the following formats and ame error. - smp_86112
Cirrostratus
I suspect that is the case, since (my understanding is that) Linux interprets "\n" as a CRLF. "\r\n" is used in Windows environments I believe. Maybe TMM is smart enough to figure out the difference, but the Linux kernel is not? - L4L7_53191
Nimbostratus
I think problem is that you're using telnet for this. Use something like netcat instead - it'll honor the literal \r\n characters and allow you to really mock up what the mointor string is doing. When you're doing it via telnet, every time you're hitting the return key you're appending another \r\n, so you're breaking the request, hence the 400 status. - hoolio
Cirrostratus
Another thing to consider is that the monitoring daemon, bigd, appends one or two \r\n's to the send string. This has changed slightly over different versions. It consistently causes problems when setting up monitors for a server that strictly enforces the HTTP RFCs for delimiters.
Recent Discussions
Related Content
DevCentral Quicklinks
* 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
Discover DevCentral Connects