Forum Discussion
Table Replace command with CMP - Connections reset
Hi All
Might be better for support, but let me try here first as it tends to be more code orientated
Running an F5 1600 with BIGIP 10.2 HF2, provisioned with LTM
I've got a new bit of code, which is responsible for doing some DNS cache for outbound connections (Mainly so we can ride out any flakeyness with DNS)
Code makes use of tables (CMP Compatible according to the docs) NAME::lookup @Virtual -a $Host to fire off an async DNS request, then sets the node to the address from cache.
When NAME_RESOLVED fires, it should update the cache ready for the next connection, so far so good.
After some validate, we get to this bit of code:
log local0. "Got good DNS result [lindex $response 0]"
table set command seems to delete and then add, use replace instead - this updates correctly it would seem
table replace $Host [lindex $response 0] 3600
log local0. "Updated"
Tested on the F5 virtual appliance (Non CMP) again, so far, so good.
Finally got to implementation tonight. When half the time I get connected to the backend service, half the time the connection just terminates
curl -H "host: portal.something.uk" http://2620:....
curl: (52) Empty reply from server
Log files show
Nov 23 20:32:08 local/tmm info tmm[5142]: Rule Rulename : Got good DNS result 123.123.123.123
curl -H "host: portal.something.uk" http://2620:....
... LB Failed text, as the firewalls not sorted yet
Nov 23 20:31:53 local/tmm1 info tmm1[5143]: Rule Rulename : Got good DNS result 123.123.123.123
Nov 23 20:31:53 local/tmm1 info tmm1[5143]: Rule Rulename : Updated
Basically every time this executes on TMM1, it works fine. Every time it executes on TMM it fails. No other error messages in the logs, just connections reset. (This is part of a HTTP rule, so some normal packet exchange for the F5 to get a request)
20:50:03.818500 IP Removed.39928 > Removed.http: P 1:175(174) ack 1 win 45
20:50:03.818562 IP Removed0.39928 > Removed.http: P 1:175(174) ack 1 win 45
20:50:03.835191 IP Removed.http > Removed.39928: R 1:1(0) ack 175 win 4494
20:50:03.835272 IP Removed.http > Removed.39928: R 1:1(0) ack 175 win 4494
Any thoughts? I've tried a catch block, I've tried using add instead of replace (Add seems to delete and recreate, replace seems to update. Add has a half second window when there doesn't seem to be any entry)
- hoolioCirrostratusHi Steve,
- Steve_Scott_873Historic F5 AccountFull iRule will need some agreement from management and a bit of hacking up before I can post it. Am i right in saying your working for our supplier anyway? I can email it across
- Steve_Scott_873Historic F5 AccountHi Aaron,
- hoolioCirrostratusRegarding the RESOLV::lookup timeouts, I just got some info from PD:
- Steve_Scott_873Historic F5 AccountOoh, hadn't spotted that.
- spark_86682Historic F5 AccountAre you trying to use a table command in NAME_RESOLVED? Yeah, that's going to give you the behavior you describe: it works on one tmm, and fails on the others. This is bug 247742 ("iRule NAME_RESOLVED event does not handle suspension"). Your best bet is to switch to RESOLV::lookup instead, so you don't have to deal with the NAME_RESOLVED event.
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