Forum Discussion
DaveC_53879
Nimbostratus
May 02, 2012Configsync failing due to rule syntax
I have a new rule that works correctly redirecting traffic from one domain to another domain with an extra dash in the domain name. Pretty straightforward. But when I try to sync the configs to the 2nd LTM, it balks about this rule, specifically the first line which lists the name of the rule. Below is the text from the bigip.conf and the first line is the offending line. Is the name too long? That's the only thing I can see that might be a problem. Or am I missing something simple here.
Error:
BIGpipe parsing error (Line 1943): 012e0021:3: The requested attribute () for 'rule' is invalid.
Rule:
rule veryveryverylongname12.com _redirect { This is line 1943
when HTTP_REQUEST {
switch -glob [string tolower [HTTP::host]] {
"www.site1.com" -
"site1.com" {
HTTP::redirect ] } } }
Thanks
8 Replies
- Nathan_Houck_65
Nimbostratus
Im assuming your using verion 10.x
Do you get the same syntax error error when you do a "b verify load bigip.conf" ? - DaveC_53879
Nimbostratus
Thanks for responding. Actually I'm running 9.4.6, and "b verify load bigip.conf" returns the same error. - Nathan_Houck_65
Nimbostratus
I was able to do a b verify load on a10.2.3 box with the short rule name and syntax below. It may be worth it, to blow away the Irule and put it back in in order to rule out syntax.
[root@bigipbox1:Active] config b rule test_rule list
rule test_rule {
when HTTP_REQUEST {
switch -glob [string tolower [HTTP::host]] {
"www.site1.com" -
"site1.com" {
HTTP::redirect http://www.site-1.com[HTTP::uri] } } }
} - DaveC_53879
Nimbostratus
Nathan, I did as you suggested but it made no difference. I then deleted/recreated the rule with a much shorter name, which didn't help either. Any other ideas? - Nathan_Houck_65
Nimbostratus
You could try to open a case with F5 support to further troubleshoot this issue but they may or may/not help because this is for an Irule. Opening a case might help if you are running into a software bug. Personally, I would take the rule of the conf file completly using VI. Then do "b verify load" If it looks good, Configsync, then trying putting the Irule back in using the GUI.
*****
when HTTP_REQUEST { switch -glob [string tolower [HTTP::host]] { "www.site1.com" - "site1.com" { HTTP::redirect http://www.site-1.com[HTTP::uri] } } }
*****
Are you adding the Irule via the GUI, Bigpipe, or editing the bigip.conf file directly? - hoolio
Cirrostratus
Hi Dave,
Can you try wrapping the redirect URL in double quotes? If that doesn't fix the verify/load error, can you try a short name just to test?
Aaron - Joel_Moses
Nimbostratus
9.4.6 had some oddities about placement of curly-braces in iRules. Try this:when HTTP_REQUEST { switch -glob [string tolower [HTTP::host]] { "www.site1.com" - "site1.com" { HTTP::redirect "http://www.site-1.com[HTTP::uri]" } } }
I've seen instances where the 9.x parser seemed to think consecutive curly-braces on the same line marked the end of the iRule in the config erroneously. It's been fixed in 10.x and above. - DaveC_53879
Nimbostratus
The double quotes fixed the issue. Thanks to all of you for your responses and suggestions. Any day you learn something new is a good day. Dave
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
