Forum Discussion
southern_shredd
Oct 09, 2023Cirrus
The 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
- PauliusOct 09, 2023MVP
southern_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} } }