Forum Discussion

Gavin_104961's avatar
Gavin_104961
Icon for Nimbostratus rankNimbostratus
May 07, 2009

cannot use pool command in a UDP vs

Hi guys,

 

 

Here is the iRules with UDP VS problem, when the iRules works, i found TCL error msg in log file, and without pool command it works well, who can help me find the reason cause it, thx.

 

 

bye the way, the very similar iRules in TCP VS works ok.

 

 

May 7 15:07:49 tmm tmm[2239]: 01220001:3: TCL error: DNS_Rules - Address in use (line 8) invoked from within "pool dns"

 

May 7 15:07:49 tmm tmm[2239]: 01220002:6: Rule DNS_Rules : dns

 

 

iRules for UDP VS:

 

=============================================

 

when CLIENT_DATA {

 

binary scan [UDP::payload] H* gdata

 

set fdata [substr $gdata 23 1]

 

if { $fdata eq "1" } {

 

pool dnssec

 

log "dnssec"

 

} elseif { $fdata eq "0" } {

 

pool dns

 

log "dns"

 

} else {

 

drop

 

}

 

}

 

 

 

iRules for TCP VS:

 

=============================================

 

when CLIENT_ACCEPTED {

 

TCP::collect

 

}

 

when CLIENT_DATA {

 

binary scan [TCP::payload] H* gdata

 

log "$gdata"

 

set fdata [substr $gdata 27 1]

 

if { $fdata eq "1" } {

 

pool dnssec

 

log "dnssec"

 

} elseif { $fdata eq "0" } {

 

pool dns

 

log "dns"

 

} else {

 

drop

 

}

 

TCP::release

 

}

4 Replies

  • Hi Gavin,

     

     

    Check cmbhatt's handy explanation in this post:

     

     

     

    http://devcentral.f5.com/Default.aspx?tabid=53&forumid=5&tpage=1&view=topic&postid=2195922045

     

     

    The "address in use" usually means a node in a pool has already been selected and you're trying to re-select another without detaching first. The solutions I've seen for that are either add the "LB::detach" command before choosing a new node in a pool or add a OneConnect profile to the virtual server.

     

     

     

     

    Aaron
  • Thanks ur reply, Aaron.

     

    i have trid LB:detach, but i still got the error message.
  • you may enable "datagram lb" option in UDP profile and probably use CLIENT_ACCEPTED instead of CLIENT_DATA

     

    if it still does not work for you, may use "immediate timeout". if you use immediate timeout, you may need another virtual server listening on serverside for returning traffic. (or use nPath)
  • after change EVENT to CLIENT_ACCEPTED iRules works, thx natty76.

     

     

    seems it's very different between UDP and TCP EVENTS.