Topic
  • 5 replies
  • Latest Post - ‏2013-01-29T16:09:20Z by swlinn
SystemAdmin
SystemAdmin
6772 Posts

Pinned topic Continue processing with Error

‏2013-01-28T14:50:00Z |
When I get an error "failed to establish a backside connection" I want to continue processing the rule, however, my error rule keeps on getting invoked. I've tried adding an on error action and setting it to continue, however, regardless of any configuration I have tried, the error rule always gets invoked.

I've also tried creating a new error rule and the on error action pointing to this rule, however, the new error rule does not get invoked.

Any ideas on how to continue processing?
Updated on 2013-01-29T16:09:20Z at 2013-01-29T16:09:20Z by swlinn
  • swlinn
    swlinn
    1348 Posts

    Re: Continue processing with Error

    ‏2013-01-28T15:20:35Z  
    Request (and response for that matter) processing happen in three parts. For the request, first you have connection and the receiving of the message handled by your front side handler. Next, multi-step will execute your processing rule. Finally, backside connection processing and sending the message. The response is similar in receiving the response, multi-step, and sending the response to the client. Once multi-step has ended in your request processing and you have a failure in getting a connection to the backside url, it is too late for you to do anything withing multi-step to keep from going to your error rule. If you really want to make sure your backside request succeeds and then take some conditional action, you can use a result action with a destination url, and if the action succeeds, you can specify the a loop back firewall address that will send the backend response to your response rule. What type of error recovery are you wanting to do? You can also do a result action with a destination url that has a list of urls where and specify first available, so if you have a failover destination that would be handled too.

    Regards
    Steve
  • SystemAdmin
    SystemAdmin
    6772 Posts

    Re: Continue processing with Error

    ‏2013-01-28T15:35:13Z  
    • swlinn
    • ‏2013-01-28T15:20:35Z
    Request (and response for that matter) processing happen in three parts. For the request, first you have connection and the receiving of the message handled by your front side handler. Next, multi-step will execute your processing rule. Finally, backside connection processing and sending the message. The response is similar in receiving the response, multi-step, and sending the response to the client. Once multi-step has ended in your request processing and you have a failure in getting a connection to the backside url, it is too late for you to do anything withing multi-step to keep from going to your error rule. If you really want to make sure your backside request succeeds and then take some conditional action, you can use a result action with a destination url, and if the action succeeds, you can specify the a loop back firewall address that will send the backend response to your response rule. What type of error recovery are you wanting to do? You can also do a result action with a destination url that has a list of urls where and specify first available, so if you have a failover destination that would be handled too.

    Regards
    Steve
    Ah, makes perfect sense. I'll just set my error rule to route the error to the desired endpoint.

    Thanks for the explanation.
  • swlinn
    swlinn
    1348 Posts

    Re: Continue processing with Error

    ‏2013-01-28T17:57:07Z  
    Ah, makes perfect sense. I'll just set my error rule to route the error to the desired endpoint.

    Thanks for the explanation.
    Although that is a valid approach, the concern I have is that this will create two separate flows depending upon the availability of your primary backend server. If it is up, your response will flow through your response rule, but if not, you'll never get to your response rule. In these situations, I've taken the result action with a destination url that specified multiple urls and a first available method. If successful, the OUTPUT context will have the result of the backend that accepted the request. If it failed, then the error rule will handle error processing assuming neither backend was used. The service backend is then a loopback firewall that will send the backend response to the response rule in any case.

    Regards,
    Steve
  • sunilsure
    sunilsure
    18 Posts

    Re: Continue processing with Error

    ‏2013-01-28T18:22:04Z  
    Can you use Process Backend Errors option to off in Advanced tab of MPG.
    Thanks,
    Sunil Kumar Sure.
  • swlinn
    swlinn
    1348 Posts

    Re: Continue processing with Error

    ‏2013-01-29T16:09:20Z  
    • sunilsure
    • ‏2013-01-28T18:22:04Z
    Can you use Process Backend Errors option to off in Advanced tab of MPG.
    Thanks,
    Sunil Kumar Sure.
    Hi Sunil.
    Process backend errors to off will not only have connection errors drive the error rule, but also any non HTTP 200 errors from the backend such as a 4xx or 5xx. Enabling processing backend errors will allow the latter to be processed by your response rule.

    Regards,
    Steve