I am encountering a unique issue with Grafana where it seems to allow dashboard access from only one browser at a time when configured with a specific subpath.
Configuration Details (Anonymized):
[server]
domain:=anonymized-domain.com
root_url= "%(protocol)s://%(domain)s/subpath"
serve_from_sub_path= true
Ingress Configuration for Grafana :
ingress:
enabled: true
ingressClassName: nginx
annotations:
cert-manager.io/cluster-issuer: letsencrypt-prod
hosts:
- anonymized-domain.com
path: /subpath/
tls:
- secretName: grafana-tls-secret
hosts:
- anonymized-domain.com
Problem Description:
Accessing Grafana through the first browser works fine.
However, when trying to access the same dashboard from a second browser, it does not work.
Changing the subpath in the configuration allows access from the second browser but then blocks the first one.
It seems Grafana is restricting access to only one browser session per subpath.
I would appreciate any insights or solutions to this issue. Has anyone encountered a similar problem or can provide guidance on how to resolve this?
Check network browser console, pls
What kind of errors are there and why requests are failing?
The console is showing this error:
Uncaught SyntaxError: Invalid or unexpected token
in the network I dont see any problem:
Blind guess: clear cookies, session/local storage.
I tried that actually, and the working browser stopped working as well
Something is locking the session to one browser and disallowing any other requests from any other browser I am not sure what settings or configurations could cause this.
Note: connecting to it from the port forward command is working normally
kubectl port-forward svc/kube-prometheus-stack-grafana 3000:80 -n kube-prometheus-stack
Nope, I guess something is messing with cookies. You may use browser console and inspect cookies and their set requests, find what’s causing “Invalid or unexpected token”, check how official grafana helm chart configure ingress, replace ingress by LB service,…
ok found the solution finally here:
opened 01:53PM - 01 Mar 23 UTC
closed 02:33PM - 17 Apr 23 UTC
type/build-packaging
pr/external
triage/needs-confirmation
<!--
Please use this template to create your bug report. By providing as much i… nfo as possible you help us understand the issue, reproduce it and resolve it for you quicker. Therefore take a couple of extra minutes to make sure you have provided all info needed.
PROTIP: record your screen and attach it as a gif to showcase the issue.
- Questions should be posted to: https://community.grafana.com
- Use query inspector to troubleshoot issues: https://bit.ly/2XNF6YS
- How to record and attach gif: https://bit.ly/2Mi8T6K
-->
**What happened**:
Running a simple Grafana instane in a Docker on Ubuntu 22.04
Protected by Cloudflare Tunnel
Upgraded grafana from 9.3 to 9.4
Grafana doesn't load anymore, shows an error page:
"If you're seeing this Grafana has failed to load its application files"
**What you expected to happen**:
Grafana to load
It does load via the direct IP+port internally, so I understand one would think that Cloudflare is the issue, however the upgrade is the thing that breaks it, so I am looking for the breaking change and how to reconfigure Cloudflare if needed.
**How to reproduce it (as minimally and precisely as possible)**:
Deploy standard cloudflare tunnel
Deploy docker container for grafana 9.4
If i revert the image to 9.3 it works perfectly.
**Anything else we need to know?**:
**Environment**:
- Grafana version: 9.4
- Data source type & version:
- OS Grafana is installed on: Ubuntu LTS 22.04
- User OS & Browser: Firefox 110
- Grafana plugins: none
- Others:
Cloudflare was the problem