Forum Discussion
Problem with IIS monitoring
Hello Guys,
I'm trying to write an IIS monitor. On IIS servers I have aspx script, which returns 0, when server works fine and other value if not. I've created HTTP monitor:
GET /IsAlive.aspx HTTP/1.1\r\nHost: www.test.com \r\nConnection: close\r\n\r\n
The problem is that F5 cannot see all returned content from server, but only header and the main html tags, but I must to check the output specified in the attached file
I've wrote an regexp, also present in the attached file
F5 cannot see above content even if I type "Status" (without question marks) in the Receive String field under the monitor configuration tab. The return page is quite small, Content Length has only 1966 bytes. The strange fact is that F5 can see the [Receive String field] <\/body>\r\n<\/html> tag, which is the last expression in the response.
Do you have any ideas how to fix it?
ps.I've heard that F5 has some limitation with checking payload (it checks only 4KB including scripts that are referenced in html).
Regards
Paul
18 Replies
- nathe
Cirrocumulus
Paul,
Just a couple of thoughts. You're right about a limit to the payload, see SOL3451 http://support.f5.com/kb/en-us/solutions/public/3000/400/sol3451.html?sr=25747390
What happens if you curl to this aspx page from the f5, do you see the expected response? See this article for help: https://devcentral.f5.com/wiki/AdvDesignConfig.TroubleshootingLtmMonitors.ashx
Finally, you could try an external monitor (as sol3451 suggests). See also: https://devcentral.f5.com/wiki/advdesignconfig.HTTPMonitor_cURL_BasicGET.ashx
Hope this helps,
N - hoolio
Cirrostratus
Hi Paul,
Can you try removing a space in the send string:
GET /IsAlive.aspx HTTP/1.1\r\nHost: www.test.com\r\nConnection: close\r\n\r\n
I can't view the attachment. Can you reply with the content in a post between [ code ] [/ code ] blocks (without the spaces in the tags)?
To test, can you try setting the receive string to 'HTTP/1\.(0|1) (2|3)' to mark the pool member up for any HTTP 1.0 or 1.1 2xx or 3xx response?
Thanks, Aaron - pawel_jakacki_7
Nimbostratus
Hi Nathan,
curl (executed from BIG-IP) shows right content, but I've just noticed that when monitor check occur, server returns error page:
0x0000: 4500 05dc 0fde 4000 8006 ce10 0a00 0165 E.....@........e
0x0010: 0a00 01c9 0050 ed5c 5224 f069 5b2f d1e3 .....P.\R$.i[/..
0x0020: 8010 fadd 4022 0000 0101 080a 06a1 78fe ....@"........x.
0x0030: 6603 594a 4854 5450 2f31 2e31 2035 3030 f.YJHTTP/1.1.500
0x0040: 2049 6e74 6572 6e61 6c20 5365 7276 6572 .Internal.Server
0x0050: 2045 7272 6f72 0d0a 4461 7465 3a20 5475 .Error..Date:.Tu
0x0060: 652c 2030 3420 4465 6320 3230 3132 2031 e,.04.Dec.2012.1
0x0070: 333a 3136 3a30 3620 474d 540d 0a53 6572 3:16:06.GMT..Ser
0x0080: 7665 723a 204d 6963 726f 736f 6674 2d49 ver:.Microsoft-I
0x0090: 4953 2f36 2e30 0d0a 582d 506f 7765 7265 IS/6.0..X-Powerethat's the reason, why BIG-IP cannot see right content. The question is why server returns Code 500? The problem is in the HTTP GET Request. I'm trying to modify the request now.
Regards
Paul
- nitass
Employee
can you try something similar to this?[root@ve10:Active] config b pool foo list pool foo { monitor all myhttp members 172.28.19.251:80 {} } [root@ve10:Active] config b monitor myhttp list monitor myhttp { defaults from http recv "Status\n\n0\n" send "GET /test.html HTTP/1.1\r\nHost: \r\nConnection: Close\r\n\r\n" } [root@ve10:Active] config curl -i http://172.28.19.251/test.html HTTP/1.1 200 OK Date: Tue, 04 Dec 2012 13:34:18 GMT Server: Apache/2.2.3 (CentOS) Last-Modified: Tue, 04 Dec 2012 12:58:16 GMT ETag: "4183f8-4e-6b55aa00" Accept-Ranges: bytes Content-Length: 78 Connection: close Content-Type: text/html; charset=UTF-8 Status 0 [root@ve10:Active] config b pool foo |grep -i pool\ member +-> POOL MEMBER foo/172.28.19.251:80 active,up - nitass
Employee
The question is why server returns Code 500? The problem is in the HTTP GET Request. I'm trying to modify the request now.you know we can run tcpdump to see curl request and use it in health monitor send string.
e.g.[root@ve10:Active] config ssldump -Aed -nni 0.0 host 172.28.19.251 and port 80 New TCP connection 1: 172.28.19.80(38567) <-> 172.28.19.251(80) 1354627904.1183 (0.0016) C>S --------------------------------------------------------------- GET /test.html HTTP/1.1 User-Agent: curl/7.15.5 (i686-redhat-linux-gnu) libcurl/7.15.5 OpenSSL/0.9.8b zlib/1.2.3 libidn/0.6.5 Host: 172.28.19.251 Accept: */* --------------------------------------------------------------- - pawel_jakacki_7
Nimbostratus
I think that there could be a problem on IIS (I don't have any information if host header value is set or website has appropriate rights assigned) -> https://devcentral.f5.com/Portals/0/activeforums_Attach/IIS_Monitoring_on_the_F5.pdf
- pawel_jakacki_7
Nimbostratus
This is part of my ssldump outputNew TCP connection 4: 10.x.x.201(38467) <-> 10.x.x.101(80) 1354629890.4555 (0.0018) C>S --------------------------------------------------------------- GET /IsAlive.aspx HTTP/1.1 Host: Connection: Close --------------------------------------------------------------- 1354629890.4778 (0.0222) S>C --------------------------------------------------------------- HTTP/1.1 500 Internal Server Error Connection: close Date: Tue, 04 Dec 2012 14:04:52 GMTServer Error in '/' Application. Object reference not set to an instance of an object.[NullReferenceException]: Object reference not set to an instance of an object. at xxx.Global.Application_BeginRequest(Object sender, EventArgs e) at System.Web.HttpApplication.SyncEventExecutionStep.System.Web.HttpApplication.IExecutionStep.Execute() at System.Web.HttpApplication.ExecuteStep(IExecutionStep step, Boolean& completedSynchronously) so I think, that the problem could be in IIS configuration. My http GET is the following: GET /IsAlive.aspx HTTP/1.1\r\nHost: \r\nConnection: Close\r\n\r\n - pawel_jakacki_7
Nimbostratus
I've just received an information from IIS admin, that there is no host header value set and website has appropriate right - script and exec.
Curl shows correct answer[root@dc_f5_1:Active] config curl -i http://10.X.X.101/IsAlive.aspx HTTP/1.1 200 OK Date: Tue, 04 Dec 2012 14:32:27 GMT Server: Microsoft-IIS/6.0 X-Powered-By: ASP.NET X-AspNet-Version: 2.0.50727 Set-Cookie: ASP.NET_SessionId=mmcjyk55eyvdlsqivwcpbxej; path=/; HttpOnly Cache-Control: private Content-Type: text/html; charset=utf-8 Content-Length: 1951 Status 0
but ssldump notNew TCP connection 7: 10.X.X.201(42244) <-> 10.X.X.101(80) 1354631633.4696 (0.0011) C>S --------------------------------------------------------------- GET /IsAlive.aspx HTTP/1.1 Host: Connection: Close --------------------------------------------------------------- 1354631633.4712 (0.0016) S>C --------------------------------------------------------------- HTTP/1.1 500 Internal Server Error Connection: close Date: Tue, 04 Dec 2012 14:33:55 GMT Server: Microsoft-IIS/6.0 X-Powered-By: ASP.NET X-AspNet-Version: 2.0.50727 Cache-Control: private Content-Type: text/html; charset=utf-8 Content-Length: 3565 Object reference not set to an instance of an object.
after that server sends TCP FIN - nitass
Employee
have you run tcpdump while using curl? so, we can set health monitor send string according to what curl sends out. - pawel_jakacki_7
Nimbostratus
.
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
