Forum Discussion

Srijana_137175's avatar
Srijana_137175
Icon for Nimbostratus rankNimbostratus
Oct 27, 2014

TCL Error

Why we getting below TCL error please.

 

TCL error: iR_Nemo_DC_Failover_Pcworld - Operation not supported. Multiple redirect/respond invocations not allowed (line 4) invoked from within "HTTP::respond 503 content [b64decode [class element -name 0 DG_MAINTENANCE_PCW_DEFAULT_080414_HTML]] "Content-Type" "text/html""

 

Below IRULE for Maintenance Page:

when HTTP_REQUEST { if {([class match [IP::remote_addr] equals NEMO_whitelist]) } { pool Pool_RP_Prod_dsg } else { HTTP::respond 503 content [b64decode [class element -name 0 DG_MAINTENANCE_PCW_DEFAULT_080414_HTML]] "Content-Type" "text/html" } }

 

2 Replies

  • kunjan's avatar
    kunjan
    Icon for Nimbostratus rankNimbostratus

    This should be 2nd HTTP:respond you hit in the code during execution. May want to check you hit a HTTP::respond code before this.

     

    As itself this code should work.

     

  • Seems like as per your iRule codes, two redirect or respond statements for a single connection are matching. Use the

    event disable
    command after first-match redirect (or respond) statement to get rid of this TCL error.

    iRule 1
    
    when HTTP_REQUEST {
    HTTP::redirect blabla
    event disable
    
    iRule 2
    
    when HTTP_REQUEST {
    This respond won't be processed as event disable was used. First HTTP::redirect statement will work
    HTTP::respond 503 blabla