Grafana login redirection loop

  • What Grafana version and what operating system are you using?
    grafana docker image 8.5.10

  • What are you trying to achieve?

  • How are you trying to achieve it?
    Deploy grafana as an ecs fargate task behind AWS ALB.

  • What happened?
    After logging in browser is redirecting to /login

  • What did you expect to happen?
    Successful login

  • Can you copy/paste the configuration(s) that you are having problems with?

  • Did you receive any errors in the Grafana UI or in related logs? If so, please tell us exactly what they were.
    logger=context traceID=00000000000000000000000000000000 t=2022-08-09T09:23:37.69+0000 lvl=eror msg=“Failed to look up user based on cookie” error=“user token not found”

  • Did you follow any online instructions? If so, what is the URL?
    No.

Do you mean you have to reconnect every time ? your auth cookie is been deleted ?

After logging in browser is redirecting to /login

can you provide more info.
i you arlredy connected your browser should store auth cookie

Hi alexandrearmand, please find the screenshot below, login call is giving a 200 with grafana_session cookie but after that browser isn’t redirecting to dashboards but redirecting again to login page

After logging in once if I change the url to /dashboards it works.

I’m not sure about this, could you create your own user ?
admin account have specific rules
maybe related to AWS.

@alexandrearmand Thanks for your help, it was due to autocommit being off on the mysql database behind grafana, the tokens generated weren’t getting persisted after login I guess so subsequent calls were not being authorized.