HSSR sideband connection for querying LDAP not working
I'm having this issue, that i can't get the sideband connection to work. Code is like this:
when HTTP_REQUEST {
set apikey [URI::query [HTTP::uri] api-key]
log local0. $apikey
if { $apikey eq "" } {
log local0. "apikey is empty, redirecting to another virtual"
virtual test-internal
} else {
log local0. "We got the apikey and begin HSSR connection"
set status [call /Common/HSSR::http_req -virt "/test-internal-api" \
-uri "http://test.com/[URI::encode $apikey]" \
-tag "custom" -key $apikey -rbody rbody]
if {($status == 200) && ($rbody ne "NOT_FOUND")} {
log local0. "HSSR query successful, redirecting traffic to pool"
pool test-pool
return
}
}
}
The test-internal-api virtual is assigned with access policy that has a simple LDAP query and a iRule that gets the reply for the sideband query.
Now when the user goes to that virtual where the iRule is assigned, ltm logs the following lines:
Nov 5 15:27:59 f5test01 info tmm1[17166]: Rule /Common/APIKEY <HTTP_REQUEST>: 010101-123N
Nov 5 15:27:59 f5test01 info tmm1[17166]: Rule /Common/APIKEY <HTTP_REQUEST>: We got the apikey and begin HSSR connection
Nov 5 15:27:59 f5test01 err tmm1[17166]: 01220001:3: TCL error: /Common/APIKEY <HTTP_REQUEST> - can't read "sts": no such variable while executing "set e "connect to ${dest} '${server}' fails: ${sts} (${conn})"" (iRule proc "/Common/HSSR::http_req") (line 430) invoked from within "call /Common/HSSR::http_req -virt "/test-internal-api" -uri "http://test.com/" -tag "custom" -key $apikey -r..." invoked from within "if { $apikey eq "" } { log local0. "apikey is empty, redirecting to another virtual" virtual test-internal..."
What is that sts and where should it come from? No matter what i do to the call, the error is the same...