Technical Forum
Ask questions. Discover Answers.
cancel
Showing results for 
Search instead for 
Did you mean: 
Custom Alert Banner

HTTP HealthCheck monitor with POST Statement

Dicky_Moe_13167
Nimbostratus
Nimbostratus

Hello Guys,

 

We have a couple of Citrix XML Broker service we want to loadbalance, and we're having problems implementing an advanced http healthcheck monitor.

 

Basically, its a pool-member specific monitor with a POST statement we tried with curl, like this:

 

curl -X POST -H 'Content-type: text/xml' -d @broker_monitor.xml http://10.10.10.10:8080/scripts/wpnbr.dll

 

The content of the broker_monitor.xml file (contains the POST body):

 

 

And here's the response from the server

 

separate-credentials-validation launch-reference integrated-authentication rade-session-proxy multi-image-icons user-identity full-icon-data full-icon-hash session-sharing

 

So, I've written the send string in the monitor like this (minding the quotes and carriage returns)

 

POST /scripts/wpnbr.dll HTTP/1.1\r\nHost: 10.10.10.10:8080\r\nContent-Type: text/xml\r\n\r\n

 

However, the pool member is marked as down. I don't know what's going on with this ... Can you see anything wrong?

 

The version is BIG-IP 11.3.0 Build 3164.0 Hotfix HF10

 

Thanks! Fabian

 

6 REPLIES 6

Josiah_39459
Historic F5 Account

You can do a tcpdump while the monitor is running and inspect the traffic to verify what you think is being sent is being sent, and what you expect to be returned is being returned.

 

Alternatively, if you have a curl command that works, you could just use an external monitor and monitor via curl:

 

https://devcentral.f5.com/wiki/AdvDesignConfig.ExternalMonitor.ashx

 

Hello Josiah, We installed wireshark on the node, and captured the requests sent from the F5 monitor and from the server from which we run curl. Here both requests and responses: Curl Request (as seen from the wireshark capture in the node): POST /scripts/wpnbr.dll HTTP/1.1 User-Agent: curl/7.19.7 (x86_64-redhat-linux-gnu) libcurl/7.19.7 NSS/3.18 Basic ECC zlib/1.2.3 libidn/1.18 libssh2/1.4.2 Host: 10.10.10.10:8080 Accept: */* Content-type: text/xml Content-Length: 169 HTTP/1.1 100 Continue Server: Citrix Web PN Server Date: Tue, 05 Apr 2016 16:45:20 GMT Curl Response: HTTP/1.1 200 OK Server: Citrix Web PN Server Date: Tue, 05 Apr 2016 16:45:20 GMT Content-type: text/xml Content-length: 673 F5 request (as seen from wireshark capture in the node) POST /scripts/wpnbr.dll HTTP/1.1 Host: 10.14.44.118:8080 Content-Type: text/xml Response to F5 (as seen from wireshark capture in the node) HTTP/1.1 400 Bad request Server: Citrix Web PN Server Date: Tue, 05 Apr 2016 16:40:16 GMT Connection: Close As you can see, CURL added some headers that I didn't include (user-agent, content-length, accept). I tried adding content-lenght, and it didn't work. With or without backslahes count. Fabian

Dicky_Moe_13167
Nimbostratus
Nimbostratus

Hello Josiah,

 

We installed wireshark on the node, and captured the requests sent from the F5 monitor and from the server from which we run curl. Here both requests and responses:

 

Curl Request (as seen from the wireshark capture in the node):

 

POST /scripts/wpnbr.dll HTTP/1.1 User-Agent: curl/7.19.7 (x86_64-redhat-linux-gnu) libcurl/7.19.7 NSS/3.18 Basic ECC zlib/1.2.3 libidn/1.18 libssh2/1.4.2 Host: 10.10.10.10:8080 Accept: / Content-type: text/xml Content-Length: 169

 

HTTP/1.1 100 Continue Server: Citrix Web PN Server Date: Tue, 05 Apr 2016 16:45:20 GMT

 

Curl Response: HTTP/1.1 200 OK Server: Citrix Web PN Server Date: Tue, 05 Apr 2016 16:45:20 GMT Content-type: text/xml Content-length: 673

 

F5 request (as seen from wireshark capture in the node)

 

POST /scripts/wpnbr.dll HTTP/1.1 Host: 10.14.44.118:8080 Content-Type: text/xml

 

 

Response to F5 (as seen from wireshark capture in the node) HTTP/1.1 400 Bad request Server: Citrix Web PN Server Date: Tue, 05 Apr 2016 16:40:16 GMT Connection: Close

 

As you can see, CURL added some headers that I didn't include (user-agent, content-length, accept). I tried adding content-lenght, and it didn't work. With or without backslahes count.

 

Fabian

 

The host header is different too. But only your web server logic will tell you why one is good and one is bad (I can't do that). Otherwise you have to try to make them as close to identical as possible.

The forum deleted some tags because it obviuosly took them as html tags, but the xml in both requests is identical. I'll try to make the deaders match.

Dicky_Moe_13167
Nimbostratus
Nimbostratus

SOLVED!!

 

You know what it was ? The backslash-Double-quotes don't count as 2 characters, they count as 1. So I added the Content-length header with the appropriate number and it worked.

 

Pretty stupid ...