Forum Discussion
bsdpruegelknabe
Nimbostratus
May 31, 2010Naging "command is not valid" by persist
Hello,
I try to create an iRule who set a persistence due to an GET-Request-String named "id=XXXXXXXX".
Here is the rule:
---
when HTTP_REQUEST {
set sess [findstr [string tolower [HTTP::uri]] "id=" 8 ";"]
if { $sess != "" } {
persist add uie $sess
pool http
} else {
pool http member 192.168.10.10:80
}
}
---
A rule with nearly the same works. But this one keeps barfing with the following error:
line 5: [command is not valid in current event context (HTTP_REQUEST)] [persist add uie $sess
What did I wrong on this one?
(OS: 9.4.7)
TIA,
bsdpruegelknabe
3 Replies
- The_Bhattman
Nimbostratus
Hi
Have you tried "persist use $sess" instead.
I hope this helps
Bhattman - bsdpruegelknabe
Nimbostratus
Hello,
With persist uie "$sess" it works. (At least I don't get an error message.) Thanks for the hint.
So I don't need to add an persistence entry?
As result I need that all requests with eg. "id=1234" goes to Member1 and with "id=2345" goes to Member2 and so on... where the numbers are an alphanumeric String.
cu,
bsdpruegelknabe - The_Bhattman
Nimbostratus
Hi,
The only time you need "add" entry is when load balancing server is known. In this case you were using before that happened which caused the issue.
Bhattman
Help guide the future of your DevCentral Community!
What tools do you use to collaborate? (1min - anonymous)Recent Discussions
Related Content
DevCentral Quicklinks
* 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
Discover DevCentral Connects