Forum Discussion
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
Just for completeness, it was not allowed in 11.4 but it is in 11.6
3 Replies
Just for completeness, it was not allowed in 11.4 but it is in 11.6
- Wendell_Huang
Nimbostratus
If he uses the irule,does him need to create a uie profile ?or just using the irule ? - You may do both. But if you want to allow the match across X features, I think you need the profile.
Help guide the future of your DevCentral Community!
What tools do you use to collaborate? (1min - anonymous)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