Forum Discussion
Mark_Rinfret_64
Jan 31, 2007Nimbostratus
iRule Syntax Error???
I must be in one of those "forest vs. the trees" situations. I've written a bunch of iRules with no problem, but one I'm currently working on is generating an error that has me stumped. (I'm running BIG-IP 9.2.3 Build 34.8.)
This much of it (a small subset) will cause "b verify load" to fail (or bigstart restart to fail, if I force it to load):
rule pvns_update_sdp {
when RULE_INIT {
log local0.debug "Here I am."
Define an array of "DESCRIBE active" flags, indexed by client IP.
array set ::pvnsDescribeActive { }
Clear the array if it was previously defined.
array unset ::pvnsDescribeActive
Define an array of "SDP active" flags, indexed by client IP.
array set ::pvnsSdpActive { }
Clear the array if it was previously defined.
array unset ::pvnsSdpActive
Define an array of Streamer virtual server addresses,
indexed by client IP.
array set ::pvnsStreamerVS { }
array unset ::pvnsStreamerVS
}
This event fires when the client (e.g. pvPlayer) makes a request to the
virtual server. We indicate that we want to collect the incoming TCP data
so we can examine TCP::payload.
when CLIENT_ACCEPTED {
set clientIP [IP::client_addr]
log local0.debug "=========================================="
log local0.debug "$clientIP has been accepted"
Get the address of the virtual server that the client came through.
set ::pvnsStreamerVS($clientIP} [IP::local_addr]
set ::pvnsDescribeActive($clientIP) 0
set ::pvnsSdpActive($clientIP) 0
TCP::collect 20
}
}
The message reported at the console indicates a problem at the penultimate right brace:
[root@sdbigip1:INOPERATIVE] config b verify load
BIGpipe is only validating the commands.
Reading configuration from /config/bigip_base.conf.
Reading configuration from /usr/bin/monitors/builtins/base_monitors.conf.
Reading configuration from /config/profile_base.conf.
Reading configuration from /config/daemon.conf.
BIGpipe: 010a0040:3: Syntax error in /config/bigip.conf line 210:
}
[root@sdbigip1:INOPERATIVE] config
This rule is presently unused (not referenced by any other object) and is an attempt to incrementally rewrite a previous rule which presented problems. When I added the CLIENT_ACCEPTED event, it started causing problems. I know I'm gonna feel stooopid when someone tells me what I've done wrong, but I'm stumped.
Thanks for your help,
Mark
- Mark_Rinfret_64NimbostratusArgh! That is EXACTLY what I spent so much time looking for! I guess it's time to get fitted with those telephoto lenses - or find a font that has "fat braces". :-) Thanks very much.
- Mark_Rinfret_64NimbostratusActually, I work almost exclusively with the iRule editor and can't imagine what it would be like to not have it available. Occasionally, I'll resort to vi-ing the bigip.conf file to make global name changes (renaming an iRule and its references, for instance). However, the iRule editor didn't catch this error. Before I made that assertion, I reintroduced the error and clicked on the Check Syntax button. I got the popup dialog box that claimed "The text is a valid irule.". Previously, I got a successful save status when I saved it, too.
- OK, that's bizarre. If bigpipe load won't lond it, then the editor should error out when syntax checking or saving. I'll take a look and let you know. Thanks for the feedback!
- ask_me_anytime_Nimbostratushi all,
- Nicolas_MenantEmployeeHi,
- ask_me_anytime_Nimbostratushi nmenant,
- ask_me_anytime_Nimbostratusnmenant,
- There is nothing to install for iControl. The iRule Editor uses the iControl Assembly for .Net so there is nothing else to install.
- ask_me_anytime_Nimbostratushi,
- Nicolas_MenantEmployeeyou need to be connected to a BIGIP to be able to check the syntax.
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