[SOLVED] Failure to install InfluxDB and Grafana on openhabian 1.4.1

So I installed openhabian on my pi3.
It was all working well, but when I used openhabian-config to install Influx + Grafana.
I got this error:

$ systemctl start grafana-server.service
OK
Updating Grafana admin password...curl: (7) Failed to connect to localhost port 3000: Connection refused
FAILED Updating Grafan configuration...

The openhabian-config script told me that somethign went wrong.

I then re-started a fresh microSD with openhabian from zero again, almost no settings changed except:

localhost name & openhabian passwd.
Re-ran the installation, and got the same error.

What can I do?

FYI, Grafana tile is already available at my startup page of OH2.4…

Have you enabled authentication in the [http] section of the configuration file /etc/influxdb/influxdb.conf?

See this topic as a guide for setting up InfluxDB and Grafana.

In short, I finally got it to work.
In long I redid many things.

It seems the openhabian script succeeds to auto-install InfluxDB and Grafana, but it did not setup the users and their password.

It seems another issue was how to define localhost URL.

I believe the above 2 reasons are why autosetup script fails.

Finally your mentioned of http access was also missing (I previously followed an other tutorial which did not include that step).

I noticed whenever I ran sudo service influx status, there was no POST record.
After adding it, it seemed to work.

I might make a new tutorial one day, seeing as both influx and grafana are at much newer versions.

Quick follow-up question.

Can I use influxdb persist with a default strategy? (Example to save all items periodically).
Will the influxdb be used to re-set item states on reboot for example?
I previously had such a setup but I was not using influx, I was using the apache log file based persist (can’t remember the name).

Thanks.

Yes, you can use influxDB just like any other persistence service; you actually need to define a persistence strategy for each persistence service separately (see docs) and can modify them as you need

You will decide which persistence service will be used by defining restoreOnBackup within the persistence strategy. I would highly recommend to use mapDB for that, it will be much faster.