Hello,
I want to connect a home assistant to an external InfluxDB that is behind a reverse proxy (Nginx). The InfluxDB on a rpi that is outside my network but I can access to it through the Nginx reverse proxy. The InfluxDB is installed on the external rpi using the Frenck’s addon and the Nginx is managed with the Nginx Proxy Manager. I created a proxy host that forwards the http://db.XXX.duckdns.org to the rpi IP and port 8086. I did not setup the SSL for the Influx connection for the time being.
The InfluxDB addon config looks like this:
auth: true
reporting: true
ssl: true
certfile: fullchain.pem
keyfile: privkey.pem
envvars:
- name: INFLUXDB_HTTP_LOG_ENABLED
value: 'true'
I’ve created the db and the user using the InfluxDB WebUI on the external rpi and I’ve added to the config.yaml the following entry to the local rpi:
influxdb:
host: db.XXX.duckdns.org
path: http://db.XXX.duckdns.org
database: !secret influxdb_db
username: !secret influxdb_user
password: !secret influxdb_password
max_retries: 3
default_measurement: state
I’ve tried different configuration options but unfortunately none is working. I always get the following error in the log:
Cannot connect to InfluxDB due to 'HTTPConnectionPool(host='db.XXX.duckdns.org', port=8086): Max retries exceeded with url: /http://db.XXX.duckdns.org/write?db=DB_NAME (Caused by ConnectTimeoutError(<urllib3.connection.HTTPConnection object at 0xa8f3d9a0>, 'Connection to db.XXX.duckdns.org timed out. (connect timeout=5)'))'. Please check that the provided connection details (host, port, etc.) are correct and that your InfluxDB server is running and accessible. Retrying in 60 seconds.
Can anyone help me with this? Thanks!
1 post - 1 participant