Forum Discussion

Highto_36347's avatar
Highto_36347
Icon for Nimbostratus rankNimbostratus
Jan 12, 2011

html monitor in WebLogic

I try to monitor an url in Weblogic server but the pool is down:

 

 

monitor adama_blanco.html {

 

defaults from http

 

interval 8

 

timeout 25

 

recv "200 OK"

 

send "GET /adama/blanco.html HTTP/1.1\r\nHost: \r\nConnection: Close\r\n"

 

}

 

 

If I try telnet 1.2.3.4 port 19002 and execute the command "GET /adama/blanco.html HTTP/1.1\r\nHost: \r\nConnection: Close\r\n" the response is correct:

 

 

HTTP/1.1 200 OK

 

Connection: close

 

Date: Wed, 12 Jan 2011 16:23:53 GMT

 

Content-Length: 137

 

Content-Type: text/html

 

Last-Modified: Sun, 19 Dec 2010 19:59:23 GMT

 

X-Powered-By: Servlet/2.5 JSP/2.1

 

 

 

 

Blanco

 

 

 

 

 

Connection closed by foreign host.

 

 

I tried with curl -H "Host: " http://1.2.3.4:19002/adama/blanco.html but the response is Error 400--Bad Request

 

 

When I capture the traffic this is the results:

 

 

0000 00 14 4f 7c 8b 02 00 01 d7 d4 cd c6 08 00 45 00 ..O|.... ......E.

 

0010 00 6c 54 82 40 00 40 06 40 43 0a 0b 5f 7a 0a 0b .lT.@.@. @C.._z..

 

0020 32 37 ab 4e 4a 3a 5c d1 1b 38 8f 40 b2 1e 80 18 27.NJ:\. .8.@....

 

0030 00 2e f2 40 00 00 01 01 08 0a 7b 13 f3 a1 2c fb ...@.... ..{...,.

 

0040 48 d4 47 45 54 20 61 64 61 6d 61 2f 62 6c 61 6e H.GET ad ama/blan

 

0050 63 6f 2e 68 74 6d 6c 20 48 54 54 50 2f 31 2e 31 co.html HTTP/1.1

 

0060 0a 48 6f 73 74 3a 20 0a 43 6f 6e 6e .Host: . Conn

 

 

Any idea?

3 Replies

  • What version are you on?

     

     

    Here's a great article on constructing monitors for each version (login required)

     

     

    https://support.f5.com/kb/en-us/solutions/public/2000/100/sol2167.html

     

     

  • Here's what I'd use:

    GET /adama/blanco.html HTTP/1.1\r\nHost: \r\nConnection: Close\r\n\r\n

    From the article:

    If the request contains headers but does not contain a body, terminate the Send String with a double \r\n sequence.

    Since you're using a Host Header, I imagine your issue is with only having one \r\n. That was a slight change in 10.2 IIRC.