Firefox has detected that the server is redirecting the request to this address in a way that will never complete
I am following the grails app development tutorials, but whenever I try to run my application (or even its source code)) I understand that "Firefox found that the server was redirecting a request to this address in a way that will never complete" ... Safari gives a similar error message as Opera does.
As I tested the original source code of the authors which gives the same error, I'm pretty sure it has nothing to do with the code.
Is this a problem with the webserver on my machine? I am using Mac OS Snow Leopard, so I am assuming that it apache generates this error.
Edit: It seems that Grails uses Jetty as its standard, so it's probably not Apache that is causing the problem. However, I also tested the app on Glassfish and I get the same error.
Does anyone know what I can do to fix this?
Greetings
source to share
Just check your URLMappings config carefully:
YOUR_APP / Grails-Application / CONF / UrlMappings.groovy
General case:
You have configured the request to be processed as follows:
"/ anything" (controller: "someController")
Thus, without an action, the request will be processed by default "index". "Index" usually redirects to "list" and "list", in some cases redirects back to "index"
Your cycle exists.
Good luck.
source to share
It depends on the code used and the Apache configuration. I am assuming that the web server is sending circular HTTP redirects, eg. from /root/
to /root
(no slash) and vice versa. This causes an endless loop of redirection.
Check your settings for conditions causing HTTP redirection. For example, Apache automatically adds forward slashes to directory URLs in its standard configuration (like the example /root/
above). I don't know Grails, so I can't give you a hint on how URLs are handled in the application.
You can also use manual HTTP debug requests to see what's going on behind the scenes using telnet
in the terminal:
$ telnet localhost 80
GET / HTTP/1.0
I think the answer would be something like this:
HTTP/1.0 302 Found
Location: XXX
...
Now make a second request for the url passed in the header Location
, etc.
source to share
I was getting the same error a few years ago, this is how I fixed it:
- Try using the same page on a different internet installation (this could be your internet service provider).
- Open Safari, Firefox or whatever you are using and clear your cache and delete ALL cookies.
- Restart your computer and try again.
Now it might work, but if it doesn't:
- open Firefox and enter "about: config" (without quotes) in the URL bar.
- You will get a little warning, just click OK
- Enter "redirect" in the "Filter" field
- You should see a list for 'network.http.redirection-limit'
- Double click the list and enter a large number (anything above 50 and below 200).
- Click OK, close and reopen FireFox
Basically all it does is a FireFox tolerance for redirecting the loops above, which should fix your problem - but usually just by borrowing another internet connection it fixes it
Hope that all helps =)
source to share