Forum Discussion

Nathan_Bultman_'s avatar
Nathan_Bultman_
Historic F5 Account
Apr 21, 2010

Codeshare: Network Calc rule loads via GUI, fails parsing via <b load>

The No Webserver Required Network Calculator rule from the CodeShare loads okay on a 10.1 GUI, and doesn't show any problems in the desktop iRule editor; but when parsed via < b load >, results in:

 

 

012e0008:3: The requested command (}) is invalid

 

 

Removing the last trailing } doesn't work in this case as it often does, and results in:

 

 

BIGpipe rule creation error:

 

01070151:3: Rule [irule_network_calculator] error:

 

line 1: [parse error: missing close-brace] [{

 

 

This rule is pretty large an beyond my peabrain's ability to find the problem in it as published. Maybe there is possibly an escaping issue or somesuch..?

 

 

Any suggestions?

 

 

Thanks in advance.

 

 

-nmb

 

 

 

4 Replies

  • Hi Nathan,

     

     

    I expect this is a parsing error as the code wrapped in curly braces should force it be interpreted literally. The fact that the iRule loads initially supports the idea that the code is valid, but the parser is choking on it.

     

     

    With such a long rule, it's a little difficult to spot what syntax might be causing the problem. I'd suggest breaking the iRule into smaller parts and use 'b verify load' to test. You should be able to narrow down the issue to one or more syntax formats. Even if the iRule doesn't function with the smaller pieces, it will help isolate the issue.

     

     

    Aaron
  • Try the attached iRule. In Javascipts's "function initPage()", I replaced double quote(") to single quote (') and removed google ads stuff.

     

     

    From:

     

     

    SetOrder();

     

     

    if ((code == "MSIE" && version >= 4) || (code == "NS" && version > 3))

     

    {

     

    // document.CounterImage.src="http://fastcounter.linkexchange.com/fastcounter?112194+224395";

     

    // document.Google3.src="http://www.google.com/logos/Logo_25wht.gif";

     

    }

     

     

    }

     

    else

     

    {

     

    setTimeout("initPage();", 100);

     

    }

     

    }

     

     

    To:

     

     

    SetOrder();

     

     

    }

     

    else

     

    {

     

    setTimeout('initPage();', 100);

     

    }

     

    }

     

     

    Hope it works ...