Forum Discussion

Bill_Mandra_987's avatar
Bill_Mandra_987
Icon for Nimbostratus rankNimbostratus
Apr 12, 2010

Can not persist inside of CLIENT_DATA event

I have the following iRule currently defined and although it correctly logs the persist_key value no persistence records are being created. I've also tried: persist add uie @persist_key 86400 but that throws an error that add is not supported within the event. I have to use the raw TCP methods in this iRule because I can't use an HTTP profile in the Virutal Server configuration. Can anyone suggest an alternate or correct way to do this?

 

 

Thanks,

 

Bill

 

 

 

when CLIENT_ACCEPTED {

 

TCP::collect 0 0

 

}

 

 

when CLIENT_DATA {

 

set client_data [string trim [TCP::payload]]

 

set persist_key ""

 

 

if { $client_data contains "GET /" } then {

 

set persist_key [findstr [string tolower $client_data] "@" 1 "@"]

 

 

if { $persist_key != "" } then {

 

log local0. "uuid $persist_key"

 

persist uie $persist_key 86400

 

}

 

}

 

}

 

 

when SERVER_CONNECTED {

 

TCP::release

 

TCP::collect

 

}

 

 

when SERVER_DATA {

 

TCP::release

 

TCP::collect

 

}

 

1 Reply

  • Hi Bill,

     

     

    Can you add debug logging to each major code block, reproduce the issue and then reply with anonymized logs from /var/log/ltm?

     

     

    Thanks, Aaron