redash: Redirect loop 302
Hi,
Since this morning I’ve got a redirect loop when trying to login to Redash. My version is the latest stable (v0.9.2.b1536).
Here is what I’ve got:
$ curl -I redash.antoine-augusti.fr
HTTP/1.1 302 FOUND
Server: nginx/1.4.6 (Ubuntu)
Date: Fri, 01 Apr 2016 08:33:52 GMT
Content-Type: text/html; charset=utf-8
Content-Length: 313
Connection: keep-alive
Location: http://redash.antoine-augusti.fr/login?next=http%3A%2F%2Fredash.antoine-augusti.fr%2F
Set-Cookie: session=eyJfaWQiOnsiIGIiOiJaVFpsTnpNMVpqYzRZelkzTmpNNE9XTXpOakF6TURsa09ESmlOREE1TURrPSJ9fQ.Cd_D8A.UUXGQK77l4fJqQrTdGAdtAiXzq4; HttpOnly; Path=/
I’ve tried restarting the redash webserver without success.
It seems like I’ve got a 500 on the index page, but I can’t find the reason (from api_error.log):
[2016-04-01 08:46:16,479][PID:8117][INFO][metrics] method=GET path=/login endpoint=login status=302 content_type=text/html; charset=utf-8 content_length=273 duration=2.66 query_count=0 query_duration=0.00
[2016-04-01 08:46:16,480][PID:8117][INFO][metrics] method=GET path=/login endpoint=login status=500 content_type=? content_length=-1 duration=3.58 query_count=0 query_duration=0.00
[2016-04-01 08:46:16,572][PID:8118][INFO][metrics] method=GET path=/ endpoint=index status=302 content_type=text/html; charset=utf-8 content_length=313 duration=2.80 query_count=0 query_duration=0.00
[2016-04-01 08:46:16,573][PID:8118][INFO][metrics] method=GET path=/ endpoint=index status=500 content_type=? content_length=-1 duration=3.68 query_count=0 query_duration=0.00
[2016-04-01 08:46:16,670][PID:8126][INFO][metrics] method=GET path=/login endpoint=login status=302 content_type=text/html; charset=utf-8 content_length=273 duration=2.59 query_count=0 query_duration=0.00
[2016-04-01 08:46:16,671][PID:8126][INFO][metrics] method=GET path=/login endpoint=login status=500 content_type=? content_length=-1 duration=3.48 query_count=0 query_duration=0.00
[2016-04-01 08:46:16,765][PID:8123][INFO][metrics] method=GET path=/ endpoint=index status=302 content_type=text/html; charset=utf-8 content_length=313 duration=2.74 query_count=0 query_duration=0.00
[2016-04-01 08:46:16,766][PID:8123][INFO][metrics] method=GET path=/ endpoint=index status=500 content_type=? content_length=-1 duration=3.62 query_count=0 query_duration=0.00
[2016-04-01 08:46:16,857][PID:8117][INFO][metrics] method=GET path=/login endpoint=login status=302 content_type=text/html; charset=utf-8 content_length=273 duration=2.58 query_count=0 query_duration=0.00
[2016-04-01 08:46:16,858][PID:8117][INFO][metrics] method=GET path=/login endpoint=login status=500 content_type=? content_length=-1 duration=3.46 query_count=0 query_duration=0.00
I can access the CLI without any errors by running sudo -u redash bin/run ./manage.py from /opt/redash/current
About this issue
- Original URL
- State: closed
- Created 8 years ago
- Comments: 22 (21 by maintainers)
After checking this with @arikfr on Gitter, we found that this was caused by the
Flask-Loginmodule.For some reasons, the installed version on my system was the right and required one, but the source code was different than on GitHub. Specifically, the
is_authenticatedmethod on theAnonymousUserMixinwas not a property. As such, the conditional was always evaluated to true, causing the redirect loop.This issue was solved with the following commands: