I have 2 servers:
- server 1: on a private network (192.168.0.1), running influxdb
- server 2: on a “Public” network (172.16.0.1 and 192.168.0.2) running Grafana
As you can imagine, server1 is not reachable directly from the 172.x.x.x network.
Basic configuration with http works. If I activate https on Grafana … I get the following error when I try to create InfluxDB as a Data source:
No error appears in the logs (Grafana’s or InfuxDB’s).
I created the SSL keys as follows:
openssl req -newkey rsa:2048 -nodes -keyout domain.key -x509 -days 365 -out domain.crt
And copied them to /etc/ssl/
It seems to me that when I activate https on Grafana only, it tries to use https to access InfluxDB. So I’ve tried activating SSL on InfluxDB and same thing, same error. My setup only works if https is NOT configured on Grafana. I’ve also tried using keys created as InfluxData recommends:
openssl req -x509 -nodes -newkey rsa:2048 -keyout /etc/ssl/domain.key -out /etc/ssl/domain.crt -days 365
Doesn’t matter, same error.
If I go to a dashboard, I get the question mark in the top left corner, I click it and an empty window opens with 4 tabs in which the “JS Error” tab just says:
InfluxDB Error: undefined
So, OS and other software versions:
server1: influxdb-1.2.4-1.x86_64, CentOS 7.3.1611, openssl-1.0.1e-60.el7_3.1.x86_64
server2: grafana-4.3.2-1.x86_64, CentOS 6.9, openssl-1.0.1e-57.el6.x86_64
Last test I ran was installing everything on server1, going to the Data Center, hooking up a KVM and running everything locally … same error.
Grafana’s config file:
protocol = https
http_addr = 172.16.0.1
cert_file = /etc/ssl/domain.crt
cert_key = /etc/ssl/domain.key
reporting_enabled = false
check_for_updates = false
admin_user = admin
admin_password = secret
login_remember_days = 0
allow_sign_up = false
allow_org_create = false
mode = syslog console file
InfluxDB config file:
reporting-disabled = true
hostname = “server.domain”
dir = “/var/lib/influxdb/meta”
dir = "/var/lib/influxdb/data"
wal-dir = “/var/lib/influxdb/wal”
enabled = false
bind-address = “:8083”
bind-address = "192.168.0.1:8086"
auth-enabled = false
https-enabled = false
https-certificate = "/etc/ssl/domain.crt"
https-private-key = “/etc/ssl/domain.key”
enabled = false
bind-address = ":4242"
database = “”
I’d really appreciate any ideas you can give me.