Error when adding InfluxDB data source: Network Error: undefined(undefined)

Hi there!

I am having the same problem as listed in this issue 3006

I have a Grafana (Version 4.6.1 (commit: cac8b97)) instance and an InfluxDB instance both running on the same host. When I try to add the InfluxDB as a data source I get this error

image

… and in the top right corner I see a green box that says “Datasource updated”

The result is that Grafana is unable to fetch data from InfluxDB

With nmap I can verify that InfluxDB is indeed bound to 8086 and I can query it using the InfluxDB HTTP API. This is what I see in the Firefox dev tools when I try to add the data source.

Network tab

It appears that the GET request is never answered by InfluxDB, but running a tcpdump instance on the loopback interface show that this is not the case, the request is in fact never sent to InfluxDB. Running the same query using cURL gives

$ curl "http://localhost:8086/query?db=nyanstats_liveview&q=SHOW%20DATABASES&epoch=ms"
{"results":[{"statement_id":0,"series":[{"name":"databases","columns":["name"],"values":[["_internal"],["nyanstats_liveview"],["nyanstats_sysdiag"],["nyanstats_shapingobjects"]]}]}]}

Proving that InfluxDB is indeed working as expected. I would appreciate any help I could get in resolving this issue.

Maybe it’s a CORS issue? Are you using direct access or proxy?

Thanks for your rapid reply! I’m using direct access.

It seems that a switch to “proxy” did the job. Thanks!

1 Like

Hello,

The same behavior related by @alxp happened with me. I was unable to insert the influxdb datasource with the direct access option, only with the proxy option enabled even being empty.

influxdb: 1.3.7 and 1.4.2
grafana: 4.4.3