Data proxy error" error="http: proxy error: Forbidden"

I have upgraded to Grafana version v8.4.2. The setup was done via helm and at first glance everything looks normal.

Now I am faced with the challenge of setting up an Elasticsearch DataSource. However, when testing the new DataSource, only the red exclamation mark appears and the log contains the following entry:

grafana logger=data-proxy-log userId=1 orgId=1 uname=admin path=/api/datasources/proxy/4/<index>/_mapping remote_addr=<ip> referer=<grafana-url)/datasources/edit/2afowLynk t=2022-04-04T08:07:17.54+0000 lvl=eror msg="Data proxy error" error="http: proxy error: Forbidden"

As a side note, only the Grafana Pod can connect to the DataSource and not my client (browser).

Maybe this is the reason for the error code 502, because the rerferer parameter in the request uses the external addresses of Grafana.

Is it possible to assign an internal address to Grafana, so that the DataProxy communicates with the other data sources via this address or can it be set per DataSource as header or what ever?


I’ve found that the Elasticsearch-Master node never receives a request from the Grafana backend.

So the “forbidden" should come from Grafana but I haven’t found a place in the code where this error would occur.

Does anyone have a hint for me on how to further debugging the issue?

I’m so stupid :grimacing: I just noticed that in this environment an HTTPS_PROXY environment variable Is set, and of course I need to set the appropriate NO_PROXY (elasticsearch URL) configuration in this case as well