Forum Discussion

Brian_Kenworthy's avatar
Brian_Kenworthy
Icon for Nimbostratus rankNimbostratus
Oct 11, 2007

HTTPS Monitor Help

Hi all.

 

 

I have a web application listening on for SSL connections on a high port, 8000. I would like to setup a health monitor to send a GET request to a uri /webservices/mylistener, so I have setup a user defined monitor which inherits from https and checks *:8012 and sends GET /webservices/mylistener

 

 

The application doesn't seem to like this saying Invalid request line: GET /webservices/mylistener

 

 

I think this has something to do with https. If I telnet to port 800 and issue a GET /, it complains about a plain text request. If I put the whole url\uri in a broswer I see the string returned.

 

 

What is the best way to implement an http monitor to get a string over SSL on a high port?

 

 

Thanks in advance,

 

Brian
  • Deb_Allen_18's avatar
    Deb_Allen_18
    Historic F5 Account
    Hi Brian -

     

     

    It sounds like LTM is actually sending the monitor traffic to the node, and it is being encrypted/decrypted properly, so I suspect the server may be looking for some additional information, like HTTP version or standard headers.

     

     

    I'd start by inserting HTTP version, Host header, and Connection: Close in your send string:

     

    GET /webservices/mylistener HTTP/1.1\r\nConnection: Close\r\nHost: myhost.domain.com\r\n\r\nas detailed here: Click here

     

     

    HTH

     

    /deb

     

     

  • Thanks Deb, but I am still having issues. I setup the http monitor like this:

     

     

    GET /helloworld HTTP/1.1\r\nConnection: Close\r\nHost: myhost.domain.com\r\n\r\

     

     

    But in my application log I am seeing this error:

     

     

    ERROR 2007-10-17 13:34:39,314 [connector.http.0.endpoint.http.localhost.8282.helloworld.receiver.4] org.mule.impl.

     

    DefaultExceptionStrategy: Caught exception in Exception Strategy: Invalid HTTP minor version number: HTTP/1.1\r

     

    org.apache.commons.httpclient.ProtocolException: Invalid HTTP minor version number: HTTP/1.1\r

     

     

    If I issue the same command using the WFetch posting tool from MS, I receive the following output which looks perfect, but for some reason I cannot get the monitor to work. Wfetch output:

     

     

    started....WWWConnect::Close("127.0.0.1","8282")\nclosed source port: 1190\r\n

     

    WWWConnect::Connect("127.0.0.1","8282")\nsource port: 1723\r\n

     

    REQUEST: **************\nGET /helloworld HTTP/1.1\r\n

     

    Host: localhost\r\n

     

    Accept: */*\r\n

     

    \r\n

     

    RESPONSE: **************\nHTTP/1.1 200 OK\r\n

     

    Content-Type: text/plain\r\n

     

    Date: Wed, 17 Oct 2007 01:27:44 CDT\r\n

     

    Server: Mule/SNAPSHOT\r\n

     

    Expires: Wed, 17 Oct 2007 01:27:44 CDT\r\n

     

    Content-Length: 24\r\n

     

    \r\n

     

    Hello World !finished.

     

     

    Any ideas? Thanks again!
  • I have run into similar issues with Mule, it seems to have extensive logging on by default, and is therefore very picky about the transactions it looks for. I tried a generic TCP monitor and generic HTTPS montior. While they may work for the F5 they fill the mule logs. You will need to setup a URL to hit (/testmule below) as Mule doesn't like a GET to root. And we also added accept and user agent headers. Not sure if both are required. I didn't add a host header as I wanted to keep the monitor standard for all of our Mule deployments. The connection close may also be a good idea, but I didn't test it.

    Here is the monitor I used:

    monitor https_Mule {
       defaults from https
       send "GET /TestMule HTTP/1.1\r\nUser-Agent: F5LTM\r\nAccept: */*\r\n\r\n"
    }