Leo_Rodrigues_1
Jun 22, 2015Altocumulus
Sporadic TCL errors from iRule showing up in logs
Hello!
I noticed a few errors are showing up on /var/log/ltm. To be able to further debug it, I added a log statement to the script. It then became evident that the log message comes up only ~10% of the time, and on different line numbers. Also, on show rule command, the errors count are zero!
Can anyone help me clear this one? I was thinking perhaps a bug is causing this... (it is running v11.4.1)
Script:
ltm rule add_clientIP_header_2 {
when HTTP_REQUEST {
if { [HTTP::header exists "ClientIPAddress"] } {
log local0. "header ClientIPAddress already present"
} else {
Insert client ip HTTP Header
set clientip [ scan [IP::client_addr] {%[^\%]\%%} ]
log local0. "request from $clientip"
HTTP::header insert ClientIPAddress $clientip
log local0. "header inserted $clientip"
unset clientip
}
}
}
Log sample:
Jun 22 17:14:01 my_bigip info tmm3[9237]: Rule /Common/my_rule : request from xx.xx.xx.xx
Jun 22 17:14:01 my_bigip info tmm[9237]: Rule /Common/my_rule : request from xx.xx.xx.xx
**Jun 22 17:14:01 my_bigip err tmm[9237]: 01220001:3: TCL error: /Common/my_rule - Operation not supported (line 7) invoked from within "HTTP::header insert ClientIPAddress $clientip"**
Jun 22 17:14:01 my_bigip info tmm1[9237]: Rule /Common/my_rule : request from xx.xx.xx.xx
Jun 22 17:14:01 my_bigip info tmm1[9237]: Rule /Common/my_rule : request from xx.xx.xx.xx
Jun 22 17:14:27 my_bigip info tmm1[9237]: Rule /Common/my_rule : request from xx.xx.xx.xx
Jun 22 17:14:27 my_bigip info tmm1[9237]: Rule /Common/my_rule : request from xx.xx.xx.xx
Jun 22 17:14:27 my_bigip info tmm[9237]: Rule /Common/my_rule : request from xx.xx.xx.xx
Jun 22 17:14:27 my_bigip info tmm1[9237]: Rule /Common/my_rule : request from xx.xx.xx.xx
Jun 22 17:14:27 my_bigip info tmm[9237]: Rule /Common/my_rule : request from xx.xx.xx.xx
Jun 22 17:14:27 my_bigip info tmm1[9237]: Rule /Common/my_rule : request from xx.xx.xx.xx
Jun 22 17:14:28 my_bigip info tmm1[9237]: Rule /Common/my_rule : request from xx.xx.xx.xx
Jun 22 17:14:28 my_bigip info tmm1[9237]: Rule /Common/my_rule : request from xx.xx.xx.xx
Jun 22 17:14:28 my_bigip info tmm1[9237]: Rule /Common/my_rule : request from xx.xx.xx.xx
Jun 22 17:14:29 my_bigip info tmm[9237]: Rule /Common/my_rule : request from xx.xx.xx.xx
Jun 22 17:14:29 my_bigip info tmm1[9237]: Rule /Common/my_rule : request from xx.xx.xx.xx
Jun 22 17:14:29 my_bigip info tmm[9237]: Rule /Common/my_rule : request from xx.xx.xx.xx
Jun 22 17:14:29 my_bigip info tmm1[9237]: Rule /Common/my_rule : request from xx.xx.xx.xx
Jun 22 17:14:29 my_bigip info tmm[9237]: Rule /Common/my_rule : request from xx.xx.xx.xx
Jun 22 17:14:29 my_bigip info tmm2[9237]: Rule /Common/my_rule : request from xx.xx.xx.xx
Jun 22 17:14:29 my_bigip info tmm2[9237]: Rule /Common/my_rule : request from xx.xx.xx.xx
Jun 22 17:14:29 my_bigip info tmm2[9237]: Rule /Common/my_rule : request from xx.xx.xx.xx
Jun 22 17:14:30 my_bigip info tmm2[9237]: Rule /Common/my_rule : request from xx.xx.xx.xx
Jun 22 17:14:30 my_bigip info tmm[9237]: Rule /Common/my_rule : request from xx.xx.xx.xx
Jun 22 17:14:30 my_bigip info tmm[9237]: Rule /Common/my_rule : request from xx.xx.xx.xx
Jun 22 17:14:32 my_bigip info tmm1[9237]: Rule /Common/my_rule : request from xx.xx.xx.xx
Jun 22 17:14:33 my_bigip info tmm1[9237]: Rule /Common/my_rule : request from xx.xx.xx.xx
Jun 22 17:14:33 my_bigip info tmm[9237]: Rule /Common/my_rule : request from xx.xx.xx.xx
Jun 22 17:14:33 my_bigip info tmm1[9237]: Rule /Common/my_rule : request from xx.xx.xx.xx
Jun 22 17:14:33 my_bigip info tmm[9237]: Rule /Common/my_rule : request from xx.xx.xx.xx
Jun 22 17:14:33 my_bigip info tmm2[9237]: Rule /Common/my_rule : request from xx.xx.xx.xx
Jun 22 17:14:33 my_bigip info tmm[9237]: Rule /Common/my_rule : request from xx.xx.xx.xx
Jun 22 17:14:34 my_bigip info tmm[9237]: Rule /Common/my_rule : request from xx.xx.xx.xx
Jun 22 17:14:34 my_bigip info tmm2[9237]: Rule /Common/my_rule : request from xx.xx.xx.xx
Jun 22 17:14:34 my_bigip info tmm1[9237]: Rule /Common/my_rule : request from xx.xx.xx.xx
Jun 22 17:14:34 my_bigip info tmm[9237]: Rule /Common/my_rule : request from xx.xx.xx.xx
Jun 22 17:14:34 my_bigip info tmm1[9237]: Rule /Common/my_rule : request from xx.xx.xx.xx
Jun 22 17:14:34 my_bigip info tmm2[9237]: Rule /Common/my_rule : request from xx.xx.xx.xx
Jun 22 17:14:34 my_bigip info tmm2[9237]: Rule /Common/my_rule : request from xx.xx.xx.xx
Jun 22 17:14:34 my_bigip info tmm1[9237]: Rule /Common/my_rule : request from xx.xx.xx.xx
Jun 22 17:14:35 my_bigip info tmm[9237]: Rule /Common/my_rule : request from xx.xx.xx.xx
Jun 22 17:14:39 my_bigip info tmm3[9237]: Rule /Common/my_rule : request from xx.xx.xx.xx
Jun 22 17:14:39 my_bigip info tmm3[9237]: Rule /Common/my_rule : request from xx.xx.xx.xx
Jun 22 17:14:39 my_bigip info tmm1[9237]: Rule /Common/my_rule : request from xx.xx.xx.xx
**Jun 22 17:14:39 my_bigip err tmm1[9237]: 01220001:3: TCL error: /Common/my_rule - Operation not supported (line 1) invoked from within "HTTP::header insert ClientIPAddress $clientip"**
Jun 22 17:14:39 my_bigip info tmm3[9237]: Rule /Common/my_rule : request from xx.xx.xx.xx
Jun 22 17:14:39 my_bigip info tmm3[9237]: Rule /Common/my_rule : request from xx.xx.xx.xx
Jun 22 17:14:39 my_bigip info tmm[9237]: Rule /Common/my_rule : request from xx.xx.xx.xx
**Jun 22 17:14:39 my_bigip err tmm[9237]: 01220001:3: TCL error: /Common/my_rule - Operation not supported (line 7) invoked from within "HTTP::header insert ClientIPAddress $clientip"**