Forum Discussion

pjcampbell_7243's avatar
Feb 19, 2016

Help tracking down multiple redirect errors...

I am looking for assistance tracking down Multiple redirect errors in /var/log/ltm.

 

The problem is that I have many combinations of iRules applied to hundreds of virtual servers. The err logging only lists that it's a multiple redirect, but doesn't help me figure out which virtual is causing it. Is there a way I can figure out what the virtual server was that was in use when this was triggered... or some other way that will give me a clue on where I need to look to resolve this?

 

If I know which Virtual is causing it, I can go look at the other iRules on that virtual and fix it!!!

 

1 Reply

  • Hi Pjcampbell,

    you can't see the Virtual Server name for those unhandled exeptions. But you could implement custom error handles accross the board, to get additional information which

    [virtual]
    and
    [HTTP::host][HTTP::uri]
    was accessed.

    Change every instance of...

    HTTP::redirect "http:://www.site.de/"
    

    ... to ...

    if { [catch { HTTP::redirect "http:://www.site.de/" }]} then { log local0.debug "Multiple Redirect Detected on [virtual] for [HTTP::host][HTTP::uri]" }
    

    ... by using an iRule-Editor export and a Text-Editor of your choice which supports RegEx and Multi-File replacements and then use those Search/Replace patterns...

    Search: HTTP::redirect(.*)\n
    Replace: if { [catch { HTTP::redirect$1 }]} then { log local0.debug "Multiple Redirect Detected on [virtual] for [HTTP::host][HTTP::uri]" }\n
    
    Search: HTTP::respond(.*)\n
    Replace: if { [catch { HTTP::respond$1 }]} then { log local0.debug "Multiple Responses Detected on [virtual] for [HTTP::host][HTTP::uri]" }\n
    

    After replacement you should verify that the iRule are looking still good and then import the iRules back using the iRule-Editor.

    Cheers, Kai