Forum Discussion
Query connection status when node fails
I am new to iRules. I am writting an iRule to track and limit connections to nodes. The connections are UDP. I am logging information about the connections in the SERVER_CLOSED event.
When the node fails and SERVER_CLOSED is called, My references to IP::client_addr and UDP::client_port cause a TCL error listed below:
TCL error: /Common/sgng-count-policing-v2.0 - no clientside connection established (line 8) invoked from within "IP::client_addr"
The runtime error is causing my tracking counts to get out of sync with reality.
Is there a way for me to determine that the connection is not valid so that I can avoid my references to IP::client_addr and UDP::client_port so that I do not get a runtime TCL error?
Thanks,
Jimmy
3 Replies
- Jimmy_Orkin_437
Nimbostratus
I figured a way out my problem. I now understand the lifetime of the variables and that they live between events. I will store the data I need from the SERVER_CONNECTED event.
I still would like to know what commands can be called in the SERVER_CLOSED event when the session goes down abnormally.
Thanks,
Jimmy
- What_Lies_Bene1
Cirrostratus
I don't think there is a way of detecting when a session is closed normally or otherwise unfortunately. I'd love to be corrected if anyone knows better? - Colin_Walker_12Historic F5 AccountWe have no solid way of knowing whether or not a connection was closed "properly", for the most part. All we see is a session termination, usually, and that triggers our closed event(s) to fire. Unless you are doing some very specific analysis and interrogation of the session in flight, you probably won't be able to tell what is a "proper" close vs. an error.
Colin
Help guide the future of your DevCentral Community!
What tools do you use to collaborate? (1min - anonymous)Recent Discussions
Related Content
* 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