so I’m trying to setup a reverse proxy for Grafana (7.3.4) and I’m epically failing to do so! I’ve tried Caddy, nginx and Traefik on the frontend and every possible combination of Grafana deployment on the backend (plain Docker, HashiCorp Nomad-orchenstrated Docker, barebones tarball) to no avail. We’re talking no subpath routing here. Plain top level URL proxying that we all did since, well forever. Following the Grafana reverse proxy nginx guide, it seems easy enough…
But after messing around with the grafana.ini and/or GF_* vars and such, buffer timeouts and sizes on the various proxies I’m out of ideas!
At this point I don’t even think this is a grafana.ini plus proxy specific combination type issue because all permutations kinda end up showing the same result.
So the constructed paths seem to be okay, which leads me to believe that the root_url and domain values in grafana.ini are setup correctly. The issue is, that the two
vendor.app.hash.js are only partially loaded.
Caddy is logging “connection reset by peer” or “broken pipe” or"context cancelled" every time one tries to refresh the page with cache disabled.
The content lenghts reported in the headers of these two files are very different from the actual size the browser manages to load. Now if I enable caching and refresh often enough eventually all 3MB and 6MB respectively of JS files will be loaded and Grafana will greet me with the login screen.
Well here’s the million dollar question then! What am I missing? Who is the culprit? Is this a bug in Grafana 7.3.4? Do I need to beef up proxy_buffers? Do I need more sleep?
Needless to say that I’m grateful for any hints on this. Not only will I include you in my prayers at night, I will nominate you for the “Kelsey-Hightower-extra-dope-person-award”.