Forum Discussion
JCMATTOS_41723
Nimbostratus
Jun 04, 2008LB_Failure logging?
We have a LTM 9.4.3 and are trying to utilize this script we found on devcentral. But we keep getting this error message. Any ideas? Thx!
when LB_FAILED {
set poolname [LB::server pool]
set name [LB::server name]
set port [LB::server port]
if { [LB::server name] eq $poolname } {
log local0. "All servers in pool $poolname down."
}
elseif { [LB::status pool $poolname member $name $port] eq "down" } {
log local0. "Member $poolname is down."
}
}
TCL error: LB-Alert LB_FAILED - wrong args: should be LB::status [pool pool name addr port] up | down | session_enabled | session_disabled or [node addr] up | down | session_enabled | session_disabled while executing LB::status pool $poolname member $name $port
8 Replies
- The_Bhattman
Nimbostratus
Hi JC,
Take a look at the following
"set name [LB::server name]"
"[LB::status pool $poolname member $name $port]"
The part where I believe it's failing where you trying to pass variable name into a statement that won't except names.
Try the following:
Replace
set name [LB::server name]
with
set ip [LB::server addr]
Replace
"[LB::status pool $poolname member $name $port]"
with
"[LB::status pool $poolname member $ip $port]"
Hope this helps
CB - JCMATTOS_41723
Nimbostratus
Thx cmbhatt! still no luck same error exists:
when LB_FAILED {
set poolname [LB::server pool]
set ip [LB::server addr]
set port [LB::server port]
if { [LB::server name] eq $poolname } {
log local0. "All servers in pool $poolname down."
}
elseif { [LB::status pool $poolname member $ip $port] eq "down" } {
log local0. "Member $poolname is down."
}
}
Wed Jun 4 16:30:21 PDT 2008 tmm1 tmm1[1948] 01220001 TCL error: LB-Alert LB_FAILED - wrong args: should be LB::status [pool pool name addr port] up | down | session_enabled | session_disabled or [node addr] up | down | session_enabled | session_disabled while executing LB::status pool $poolname member $ip $port
What could be causing this... - The_Bhattman
Nimbostratus
I think I see where the problem is
Try thiswhen LB_FAILED { set poolname [LB::server pool] set ip [LB::server addr] set port [LB::server port] if { [LB::server name] eq $poolname } { log local0. "All servers in pool $poolname down." } elseif { [LB::status pool $poolname member $ip $port] eq "down" } { log local0. "Member $poolname is down." } } - JCMATTOS_41723
Nimbostratus
I pasted it right into the LTM and still same error...Is there maybe another irule which will give me the same result but config differently? We are trying to generate a log that displays the name of the pools and servers that are down or unavailable? Thx!
Thu Jun 5 09:36:27 PDT 2008 tmm tmm[1935] 01220001 TCL error: LB-Alert2 LB_FAILED - wrong args: should be LB::status [pool pool name addr port] up | down | session_enabled | session_disabled or [node addr] up | down | session_enabled | session_disabled while executing LB::status pool $poolname member $ip $port
when LB_FAILED {
set poolname [LB::server pool]
set ip [LB::server addr]
set port [LB::server port]
if { [LB::server name] eq $poolname } {
log local0. "All servers in pool $poolname down."
} elseif { [LB::status pool $poolname member $ip $port] eq "down" } {
log local0. "Member $poolname is down."
}
} - The_Bhattman
Nimbostratus
it's very odd. It should work. Have you tried removing "member" from "LB::status pool $poolname member $ip $port", based on what the TCL error output is suggesting? or try replacing "member" with "node"?
CB - Andy_Herrman_22
Nimbostratus
How are you adding the iRule to the F5? The web interface, or via iRuler?
We had a problem a while ago where an iRule was added via the web interface by someone just copy/pasting into it, and a non-visible character made it into the iRule and caused all sorts of weird problems. Is it possible that something like that is happening? Maybe the code you're seeing is fine, but some non-visible character is getting added? - JCMATTOS_41723
Nimbostratus
I used both the web and irule editor and it produces the same error. I also tried using node instead of member but same error. I'm beginning to think that it's my 9.4.3 code, hopefully someone out there has a an answer or workaround to use...Thx! - The_Bhattman
Nimbostratus
I think you are right. I just tested this for the first time and it works. I don't have any LB on the v9.4 branch so I can't be sure if the entire branch is effected or a just v9.4.3. Nothing in the F5 knowledge base points to a known issue. You could contact F5 support to find out it's in their special knowledge base.
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