Install InfluxDB/Grafana fails from Openhabian config tool

Release = Raspbian GNU/Linux 10 (buster)
Kernel = Linux 4.19.97-v7+
Platform = Raspberry Pi 2 Model B Rev 1.1
OpenHAB version = openHAB 2.5.5-1 (Release Build)

Image used = openhabian-pi-raspbian-201908050414-gitca0976f-crc6a66b5a1.img.xz

I tried a couple of times now and always fails installing Grafana from the config tool. It is a clean image which gets updated to Rasbian Buster, installing the standard template first and after that trying to install InfluxDB and Grafana.

The main message I’m getting is:

Updating FireMotD available updates count ...

$ systemctl daemon-reload

$ systemctl enable grafana-server.service
Failed to enable unit: Too many levels of symbolic links

$ systemctl start grafana-server.service
OK
Resetting Grafana admin password...
$ grafana-cli admin reset-admin-password admin
/opt/openhabian/functions/helpers.bash: line 24: grafana-cli: command not found
FAILED Connection Grafana to InfluxDB...{"message":"Invalid username or password"}Adding openHAB dashboard tile for Grafana... 2020-05-22_10:09:28_CEST [openHABian] Adding an openHAB dashboard tile for 'grafana'... OK
Adding install InfluxDB with database configuration to openHAB
$ touch /etc/openhab2/services/influxdb.cfg

I also don’t like what is displayed after influxDB is almost ready:

Updating FireMotD available updates count ...

$ sed -i s/auth-enabled = true/# auth-enabled = false/g /etc/influxdb/influxdb.conf

$ systemctl daemon-reload

$ systemctl enable influxdb.service
Synchronizing state of influxdb.service with SysV service script with /lib/systemd/systemd-sysv-install.
Executing: /lib/systemd/systemd-sysv-install enable influxdb

$ systemctl restart influxdb.service
OK Configure InfluxDB admin account... {"results":[{"statement_id":0}]}
{"results":[{"statement_id":0}]}
OK Configure listen on localhost only...
$ sed -i -e /# Determines whether HTTP endpoint is enabled./ { n ; s/# enabled = true/enabled = true/ } /etc/influxdb/influxdb.conf

$ sed -i s/# bind-address = ":8086"/bind-address = "localhost:8086"/g /etc/influxdb/influxdb.conf

$ sed -i s/# auth-enabled = false/auth-enabled = true/g /etc/influxdb/influxdb.conf

$ sed -i s/# store-enabled = true/store-enabled = false/g /etc/influxdb/influxdb.conf

$ systemctl restart influxdb.service
OK Waiting for InfluxDB service... OK
Setup of inital influxdb database and InfluxDB users... {"results":[{"statement_id":0}]}
{"results":[{"statement_id":0}]}
{"results":[{"statement_id":0}]}
{"results":[{"statement_id":0}]}
{"results":[{"statement_id":0}]}
{"results":[{"statement_id":0}]}
{"results":[{"statement_id":0}]}
OK Installing Grafana... --2020-05-22 10:01:52--  https://packages.grafana.com/gpg.key
Resolving packages.grafana.com (packages.grafana.com)... 151.101.38.217, 2a04:4e42:9::729
Connecting to packages.grafana.com (packages.grafana.com)|151.101.38.217|:443... connected.
HTTP request sent, awaiting response... 200 OK
Length: 1694 (1.7K) [application/x-iwork-keynote-sffkey]
Saving to: ‘STDOUT’

Bunch of:

{"results":[{"statement_id":0}]}

which don’t look 100% OK.

I have the whole output available if needed, but the post limit doesn’t like it :slight_smile:

I don’t know if this is a Grafana issue or a OpenHAB issue, Google doesn’t seem to be very helpfull on this issue.

Hope somebody can help as this could result in more people having issues doing a clean install via OpenHABian.

Understand the difference of openHAB vs. openHABian.
Don’t google (alway a bad idea as you get many outdated responses).
Search this forum, there’s other threads on exactly this symptom.

Update the openhabian-config tool (it asks on start).
If grafana-cli still cannot be found that’s probably an issue with the Grafana package.
Help with debugging: check back here.
Check the Grafana repo you use (/etc/apt/sources.list.d/grafana.list), should contain
deb https://packages.grafana.com/oss/deb stable main.