Grafana login loops back to the login page after successful OAuth
IntermediateTroubleshootingGrafana dashboards and data sources
Answer
Likely causes → root_url does not match the external URL so the redirect URI/cookies mismatch, or cookies are marked secure on HTTP, or multiple replicas without shared sessions/database.
Diagnose → Check Grafana logs for oauth errors and the browser's cookie for grafana_session.
Fix → Set root_url to the exact public URL; match the IdP redirect URI (https://grafana.example.com/login/generic_oauth); use a shared DB (PostgreSQL/MySQL) for multiple replicas.
Prevent → Never run multiple Grafana replicas on SQLite.
More on Grafana dashboards and data sources
Every panel on a dashboard shows `No data`BeginnerGrafana data source test fails with `Bad Gateway` (HTTP 502)BeginnerData source test returns `Post "http://prometheus:9090/api/v1/query": dial tcp: lookup prometheus on 10.96.0.10:53: no such host`BeginnerGrafana shows `504 Gateway Timeout` on long-range queriesAdvancedGrafana behind a reverse proxy shows `If you're seeing this Grafana has failed to load its application files`BeginnerGrafana pod logs `database is locked` and dashboards fail to saveIntermediate