stupid48
Jul 02, 2020Altocumulus
Getting "Can't call after responding" in LTM logs for iRule
Hi there,
It seems that after we upgraded our LTM, part of an iRule stopped working and the error in ltm logs doesn't explain why. I've got an iRule that will redirect an http request if the URI is either "" or "/". It also is supposed to send the request to a certain pool based on hostname. This was working. Now if only does the pool part and ignores the redirect. The ltm log generates this error each time:
Jul 1 17:22:46 bigip10 err tmm[12168]: 01220001:3: TCL error: /Common/CCB_iRule <HTTP_REQUEST> - Can't call after responding - ERR_NOT_SUPPORTED (line 😎 invoked from within "HTTP::host"
The iRule is as follows:
when HTTP_REQUEST {
switch -glob [string tolower [HTTP::uri]] {
"" -
"/" {
HTTP::redirect /ouaf
}
}
switch [string tolower [HTTP::host]] {
ccbtest.domain.com {
pool ccbqa_pool
}
ccbprod.domain.com {
pool ccbprd_pool
}
default {
log local0. "Unknown site: [HTTP::host]"
}
}
}
Can someone give me some insight as to what I'm doing wrong?
Thanks much for your time...