Forum Discussion

Willy's avatar
Willy
Icon for Nimbostratus rankNimbostratus
Feb 09, 2016

TCL error :Prerequisite operation not in progress (line ...

I have an iRule that looks like this :

 

when HTTP_REQUEST { if {[HTTP::path] eq "/"} { HTTP::uri "/newpath" pool website-pool} }

 

It seems to do his job, but sometimes the next error appears in the Local Traffic Logs:

 

TCL error: /Partition/iRule-name - Prerequisite operation not in progress (line 1) invoked from within "HTTP::path"

 

TCL error: _plugin_rule_/Common/pluginasm - Prerequisite operation not in progress (line 1) invoked from within "HTTP::class asm"

 

Tried searching for TCL errors but found nothing that could help me. Can someone tell me what I am doing wrong ? I know, it is only to keep the logs clean, but I want to understand what I am doing wrong.

 

  • As far as i know, it should be enough to disable asm. Since 11.4.0, websocket should work with enabled http profile.

     

  • Willy's avatar
    Willy
    Icon for Nimbostratus rankNimbostratus

    It did not do the trick, however after some extra testing I was able to avoid the TCL error. The solution was to disable HTTP:class before disabling HTTP. The order seems real critical. The rule looks now like below.

    when HTTP_REQUEST {
        if {[HTTP::uri] starts_with "/partinsert"} {
             if { [string tolower [HTTP::header Upgrade]] contains "websocket" }{
               log local0. "websocket detected"
                HTTP::class disable
                HTTP::disable  
                }  
            }
        else {
            HTTP::uri "/partinsert[HTTP::uri]"
            }   
        }
    

    Thank you all for helping me to get to this solution. Should you have remarks on the last solution, let me know.

  • Looks like you may have ASM enabled on the VS, which would require HTTP profile. You could try disabling ASM as per below;

    when HTTP_REQUEST {
    
      if {([HTTP::uri] starts_with "/partinsert") and ([string tolower [HTTP::header Upgrade]] contains "websocket")}{
        log local0. "websocket detected"
        HTTP::disable 
        ASM::disable  
      }  else {
        HTTP::uri "/partinsert[HTTP::uri]"
      }   
    }
    
  • Willy's avatar
    Willy
    Icon for Nimbostratus rankNimbostratus

    Thank you for the suggestion about the combination of the iRules. At this moment the next iRule is in place :

    when HTTP_REQUEST {
    
            if {[HTTP::uri] starts_with "/partinsert"} {
             if { [string tolower [HTTP::header Upgrade]] contains "websocket" }{
                log local0. "websocket detected"
                HTTP::disable  
                }  
            }
        else {
            HTTP::uri "/partinsert[HTTP::uri]"
            }   
        }
    

    The goal is to insert a text like partinsert into the url if it is not there, because of tha mentioned solution 14814 HTTP has to be disabled if websocket is detected. However this solution keeps on giving me the TCL error if a webconnect header is detected. I would like to solve the error message. This error is displayed :

    err tmm4[9434]: 01220001:3: TCL error: _plugin_rule_/Common/pluginasm  - Prerequisite peration not in progress (line 1)     invoked from within "HTTP::class asm"
    

    Any suggestions ?

  • I agree. I do not think the rule will work if HTTP is disabled. Combine the rules and set it up to only continue if the first part is not true (if/elseif) or perhaps add "return" after disabling HTTP to stop processing the event.

     

  • Willy's avatar
    Willy
    Icon for Nimbostratus rankNimbostratus
    Yes , there is. In the mean time I made some progress, but still confronted with the error. Since there were issues with the websocket sessions an iRule was created based on the SOL 14814. It now appears that if the HTTP is disabled , a websocket request, the error appears. My idea is now to try to combine both rules in one rule, avoiding the second rule to run when HTTP is disabled. Should you have any suggestions, they are more than welcome.