Forum Discussion
LB::select hangs
With the following irule, LB::select hangs sometimes. Sometimes this works, sometimes it doesn't, and I don't know why.
when HTTP_REQUEST {
pool pool1
log local0. " starting"
log local0. " [LB::select]"
log local0. " server: [LB::server]"
}
When this goes wrong, all I see in the logs is " starting" and the HTTP client just waits for a response.
We're running 10.2.0, are there any known issues in the LB::select code? Am I doing this wrong?
I know you have to 'eval' the output of LB::select to make it do anything, but I'm not even to that point yet - the LB::select call hangs so that there's nothing to eval.
- nitassEmployeedo you have any special setting on the virtual server?
- dlg_23340CirrusNothing particularly interesting, no.
- koenning_107182NimbostratusCould you share a sanitised version of the virtual config ? Which exact version are you running ?
- dlg_23340Cirrusltm virtual demo {
- dlg_23340Cirrusoops, the version:
- c_p_i_o_17707Historic F5 AccountDo you have a pool associated with the virtual?
- nitassEmployee
Maybe LB::select on an empty pool hangs.i understand he run pool command in irule before LB::select.
it seems okay to me but i am running 10.2.3.
[root@ve1023:Active] config b version|grep -iA 1 version BIG-IP Version 10.2.3 112.0 Final Edition [root@ve1023:Active] config b virtual bar list virtual bar { snat automap fallback persist source_addr destination 172.28.19.79:80 ip protocol 6 rules myrule persist cookie profiles { http {} tcp {} } } [root@ve1023:Active] config b rule myrule list rule myrule { when HTTP_REQUEST { pool foo log local0. "\[LB::select\]: [LB::select]" } } [root@ve1023:Active] config b pool foo list pool foo { members { 200.200.200.101:80 {} 200.200.200.102:80 {} } } [root@ve1023:Active] config tail -f /var/log/ltm & [1] 30676 [root@ve1023:Active] config curl -I http://172.28.19.79 HTTP/1.1 200 OK Date: Tue, 13 Mar 2012 23:50:49 GMT Server: Apache/2.2.3 (CentOS) Last-Modified: Fri, 11 Nov 2011 14:48:14 GMT ETag: "4183e4-3e-9c564780" Accept-Ranges: bytes Content-Length: 62 Content-Type: text/html; charset=UTF-8 Set-Cookie: BIGipServerfoo=1707657416.20480.0000; path=/ [root@ve1023:Active] config Mar 13 16:50:30 local/tmm info tmm[4797]: Rule myrule : [LB::select]: pool foo member 200.200.200.102 80 [root@ve1023:Active] config curl -I http://172.28.19.79 HTTP/1.1 200 OK Date: Tue, 13 Mar 2012 23:50:51 GMT Server: Apache/2.2.3 (CentOS) Last-Modified: Fri, 11 Nov 2011 14:48:14 GMT ETag: "4183e4-3e-9c564780" Accept-Ranges: bytes Content-Length: 62 Content-Type: text/html; charset=UTF-8 Set-Cookie: BIGipServerfoo=1707657416.20480.0000; path=/ [root@ve1023:Active] config Mar 13 16:50:32 local/tmm info tmm[4797]: Rule myrule : [LB::select]: pool foo member 200.200.200.101 80 [root@ve1023:Active] config curl -I http://172.28.19.79 HTTP/1.1 200 OK Date: Tue, 13 Mar 2012 23:50:53 GMT Server: Apache/2.2.3 (CentOS) Last-Modified: Fri, 11 Nov 2011 14:48:14 GMT ETag: "4183e4-3e-9c564780" Accept-Ranges: bytes Content-Length: 62 Content-Type: text/html; charset=UTF-8 Set-Cookie: BIGipServerfoo=1707657416.20480.0000; path=/ [root@ve1023:Active] config Mar 13 16:50:33 local/tmm info tmm[4797]: Rule myrule : [LB::select]: pool foo member 200.200.200.101 80
- dlg_23340CirrusPosted By nitass on 03/13/2012 04:46 PM
BIGipServercookie set by another LTM. So that's interesting, but probably the topic of another thread.Thanks, everyone.
- satya07hyd_8175Nimbostratus
what was the worked around? I'm getting similar issue, but its has intermittently.
about 75% of the requests hangs.
- dkulinski_23252NimbostratusMy workaround was similar to dig's Instead of using LB::select I got hook after the member is selected ("when LB_SELECTED") and then call LB:detach & LB::reselect
- satya07hyd_8175Nimbostratusbut in my irule i use LB::select to generate a token , which will be further used to persist connection ltm rule myirule { when HTTP_REQUEST { pool my-host-pool if {[HTTP::header exists LB-TOKEN]}{ set sid [HTTP::header value "LB-TOKEN"] log local0. "sid = $sid" if { $sid = "null" }{ log local0. "SID NULL !" set hex_sid "" scan [LB::select] %s%s%s%s%d command current_pool command2 current_member current_port scan [ split $current_member "." ] "%d%d%d%d" ip1 ip2 ip3 ip4 set ip3_hex [format "%02x" $ip3] set ip4_hex [format "%02x" $ip4] set port_hex [format "%04x" $current_port] append hex_sid $ip3_hex $ip4_hex $port_hex log local0. "hex_sid = $hex_sid , modifying header" HTTP::header replace "LB-TOKEN" $hex_sid log local0. "header_sid_value = [HTTP::header value LB-TOKEN] $current_member $current_port" pool $pool_name member $current_member $current_port } else { persist uie $sid } } }
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