Home Assistant Community Add-on: InfluxDB

Hi all,

It seems that I’ve run in to the “FATAL: InfluxDB init process failed.” issue, and from what I’ve read in this topic, it’s because influxDB doesn’t get enough time to start.

I’ve been running the addon for a month I’d say, and it was doing fine until today, when I restarted HA (I tipically restart a couple times a week, since I’m still tweaking stuff).

Do you have any idea how to solve the issue ? I’m running 1.2.0 with the latest version of HA, on a RPI2B.

Thx for any help you can provide :slight_smile:

Since the update I’m also not able to login anymore to the web interface. Not getting any errors, but login window keeps popping up.

Tried “auth”: false and “leave_front_door_open”: true but still asking me to login and re-installing InfluxDB add-on.

Any suggestions on what I could try?

Looking for the same solution, do u have a how-to with a step-by-step instruction?

Setup: Hassio on Resin <-> spare Pi

Forget what I said… I kept on trying with the wrong password :relaxed::confounded: Feel so stupid…

But it is weird that although I put “leave_front_door_open” it still asks for credentials.

Hi,

I’m still trying to figure out what’s happening on my side: The addon won’t start

I changed the log level to fatal and here’s what I get:

[cont-init.d] 20-system-users.sh: executing…
SIGILL: illegal instruction
PC=0x9b5b1c m=0 sigcode=1
goroutine 1 [running, locked to thread]:
main.init()
:1 +0x30 fp=0x30467c4 sp=0x30467c0 pc=0x9b5b1c
runtime.main()
/usr/local/go/src/runtime/proc.go:189 +0x1b8 fp=0x30467e4 sp=0x30467c4 pc=0x3eeb8
runtime.goexit()
/usr/local/go/src/runtime/asm_arm.s:867 +0x4 fp=0x30467e4 sp=0x30467e4 pc=0x6db90
trap 0x6
error 0x0
oldmask 0x0
r0 0x0
r1 0x3046370
r2 0x76fa8360
r3 0x3082040
r4 0x6abf5
r5 0x38
r6 0x0
r7 0xbf59a8
r8 0x1
r9 0x0
r10 0x30000e0
fp 0x15ad9eb
ip 0x1f
sp 0x30467c0
lr 0x3eeb8
pc 0x9b5b1c
cpsr 0x80000010
fault 0x0

I don’t have enough knowledge to fix this by myself :confused:. I tried to uninstall the addon, restart hassio and reinstall but the error persists.

Any idea on how to fix that ?

A bit of troubles starting InfluxDB.

In supervisor logs I get

Can't create container from addon_a0d7b954_influxdb: 409 Client Error: Conflict ("Conflict. The container name "/addon_a0d7b954_influxdb" is already in use by container "f32d608672dabaf89603999b421e9a8acad61489f982a6083ddc80973b4a0205". You have to remove (or rename) that container to be able to reuse that name.")

I’ve tried reinstalling the add-on to no avail. Any clues?

It was pretty straight forward I installed the infuxdb addon on the new PI which was Resin Hassio, put the configuration for it in the other HA I wanted to pull the data from.

#################################################################
#                                                               #
#                           InfluxDB                            #
#                                                               #
#################################################################

influxdb:
  host: ip or hostname of the pi you installed it on
  port: port you chose
  database: homeassistant
  username: !secret influxdbuser
  password: !secret influxdbpass
  max_retries: 3
  default_measurement: state

Is it possible to add connect a USB memory to a RPI and use that as storage for the database files?

2 Likes

Hi folks, I’ve been running Influxdb on a windows PC, now I have HASSIO I have installed influxdb on that, however when I go the the webui, I’m prompted to input a username and password.

This is as far as I have got, any help is appreciated, Thanks

It’s mentioned in the last step of the installation guide.

  1. You can log into the web interface using your Home Assistant credentials.

Hi folks, been struggling with InfluxDB for a while now. Followed all instructions, everything seems to start ok, however, no data in the homeassistant db.

Trying to follow the Chronograf how-to and create a dashboard, the query: SHOW MEASUREMENTS ON “homeassistant” gives the reply:
Your query is syntactically correct but returned no results

Influxdb log:
time=“2018-12-12T21:01:47+01:00” level=info msg=“Response: No Content” component=server method=GET remote_addr=“127.0.0.1:49512” response_time=1.997861ms status=204

Can I please get a few pointers as to where I should start to find a solution to this issue?

Kind regards
Per

:warning: :ambulance: :lock: Release v1.2.1

This version contains an important security fix, and it is strongly recommend for ALL installations to be upgraded to this version immediately.

Bypass of Authentication

The authentication against Home Assistant can be bypassed by an anonymous and unauthorized user. The issue has been mitigated in the latest release.

To be clear on the subject: This is an add-on issue and not an issue with the Home Assistant authentication itself.

Exact details of the vulnerability are not disclosed in order to give our users the time to upgrade.

Thanks to Lars Larsson for responsibly reporting this vulnerability.

Versions Affected

Affects only the latest release that added support for authentication against Home Assistant, add-on versions v1.2.0. Older releases are not affected.

Full Changelog

Changed

  • Upgrades InfluxDB to 1.7.2

  • Upgrades Chronograf to 1.7.5

  • Upgrades Kapacitor to 1.5.2

  • Fixes authentication bypass vulnerability

Questions? Join our Discord server! https://discord.me/hassioaddons

