Forum Discussion
Mark_Rinfret_64
Nimbostratus
Jan 31, 2007iRule 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
13 Replies
- Mark_Rinfret_64
Nimbostratus
Argh! 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 - Mark_Rinfret_64
Nimbostratus
Actually, 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.
Mark - 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!
-Joe - ask_me_anytime_
Nimbostratus
hi all,
do you where I can downlaod the latest iRule Editor for BIGIP V9.1.2 ???
thanks
Sakolan. - Nicolas_Menant
Employee
Hi,
You should have just one place for it:
http://devcentral.f5.com/Default.aspx?tabid=66
Colin gave me an advice if the iRule editor is not working as it should (which is my case :'():
Remove the iRule editor and the .Net framework you have
reinstall the iRule editor, it should go download for you the .Net framework it is done to work with - ask_me_anytime_
Nimbostratus
hi nmenant,
Thank you for ur prompt reply.
I have downloaded the iRule Editor from http://devcentral.f5.com/Default.aspx?tabid=66.
I have installed it and everything works fine.
Thank you.
sakolan. - ask_me_anytime_
Nimbostratus
nmenant,
I have installed the iRule Editor now.
so how do I load my iRules in the Editor ?
what's next ?
I heard i need to install iControl. do I install Icontrol on my local PC or on the BIG-IP system ?
please advise.
Sakolan - There is nothing to install for iControl. The iRule Editor uses the iControl Assembly for .Net so there is nothing else to install.
The iRule Editor works in conjunction with your BIG-IP. Once you connect (File.Connect or the Connect button), the editor will request and remotely display your iRules in the list view. Selecting one will bring the contents to the code window.
-Joe - ask_me_anytime_
Nimbostratus
hi,
thanks for ur quick reply.
yes,you were right, I am able to connect to my BIG-IP system and see the existing irules.
the problem is that my BIG-IP system is a on production environnement.
Is there any way to check the iRules syntax externally before exporting to the live BIG-IP systems ?
i mean if I write an irule in the editor, will the changes be applied automatically on my live Big-ip systems ?
Thank you.
Sakolan - Nicolas_Menant
Employee
you need to be connected to a BIGIP to be able to check the syntax.
Everything you do through the iRule editor is reported on the BIGIP you're connected to when you save the iRule
So when you manipulate an iRule it may be best i it's not used in production ^^
Or create a copy, work on the copy which is not assigned to a VS and check all your modification are fine and then do it on the real iRule
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