Home Assistant can't connect to influxDB anymore

I’m having a problem with InfluxDB that I just noticed. I’m getting this error message in my log:

2019-04-25 17:28:28 WARNING (SyncWorker_14) [homeassistant.components.influxdb] Database host is not accessible due to ‘HTTPConnectionPool(host=‘a0d7b954-influxdb’, port=8086): Max retries exceeded with url: /write?db=homeassistant (Caused by NewConnectionError(’<urllib3.connection.HTTPConnection object at 0x7fc99de3f780>: Failed to establish a new connection: [Errno -2] Name does not resolve’))’, please check your entries in the configuration file (host, port, etc.) and verify that the database exists and is READ/WRITE. Retrying again in 60 seconds.

This made me think it couldn’t resolve the host name, but I’m using the one from the guide in my config. It looks like this:

    influxdb:
      host: a0d7b954-influxdb
      port: 8086
      database: homeassistant
      username: homeassistant
      password: my_password
      max_retries: 3
      default_measurement: state
      include:
        domains:
          - sensor

I’ve done nothing to change the config for several months. I have no idea what is going on.

Currently running HA 0.92.1 and influxDB 3.0.4.

1 Like

Got the same problem …

1 Like

So the influxDB addon is clearly broken. If it’s not going to be fixed, please let us know, remove it from the add-on’s and I’ll figure out some other way to make it work.

I’m not trying to be a jerk about this, but it seems like this issue is being ignored.

1 Like

Looks like the issue has been fixed with the 0.92.2 release.

Thank you for getting it fixed so quickly!

I still have the error even in 0.92.2 :slight_smile:

I have a SSL connexion via duckdns …

Wed May 08 2019 21:11:27 GMT+0200 (heure d’été d’Europe centrale)

Database host is not accessible due to ‘HTTPSConnectionPool(host=‘a0d7b954_influxdb’, port=8086): Max retries exceeded with url: /write?db=home_assistant (Caused by NewConnectionError(’<urllib3.connection.VerifiedHTTPSConnection object at 0x7f9f4329b0>: Failed to establish a new connection: [Errno -2] Name does not resolve’))’, please check your entries in the configuration file (host, port, etc.) and verify that the database exists and is READ/WRITE. Retrying again in 60 seconds.

influxdb:
host: a0d7b954_influxdb
port: 8086
database: homeassistant
username: !secret influxdb_username
password: !secret influxdb_password
ssl: true
max_retries: 3
default_measurement: state

1 Like

Wish I had an answer for you. All I know it was broken on the last release and with 092.2 it started working again.

Are you running HA in Docker/Hassio?

Yes … Docker/Hassio

1 Like

I know this an old thread but I also can’t connect to influxDB in Hassio w/ Supervisor.

I have the same with following errors every 2 days

When I was having the problem, I removed and installed influxDB again. Not sure if that ever fixed it, but it did start working again after a few days

I can’t seem to find a simple, consistent tutorial on how to configure InfluxDB. When I tried it in March, it worked right away. I told myself that I had a lot to learn to set up the queries and graphs that I wanted, so I set it aside to develop the rest of my automation sytem unitl July, accepting all the HA and HASSIO updates along the way. Then InfluxDB no longer worked and still doesn’t after repeated reinstalls.

My configuration.yaml is:

influxdb:
  host: a0d7b954_influxdb
  port: 8086
  database: home_assistant
  username: home_assistant
  password: password
  max_retries: 3
  default_measurement: state
  include:
    entities:
      - sensor.solar_power

The error I keep getting in the HA log is:

Cannot connect to InfluxDB due to ‘HTTPConnectionPool(host=‘a0d7b954_influxdb’, port=8086): Max retries exceeded with url: /write?db=home_assistant (Caused by NewConnectionError(’<urllib3.connection.HTTPConnection object at 0x665d1d78>: Failed to establish a new connection: [Errno -3] Try again’))’. 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.

I’m running HA 0.116.2 and HassOS 4.13.

I had the same exact problem and the below configuration worked for me :

influxdb:
  host: a0d7b954-influxdb
  port: 8086
  database: homeassistant
  username: homeassistant
  password: xxxx
  max_retries: 3
  ssl: false
  verify_ssl: false
  default_measurement: state
5 Likes

Thankyou, worked. Had the same issue. I had to delete the line “prefix: localhost” and then it worked fine. That’s another 12 hours I’ll never get back…

I was thinking this may be my problem. Localhost never works in my application. Where in the configuration (or in this thread for that matter ) is “prefix:localhost” ?

My problem was my hostname
a0d7b954_influxdb

It should have been a0d7b954-influxdb with - instead of _

Hope it will help others it took long time before i saw it :slight_smile:

3 Likes

Thank you worked .My problem was ssl: false verify_ssl: false

1 Like

I made fatal change in my ha setup and enabled auto-updates for the influxdb addon. Now all of a sudden (read ha update to latest 2023.02.02) ha is complaing about being unable to connect to the db.

The influxdb itself seems to be running fine, I can check old entries in the WebGUI and my Grafana addon is fine pulling out old data, just no new data is written into the db by ha.

anyone has any pointers what I could try to get it going again?

here the error for reference, looks like the aboves:

Cannot connect to InfluxDB due to 'HTTPConnectionPool(host='a0d7b954-influxdb', port=8086): Max retries exceeded with url: /write?db=homeassistant (Caused by NewConnectionError('<urllib3.connection.HTTPConnection object at 0x7f2d54d874c0>: Failed to establish a new connection: [Errno -3] Try again'))'. 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.

nm, found it. Was more then just the ha update, or in fact it had nothing todo with it or the influx addon. My latest OS updates seem to have enabled apparmor and everything only went smooth again after hard disabling it, even though HA now whines about that it is disabled.

  • Cannot connect to InfluxDB due to ‘HTTPConnectionPool(host=‘a0d7b954-influxdb’, port=8086): Max retries exceeded with url: /write?db=homeassistant (Caused by NewConnectionError(’<urllib3.connection.HTTPConnection object at 0x7f71e7aa4cd0>: Failed to establish a new connection: [Errno 113] Host is unreachable’))'. 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.

this is the error I get after 1.6 update