Enjoying my add-ons? Consider supporting my work: https://patreon.com/frenck or https://buymeacoff.ee/frenck

Hey there. Brand new to InfluxDB/Chronograph, seem to be having an installation issue I can’t figure out. My goal is to log the results of a few sensors, just get some graphs of their status.

Running Hass.io 0.84.6 on a ESXi VM. Using DuckDNS with Let’s Encrypt, all of which is working fine. Installed this Add-On. Settings from the add-on page:

{
  "log_level": "info",
  "auth": true,
  "ssl": true,
  "certfile": "fullchain.pem",
  "keyfile": "privkey.pem"
}

Ports left at default as 8086 and 8088 (and added those to my router’s port forwarding table).

Have the following in the configuration.yaml file:

influxdb:
  host: a0d7b954-influxdb
  port: 8086
  database: homeassistant
  username: homeassistant
  password: !secret influxdbpass
  max_retries: 3
  default_measurement: state
  include: 
    entities:
      - sensor.aeotec_zw096_smart_switch_6_current_3
      - sensor.aeotec_zw096_smart_switch_6_current_2
      - sensor.aeotec_zw096_smart_switch_6_power_2
      - sensor.aeotec_zw096_smart_switch_6_power_3

The web UI came up just fine, I created a db and user as per instructions, but nothing else happened. On the hosts page, I get a “There was a problem loading hosts” message, and if I hover over the little stacked disk icon in the top right, I get "Connected to Source: “http://localhost:8086 @ http://localhost:8086”. Not sure if that’s right - usually, I have to use the external name to access the HA instance, not localhost. I did try to change it to https://REDACTED.duckdns.org:8086 on the configuration page but got the same result - problem loading hosts.

If I create a dashboard, I get a dashboard appearing with a “Name this Dashboard” link, but a message saying “Dashboard 3 could not be found” (or whatever number). Clicking the naming link gets the same message, and no ability to rename. However, I am able to delete it.

Likewise, none of the other tabs show any useful data.

What am I doing wrong? Help much appreciated.

Bump? Would really like to make this work. Anyone have any ideas?

I can’t speak for others, but I haven’t responded because I honestly have no ideas.

For what it’s worth, this is how mine is set up, and has been working fine for months:

My addon config is:

{
  "log_level": "info",
  "auth": false,
  "ssl": true,
  "certfile": "fullchain.pem",
  "keyfile": "privkey.pem",
  "username": "!secret influxdb_addon_username",
  "password": "!secret influxdb_addon_password",
  "ipv6": true
}

In Configuration.yaml:

influxdb:
  host: a0d7b954-influxdb
  port: 8086
  database: !secret influxdb_database
  username: !secret influxdb_username
  password: !secret influxdb_password
  max_retries: 5
  default_measurement: state

As for those secrets (user/pass redacted),

influxdb_database: homeassistant
influxdb_username: DEMOhomeassistantDEMO
influxdb_password: DEMOhomeassistantDMEO

The DB is the name of the DB inside influx, and the username and password are for the account inside Influx which I created per the instructions (not related to any HA users/passwords).

That homeassistant user inside influx has full permissions.

As for the “connections” inside influx, this is how it looks in mine:


Oddly (or not…?) those are both http and not https even with having SSL enabled.

And that’s all I can think of as configuration goes.
I can’t comment on dashboards, because I rarely (never) open influx, and process/view all of the data in grafana, but if I go to “explore” inside influx, I can see all my data just fine.

Assuming yours is close enough to all that, have you tried the simple thing of uninstalling the addon, restarting HA, then installing it again?

1 Like

I have reinstalled it a few times. Will go through your configuration and see if I can use that.

Very odd. I entered almost exactly the same configuration, but when I add “username” and “password” to the addon config and then restart, it deletes those two lines from the config. I’ve tried just hardcoding the usename and password, so as to avoid any issues with the secrets file, but to no avail. A restart of the addon deletes the two line. Odd.

The only other real change from what you have is that I didn’t set the “ipv6” option to true, since my router isn’t configured for ip6. In fact, I think it’s disabled, since I could never figure out how to get it to work correctly and it caused issues…

I, too, plan to use grafana, but as I understand it, I need to have influxdb working correctly, first?

I tried deleting the connection and creating a new one. Using "https://redacted.duckdns.org:8086 didn’t work, but if I did “http://localhost:8086” it went through the process of creating the connection, and a dashboard. But on the hosts screen, it still shows “Unable to get hosts” for the new connection, and when trying to open the newly created dashboard, I still get an error that it’s not there. This is after a clean uninstall and reinstall of the add-on.

The HA log has the following message in it:

Database host 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 0x7fc4f6b355c0>: 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

Yes, I actually experienced the same thing after I sent you my config. I believe that’s a deprecated function, since it uses HA auth now.

How about "auth": false, in your influx config, have you tried that?

What version of HA are you using, and what platform are you running it on? (RasPi, ubuntu, etc)

Yup, tried auth as both false and true.

Using HA 0.85.0 but had the same exact issue before I updated, under 0.84.6

Running HA in a VM on an ESXi6 server. Originally, I was running it on an RPi and I transferred it to the VM. Everything else, including things requiring other ports seems to be working fine (for example, I have the " MQTT Server & Web client" add-on, which uses multiple ports"). I had a static DHCP assignment set on my router for the RPi, and when I switched, I just pointed that assignment to the VM instead, everything just worked.