Forum Discussion

jkrumenacher_13's avatar
jkrumenacher_13
Icon for Nimbostratus rankNimbostratus
May 06, 2014

TCL error for a modified _sys_APM_activesync

I am receiving 2 TCL errors from 1 iRule. The original iRule is the _sys_APM_activesync iRule. I made the change to accomodate the migration from Exchange 2007 to 2010(and the activesync* fix for iphones and 2010). In APM I check for an AD perameter and set the exchangeversion. If it is 2007 I want to just pass the flow off to the existing deployment logic, and 2010 to follow the new deployment.

Both environments function, in our this proof of concept deployment, so I am assuming after we migrate I can change this iRule back to the _sys... version and it will be fine but during the cutover I will see my logs fill with these errors.

1) - TCL error: /Common/Modified_fix1219_as - Operation not supported. Multiple redirect/respond invocations not allowed (line 1) invoked from within "ACCESS::respond 503 content $static::actsync_503_http_body Connection close" ("default" arm line 2) invoked from within "switch $policy_result { "allow" { } "deny" { ACCESS::respond 401 content $static::actsync_401_http_body Connection..."

2) - TCL error: /Common/Modified_fix1219_as - Operation not supported. Multiple redirect/respond invocations not allowed (line 6) invoked from within "ACCESS::respond 503 content $static::actsync_503_http_body Connection close" ("default" arm line 2) invoked from within "switch $policy_result { "allow" { } "deny" { ACCESS::respond 401 content $static::actsync_401_http_body Connection..."

The change to the iRule Modified_fix1219_as that caused these errors are: (added after --- when HTTP_REQUEST { set http_path [string tolower [HTTP::path]] set f_clientless_mode 0---)

set exchangeversion [ACCESS::session data get "session.user.exchange"] if { $exchangeversion == "2007" } { pool Active_sync_2007 } if { $http_path == "/microsoft-server-activesync*" and $exchangeversion == "2010" } { } elseif { $http_path == "/microsoft-server-activesync" and $exchangeversion == "2007" } {

! pool Active_sync_2007

    }

Thanks, jkrum

7 Replies

  • It doesn't look like the code you added should be causing a TCL error unless there's a formatting issue, such as a misplaced or missing { or }

     

    You could throw it in F5's iRule editor to verify the formatting fairly easily.

     

    https://devcentral.f5.com/d/irule-editor-msi

     

  • Cory, I did look at it in both the iRule Editor and Notepad++ prior to posting, could I be missing something else, some other conflict with another iRule?

     

    Thanks,

     

    jkrum

     

  • It could definitely be conflicting with another iRule if you have multiple rules applied to this virtual server. Try removing all but this one and see if you still receive the error.

     

    • Cory_50405's avatar
      Cory_50405
      Icon for Noctilucent rankNoctilucent
      To elaborate, a conflict in this case being another iRule performing a respond or redirect that's matching as well as your iRule mentioned above. You can't do multiple responds or redirects, or a respond and redirect, on the same session.
  • Thanks Cory, I was guessing that, so to help narrow it down, 1st I pulled the iRules out 1 at a time starting with the least suspect (replacing them after a 5 - 10 min. with no log messages). When I pulled the one I suspected _sys_APM_ExchangeSupport_OA_BasicAuth, all seemed to work (I didn't get active sync authentication errors, or log errors) so I left it for a while longer until we noticed our phones were not receiving new mail. My next guess is that the problem lies here in the when HTTP_REQUEST . . when HTTP_REQUEST { set http_path [ string tolower [HTTP::path] ] set f_clientless_mode 0 set f_alt_inactivity_timeout 0 set f_rpc_over_http 0 set f_exchange_web_service 0 set f_auto_discover 0 set f_activesync 0 set f_offline_address_book 0 set f_availability_service 0

          Here put appropriate pool when necessary.
        switch -glob $http_path {
        "/rpc/rpcproxy.dll*" {
             Supports for RPC over HTTP. (Outlook Anywhere)
            set f_rpc_over_http 1
        }
        "/autodiscover/autodiscover.xml" {
             Supports for Auto Discover protocol.
            set f_auto_discover 1
             This request does not require long inactivity timeout.
             Don't use this for now
            set f_alt_inactivity_timeout 0
        }
        "/microsoft-server-activesync*" {
             Supports for ActiveSync
            set f_activesync 1
        }
        "/oab/*" {
             Supports for Offline Address Book
            set f_offline_address_book 1
             Don't use this for now
            set f_alt_inactivity_timeout 0
        }
        "/ews/*" {
             Support for Exchange Web Service
             Outlook's Availability Service borrows this protocol.
            set f_exchange_web_service 1
        }
        "/as/*" {
             Support for Availability Service.
             do nothing for now. (Untested)
            set f_availability_service 1
        }
        default {
            return
        }
        }
    
        Merging these might be a little out of my league. I have ideas to just have the set f_activesync 1 moved under the other iRule. I thought I would see what you, or others thought. It would seem like this would be a problem for many Exchange active sync users.
        Thanks,
        jkrum
    
  • The above code snippet you posted is modifying variables but there's no redirection/response contained within. Are you still seeing the same TCL errors from your original post?

     

  • Yes I am. The line number referenced in the err (line 6) in notepad++ is when HTTP_REQUEST. I see the error in my thinking with no redirs/response. I was focused on the /microsoft-server-activesync* match. There is a conflict between those 2 iRules. I will keep digging. Thanks for the very prompt reply. jkrum