Forum Discussion
southern_nordic
Altocumulus
Oct 06, 2023Redirect URIs in datagroup to dedicated node
Hi Could you help identify why I get the following error below when applying this irule. ERROR ===================================== :9: error: ["wrong # of arguments"][class match -value $re...
southern_shredd
Cirrus
Oct 09, 2023The irule now compiles with no errors. However when I generate traffic I see the following error in the logs:
ERR_ARG (line 1) invoked from within "HTTP::cookie insert ${persistence_cookie_name} ${cookie_value}"
I guess it is having trouble when executing the cookie insert as result persistence is not honoured
Paulius
MVP
Oct 09, 2023southern_shredd You might try the following.
when CLIENT_ACCEPTED priority 500 {
set DEFAULT_POOL [LB::server pool]
}
when HTTP_REQUEST priority 500 {
# Get the request URI
set request_uri [HTTP::uri]
# Check if the request URI matches any entry in the data group
if { [class match -- ${request_uri} eq ACL_Intranett-webforms] } {
# Set the persistence cookie name
set persistence_cookie_name "stick_cookie_name"
# Check if the persistence cookie exists
set cookie_value [HTTP::cookie ${persistence_cookie_name}]
if { ${cookie_value} == "" } {
# If the cookie doesn't exist, create and set the cookie
set cookie_value [IP::client_addr]
HTTP::cookie insert name ${persistence_cookie_name} value ${cookie_value} path "/"
}
# Set the persistence based on the cookie
persist uie cookie ${persistence_cookie_name}
pool POOL_ACL_Intranett_Webforms
} else {
pool ${DEFAULT_POOL}
}
}
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