For more information regarding the security incident at F5, the actions we are taking to address it, and our ongoing efforts to protect our customers, click here.

Forum Discussion

Christophe_Lem2's avatar
May 30, 2014
Solved

persist add uie -> command is not valid in current event context

Hello,

 

I'm struggling with persistence. I have an application running on two ports (http and rtsp), the client first call the application via its http port where he sends his UID, a persistence entry is created to ensure he will use the same server for the second connection on port rtsp.

 

The first RTSP call contains the UID but all the subsequent calls don't. They only carry a SessionID returned by the server after the first call. So I thought I could add a second persistence record when I receive the response of the server but if I use persist without add keyword, it has no effect and if I try with add keyword, it is rejected with the error :"[command is not valid in current event context (RTSP_RESPONSE)][persist add uie $SessionID $static::persist_timeout]"

 

Here is the code I'm trying:

 

when RTSP_REQUEST {
  set UID [findstr [RTSP::uri] "UID=" 4 "&" ]
  if { $UID != "" }{
    persist uie $UID $static::persist_timeout
  } else {
     no UID, looking for Session Header
    set SessionID [RTSP::header value "Session"]
    if { $SessionID != "" }{
      persist uie $SessionID $static::persist_timeout
    }   
  }
}

when RTSP_RESPONSE {
  set SessionID [RTSP::header value "Session"]
  if { $SessionID != "" }{
    persist add uie $SessionID $static::persist_timeout
  }
}

Any help would be greatly appreciated.

 

Christophe

 

3 Replies

    • Wendell_Huang's avatar
      Wendell_Huang
      Icon for Nimbostratus rankNimbostratus
      If he uses the irule,does him need to create a uie profile ?or just using the irule ?
    • Christophe_Lem2's avatar
      Christophe_Lem2
      Icon for Cirrus rankCirrus
      You may do both. But if you want to allow the match across X features, I think you need the profile.