Forum Discussion

Deb_Allen_18's avatar
Deb_Allen_18
Historic F5 Account
Sep 07, 2006

Error on HTTP::header insert

I'm wondering if anyone can shed some light on this error:tmm[1045]: 01220001:3: TCL error: Rule frontend_http - Operation not supported (line 1) invoked from within "HTTP::header insert BIG-IP-PROTOCOL http"

rule frontend_http {
   when HTTP_REQUEST {
      foreach header {BIG-IP-PROTOCOL BIG-IP-PORT BIG-IP-SERVER-NAME} {
         set log 0
         while { [HTTP::header exists $header] } {
            HTTP::header remove $header
            set log 1
         }
         if { $log == 1 } {
            log local0. "Client-inserted header removed: $header  ClientIP: [IP::remote_addr]"
         }
         unset log
      }
      HTTP::header insert BIG-IP-PROTOCOL http
   }
}
Customer is running 9.2.3.

Similar issue seen here on 9.1...

http://devcentral.f5.com/Default.aspx?tabid=28&view=topic&forumid=5&postid=3513

Click here

thanks!

/deb

15 Replies

  • Hi Stefan,

     

     

    Sorry, that probably wasn't very clear. Here's how I understand your scenario:

     

     

    you're currently not using 'event disable all'

     

    one iRule drops a connection using 'drop'

     

    you see an error when calling HTTP::header insert after the prior 'drop' command

     

     

    I'm saying that's surprising as I expected TMM to handle any subsequent iRule commands after a drop or reject command is used. It would be interesting to see what F5 Support would say for this.

     

     

    That said, when you're using drop or reject, I think it's safe to call return and then event disable all immediately afterward to prevent any more iRule code from running. You shouldn't see any side effects to this assuming you want to close the connection and stop processing any more iRules.

     

     

    Aaron
  • Ok Aaron.

     

    But I think the problem in our setup would be, that we have Akamai in place, which is doing some kind of "Oneconnect" towards the BIG-IP. If I would close the TCP-connection, all other sessions within that TCP-connection gets also lost.

     

    As you can see in my other thread, this setup also seems to have some strange side effects when updating iRules.

     

    Do you have any experiences or even tips, when having Akamai in the path?

     

     

    Ciao Stefan :)

     

  • So I didn't have your scenario correct. Are you actually dropping or resetting connections in one of your iRules? I thought that's what you mean when you wrote "...and if not matching, TCP-connection will be dropped".

     

     

    I replied to your other post as well.

     

     

    Aaron
  • Hi,

     

     

    We had the same error and this post really helped so thanks everyone.

     

    We had 3 Irules on a VIP and the second iRule has a redirect in it (shown below).

     

    The error was coming from the third iRule. We added "event HTTP_REQUEST disable" into the second iRule (shown below) and it resolved our error.

     

     

    Here is the iRule

     

     

    when HTTP_REQUEST {

     

    if { ( ([matchclass [IP::client_addr] equals $::main_page_bypass ])) } {

     

    pool abc

     

    }

     

    elseif { [HTTP::host] eq "xyz.test.com.au"

     

    } {

     

    HTTP::redirect "http://www.abc.com.au/maintenance"

     

    event HTTP_REQUEST disable

     

    }

     

    }

     

     

    Thanks again

     

     

    Chris
  • It says in the command documentation that the irule doesn't want to run HTTP::header insert after a HTTP::redirect: https://devcentral.f5.com/wiki/iRules.http__header.ashx

    HTTP::header insert

    If this command is executed after issuing the HTTP::redirect or HTTP::respond command, the F5 will become confused, generate an "Operation Not Supported" TCL error and reset the connection.