Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

ARR The request cannot be routed because it has reached the Max-Forwards limit. The server may be self-referencing itself in request routing topology

Tags:

arr

I have two Windows 2008 R2 Standard Server on which IIS 7.5 is installed (Server1 and Server2). On Server1 I have installed Web Farm Framework 2.2 and created a server Farm "myFarm.com". I have also installed ARR on the Server1.

In the server farm, I have added Server2 and Server1 as the secondary servers. I have configured the ARR with default option. Load balancing is configured to "Round Robin so that request can go to both of the server randomly.

To test my setup I have created a Test.ASPX page and deployed it in both servers. This is a simple page which returns serverName on which server page is executed. This way I would know that load balancing is working or not.

Then I opened Internet Exlorer and tried to browse my Test.ASPX page from server1 which hosts Web Farm and ARR. Everytime I hit the page request goes to Server2 only. I made my server2 has unhealthy in the webfarm to check if Server1 handle the request or not. When I tried to hit the Test.aspx in the browser, I was surprised to add following error:

The request cannot be routed because it has reached the Max-Forwards limit. The server may be self-referencing itself in request routing topology.

From the error message it appears that when my server2 is not available ARR is sending the request to Server1 which is again sending it to itself causing loopback. I couldn't find a way to stop this loopback.

One of the solution which I found after searching is that I should not add Server1 to the web farm as it is hosting ARR, but I have only two servers and I don't want to use one server just for ARR.

As soon as I mark my server2 healthy request starts getting executed by server2.

Could someone suggest what should be configured to resolve this error?

Thanks

like image 554
user423574 Avatar asked Mar 22 '13 05:03

user423574


2 Answers

You can do a self reference ARR and avoid to get the max-fowards limits if you configure ARR on port 80 and your web farm on another port : ex 8080

So when ARR route the request to itself he will do it on another port so avoid to foward and foward again the request.

Enjoy :-)

like image 156
Cédric Boivin Avatar answered Sep 26 '22 13:09

Cédric Boivin


I had the same problem recently and this is the configuration that helped me (following what Cedric suggested in another post).

So, here is what you can do:

  • In your web-site configuration, add additional binding for Server2, for example, to port 88 (i.e. you should be able to get response by navigating to http://Server2:88/Test.ASPX).
  • In your server farm configuration, add condition to your routing (Routing Rules -> URL Rewrite) to avoid processing requests that go to port 88:

URL rewrite configuration

like image 24
oldbam Avatar answered Sep 23 '22 13:09

oldbam