Forum Discussion
While creating an irule am getting below error , created using f5 irule editor. is there any mismatch in irule event and condition ?
01070151:3: Rule [/Common/LB_rule] error: /Common/LB_rule:4: error: [parse error: extra characters after close-brace][else{ pool /Common/pool2 }]
when LB_SELECTED { if{ [client_addr] equals 10.10.1.31 } { pool /Common/pool1 }else{ pool /Common/pool2 } }
3 Replies
- Kevin_Stewart
Employee
Try adding spaces between braces and words:
when LB_SELECTED { if { [TCP::client_addr] equals 10.10.1.31 } { pool /Common/pool1 } else { pool /Common/pool2 } } - Kevin_Stewart
Employee
Did you by chance copy this iRule from somewhere? Very often word processors (ex. MS Word) add metacharacters that are hidden in the iRule text editor, but cause all types of problems.
- Kevin_Stewart
Employee
Ugh. My example was wrong. 😉
when LB_SELECTED { if { [IP::client_addr] equals 10.10.1.31 } { pool /Common/pool1 } else { pool /Common/pool2 } }
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