Forum Discussion
Angel_Martinez_
Nimbostratus
Nov 03, 2008Command returned bad code: 12 while executing
Hi
we're "playing" with this iRule:
when SERVER_CONNECTED {
listen {
proto 17
timeout 60
bind [LINK::vlan_id] [IP::loca...
If you want to get more info on runtime TCL errors, you can use catch (Click here) to handle the error gracefully and log details on the problem:
catch {log local0. "\[LINK::vlan_id\]: [LINK::vlan_id], \[IP::local_addr\]: [IP::local_addr], \[peer \{UDP::client_port\}\]: [peer {UDP::client_port}], \[peer \{IP::client_addr\}\]: [peer {IP::client_addr}], \[peer \{UDP::client_port\}\]: [peer {UDP::client_port}], \[IP::server_addr\]: [IP::server_addr]"}
if {[catch {
listen {
proto 17
timeout 60
bind [LINK::vlan_id] [IP::local_addr] [peer {UDP::client_port}]
server [peer {IP::client_addr}] [peer {UDP::client_port}]
allow [IP::server_addr]
}
} result]}{
log local0. "Error: $result"
} else {
log local0. "Success: $result"
}
You might need to adjust the line breaks or escape them in the second catch statement, but hopefully you get the general idea.
Aaron
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