Openhabian InfluxDB/Grafana install problems

Any help is appreciated. I attempted to install this from the openhabian-config utility. The install log is riddled with errors, I supposed stemming from no public key available. Why is that? Thanks.

2020-07-23_19:45:13_CDT [openHABian] Updating Linux package information... OK
2020-07-23_19:45:13_CDT [openHABian] Setting up InfluxDB and Grafana...
/opt/openhabian/functions/influxdb+grafana.bash: line 42: is_armv61: command not found

Installing InfluxDB...
--2020-07-23 19:45:53--  https://repos.influxdata.com/influxdb.key
Resolving repos.influxdata.com (repos.influxdata.com)... 99.84.252.72, 99.84.252.75, 99.84.252.105, ...
Connecting to repos.influxdata.com (repos.influxdata.com)|99.84.252.72|:443... connected.
HTTP request sent, awaiting response... 200 OK
Length: 3108 (3.0K) [application/pgp-keys]
Saving to: ‘STDOUT’

-                   100%[===================>]   3.04K  --.-KB/s    in 0s

2020-07-23 19:45:53 (82.4 MB/s) - written to stdout [3108/3108]

OK

$ apt-get update
Ign:1 http://repos.azulsystems.com/debian stable InRelease
Hit:2 http://repos.azulsystems.com/debian stable Release
Hit:3 https://packages.grafana.com/oss/deb stable InRelease
Hit:4 https://deb.nodesource.com/node_12.x buster InRelease
Hit:5 https://repos.influxdata.com/debian buster InRelease
Hit:6 http://archive.raspberrypi.org/debian buster InRelease
Hit:7 http://raspbian.raspberrypi.org/raspbian buster InRelease
Ign:8 https://dl.bintray.com/openhab/apt-repo2 stable InRelease
Get:10 http://ppa.launchpad.net/webupd8team/java/ubuntu xenial InRelease [17.6 kB]
Get:11 https://dl.bintray.com/openhab/apt-repo2 stable Release [6,051 B]
Err:10 http://ppa.launchpad.net/webupd8team/java/ubuntu xenial InRelease
  The following signatures couldn't be verified because the public key is not available: NO_PUBKEY C2518248EEA14886
Reading package lists... Done
W: GPG error: http://ppa.launchpad.net/webupd8team/java/ubuntu xenial InRelease: The following signatures couldn't be verified because the public key is not available: NO_PUBKEY C2518248EEA14886
E: The repository 'http://ppa.launchpad.net/webupd8team/java/ubuntu xenial InRelease' is not signed.
N: Updating from such a repository can't be done securely, and is therefore disabled by default.
N: See apt-secure(8) manpage for repository creation and user configuration details.

$ apt-get install --yes influxdb
Reading package lists... Done
Building dependency tree
Reading state information... Done
The following NEW packages will be installed:
  influxdb
0 upgraded, 1 newly installed, 0 to remove and 13 not upgraded.
Need to get 0 B/59.1 MB of archives.
After this operation, 151 MB of additional disk space will be used.
Selecting previously unselected package influxdb.
(Reading database ... 52676 files and directories currently installed.)
Preparing to unpack .../influxdb_1.8.1-1_armhf.deb ...
Unpacking influxdb (1.8.1-1) ...
Setting up influxdb (1.8.1-1) ...
Processing triggers for man-db (2.8.5-2) ...
Updating FireMotD available updates count ...

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

$ systemctl enable influxdb.service

$ systemctl restart influxdb.service
FAILED Configure InfluxDB admin account... {"results":[{"statement_id":0}]}
{"results":[{"statement_id":0}]}
FAILED 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
FAILED Waiting for InfluxDB service... FAILED
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}]}
FAILED Installing Grafana... --2020-07-23 19:46:23--  https://packages.grafana.com/gpg.key
Resolving packages.grafana.com (packages.grafana.com)... 151.101.186.217, 2a04:4e42:2c::729
Connecting to packages.grafana.com (packages.grafana.com)|151.101.186.217|:443... connected.
HTTP request sent, awaiting response... 200 OK
Length: 1694 (1.7K) [application/x-iwork-keynote-sffkey]
Saving to: ‘STDOUT’

-                   100%[===================>]   1.65K  --.-KB/s    in 0s

2020-07-23 19:46:23 (10.5 MB/s) - written to stdout [1694/1694]

OK

$ apt-get update
Ign:1 http://repos.azulsystems.com/debian stable InRelease
Hit:2 http://repos.azulsystems.com/debian stable Release
Hit:3 https://packages.grafana.com/oss/deb stable InRelease
Hit:4 https://repos.influxdata.com/debian buster InRelease
Hit:5 https://deb.nodesource.com/node_12.x buster InRelease
Hit:6 http://raspbian.raspberrypi.org/raspbian buster InRelease
Hit:7 http://archive.raspberrypi.org/debian buster InRelease
Ign:8 https://dl.bintray.com/openhab/apt-repo2 stable InRelease
Get:10 http://ppa.launchpad.net/webupd8team/java/ubuntu xenial InRelease [17.6 kB]
Get:11 https://dl.bintray.com/openhab/apt-repo2 stable Release [6,051 B]
Err:10 http://ppa.launchpad.net/webupd8team/java/ubuntu xenial InRelease
  The following signatures couldn't be verified because the public key is not available: NO_PUBKEY C2518248EEA14886
Reading package lists... Done
W: GPG error: http://ppa.launchpad.net/webupd8team/java/ubuntu xenial InRelease: The following signatures couldn't be verified because the public key is not available: NO_PUBKEY C2518248EEA14886
E: The repository 'http://ppa.launchpad.net/webupd8team/java/ubuntu xenial InRelease' is not signed.
N: Updating from such a repository can't be done securely, and is therefore disabled by default.
N: See apt-secure(8) manpage for repository creation and user configuration details.

$ apt-get install --yes grafana
Reading package lists... Done
Building dependency tree
Reading state information... Done
The following NEW packages will be installed:
  grafana
0 upgraded, 1 newly installed, 0 to remove and 13 not upgraded.
Need to get 0 B/43.9 MB of archives.
After this operation, 140 MB of additional disk space will be used.
Selecting previously unselected package grafana.
(Reading database ... 52702 files and directories currently installed.)
Preparing to unpack .../grafana_7.1.0_armhf.deb ...
Unpacking grafana (7.1.0) ...
Setting up grafana (7.1.0) ...
### NOT starting on installation, please execute the following statements to configure grafana to start automatically using systemd
 sudo /bin/systemctl daemon-reload
 sudo /bin/systemctl enable grafana-server
### You can start grafana-server by executing
 sudo /bin/systemctl start grafana-server
Processing triggers for systemd (241-7~deb10u4+rpi1) ...
Updating FireMotD available updates count ...

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

$ systemctl start grafana-server.service
OK
Wait for Grafana to start...
executing curl -s http://localhost:3000 >/dev/null
OK
Resetting Grafana admin password...
$ su -s /bin/bash -c grafana-cli admin reset-admin-password admin grafana
INFO[07-23|19:46:54] Connecting to DB                         logger=sqlstore dbtype=sqlite3
INFO[07-23|19:46:54] Starting DB migration                    logger=migrator

Admin password changed successfully ✔

OK
Restarting Grafana...
$ systemctl restart grafana-server.service
OK
executing curl -s http://localhost:3000 >/dev/null
OK Updating Grafana admin password...
$ curl --user admin:admin --header Content-Type: application/json --request PUT --data {"password":"admin"} http://localhost:3000/api/admin/users/1/password
{"message":"User password updated"}OK
Updating Grafana configuration...
$ sed -i -e /^# disable user signup \/ registration/ { n ; s/^;allow_sign_up = true/allow_sign_up = false/ } /etc/grafana/grafana.ini

$ sed -i -e /^# enable anonymous access/ { n ; s/^;enabled = false/enabled = true/ } /etc/grafana/grafana.ini
OK
$ systemctl restart grafana-server.service
Waiting for Grafana service...
executing curl -s http://localhost:3000 >/dev/null
OK
Connection Grafana to InfluxDB...{"message":"Data source with the same name already exists"}Adding openHAB dashboard tile for Grafana... 2020-07-23_19:47:01_CDT [openHABian] Adding an openHAB dashboard tile for 'grafana'... Replacing... OK
Adding install InfluxDB with database configuration to openHAB
$ touch /etc/openhab2/services/influxdb.cfg

2020-07-23_19:47:06_CDT [openHABian] Checking for default openHABian username:password combination... FAILED
2020-07-23_19:47:08_CDT [openHABian] We hope you got what you came for! See you again soon ;)

I think there is either a typo in influxdb+grafana.bash ( if is_armv61; then ) the 1 needs to be a lowercase L or the definition of function is_armv61 is missing in helpers.bash.
You can try to replace the 1 with the lowercase L and try if it already works.

@mstormi needs to have a look at it.

Yes - fixed it.

1 Like

Thanks for your quick help. The installation is still failing, however. The first error in the log is this:

2020-07-24_05:44:23_CDT [openHABian] Switching to branch  ... fatal: empty string is not a valid pathspec. please use . instead if you meant to match all paths
FAILED

And then

  The following signatures couldn't be verified because the public key is not available: NO_PUBKEY C2518248EEA14886
Reading package lists... Done
W: GPG error: http://ppa.launchpad.net/webupd8team/java/ubuntu xenial InRelease: The following signatures couldn't be verified because the public key is not available: NO_PUBKEY C2518248EEA14886
E: The repository 'http://ppa.launchpad.net/webupd8team/java/ubuntu xenial InRelease' is not signed.
N: Updating from such a repository can't be done securely, and is therefore disabled by default.
N: See apt-secure(8) manpage for repository creation and user configuration details.

Thanks again for your help.

[05:43:12] openhabian@openhab:~$ sudo openhabian-config
2020-07-24_05:43:25_CDT [openHABian] Checking for root privileges... OK
2020-07-24_05:43:25_CDT [openHABian] Loading configuration file '/etc/openhabian.conf'... OK
2020-07-24_05:43:26_CDT [openHABian] openHABian configuration tool version: [stable]patchday-20200715-722(c5dbb04)
2020-07-24_05:43:26_CDT [openHABian] Checking for changes in origin branch HEAD ... Updates available...
2020-07-24_05:44:09_CDT [openHABian] Updating myself... OK - Commit history (oldest to newest):


07f084d - fix typo is_armv6l() (3 hours ago) <Markus Storm> E
 functions/influxdb+grafana.bash | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)


openHABian configuration tool successfully updated.
Visit the development repository for more details:
The tool will now restart to load the updates...


2020-07-24_05:44:11_CDT [openHABian] Checking for root privileges... OK
2020-07-24_05:44:11_CDT [openHABian] Loading configuration file '/etc/openhabian.conf'... OK
2020-07-24_05:44:14_CDT [openHABian] openHABian configuration tool version: [stable]patchday-20200715-723(07f084d)
2020-07-24_05:44:14_CDT [openHABian] Checking for changes in origin branch HEAD ... OK
2020-07-24_05:44:23_CDT [openHABian] Switching to branch  ... fatal: empty string is not a valid pathspec. please use . instead if you meant to match all paths
FAILED
2020-07-24_05:44:31_CDT [openHABian] Updating Linux package information... OK
2020-07-24_05:44:31_CDT [openHABian] Setting up InfluxDB and Grafana...

Installing InfluxDB...
--2020-07-24 05:45:14--  https://repos.influxdata.com/influxdb.key
Resolving repos.influxdata.com (repos.influxdata.com)... 99.84.252.75, 99.84.252.105, 99.84.252.4, ...
Connecting to repos.influxdata.com (repos.influxdata.com)|99.84.252.75|:443... connected.
HTTP request sent, awaiting response... 200 OK
Length: 3108 (3.0K) [application/pgp-keys]
Saving to: ‘STDOUT’

-                   100%[===================>]   3.04K  --.-KB/s    in 0s

2020-07-24 05:45:14 (116 MB/s) - written to stdout [3108/3108]

OK

$ apt-get update
Ign:1 http://repos.azulsystems.com/debian stable InRelease
Hit:2 http://repos.azulsystems.com/debian stable Release
Hit:3 https://packages.grafana.com/oss/deb stable InRelease
Hit:4 https://repos.influxdata.com/debian buster InRelease
Hit:5 http://archive.raspberrypi.org/debian buster InRelease
Hit:6 https://deb.nodesource.com/node_12.x buster InRelease
Hit:7 http://raspbian.raspberrypi.org/raspbian buster InRelease
Ign:8 https://dl.bintray.com/openhab/apt-repo2 stable InRelease
Get:10 http://ppa.launchpad.net/webupd8team/java/ubuntu xenial InRelease [17.6 kB]
Get:11 https://dl.bintray.com/openhab/apt-repo2 stable Release [6,051 B]
Err:10 http://ppa.launchpad.net/webupd8team/java/ubuntu xenial InRelease
  The following signatures couldn't be verified because the public key is not available: NO_PUBKEY C2518248EEA14886
Reading package lists... Done
W: GPG error: http://ppa.launchpad.net/webupd8team/java/ubuntu xenial InRelease: The following signatures couldn't be verified because the public key is not available: NO_PUBKEY C2518248EEA14886
E: The repository 'http://ppa.launchpad.net/webupd8team/java/ubuntu xenial InRelease' is not signed.
N: Updating from such a repository can't be done securely, and is therefore disabled by default.
N: See apt-secure(8) manpage for repository creation and user configuration details.

$ apt-get install --yes influxdb
Reading package lists... Done
Building dependency tree
Reading state information... Done
The following NEW packages will be installed:
  influxdb
0 upgraded, 1 newly installed, 0 to remove and 14 not upgraded.
Need to get 0 B/59.1 MB of archives.
After this operation, 151 MB of additional disk space will be used.
Selecting previously unselected package influxdb.
(Reading database ... 52676 files and directories currently installed.)
Preparing to unpack .../influxdb_1.8.1-1_armhf.deb ...
Unpacking influxdb (1.8.1-1) ...
Setting up influxdb (1.8.1-1) ...
Processing triggers for man-db (2.8.5-2) ...
Updating FireMotD available updates count ...

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

$ systemctl enable influxdb.service

$ systemctl restart influxdb.service
FAILED Configure InfluxDB admin account... {"results":[{"statement_id":0}]}
{"results":[{"statement_id":0}]}
FAILED 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
FAILED Waiting for InfluxDB service... FAILED
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}]}
FAILED Installing Grafana... --2020-07-24 05:45:44--  https://packages.grafana.com/gpg.key
Resolving packages.grafana.com (packages.grafana.com)... 151.101.186.217, 2a04:4e42:2c::729
Connecting to packages.grafana.com (packages.grafana.com)|151.101.186.217|:443... connected.
HTTP request sent, awaiting response... 200 OK
Length: 1694 (1.7K) [application/x-iwork-keynote-sffkey]
Saving to: ‘STDOUT’

-                   100%[===================>]   1.65K  --.-KB/s    in 0s

2020-07-24 05:45:44 (10.1 MB/s) - written to stdout [1694/1694]

OK

$ apt-get update
Ign:1 http://repos.azulsystems.com/debian stable InRelease
Hit:2 http://repos.azulsystems.com/debian stable Release
Hit:3 https://packages.grafana.com/oss/deb stable InRelease
Hit:4 https://repos.influxdata.com/debian buster InRelease
Hit:5 https://deb.nodesource.com/node_12.x buster InRelease
Hit:6 http://archive.raspberrypi.org/debian buster InRelease
Hit:7 http://raspbian.raspberrypi.org/raspbian buster InRelease
Ign:8 https://dl.bintray.com/openhab/apt-repo2 stable InRelease
Get:10 https://dl.bintray.com/openhab/apt-repo2 stable Release [6,051 B]
Get:11 http://ppa.launchpad.net/webupd8team/java/ubuntu xenial InRelease [17.6 kB]
Err:11 http://ppa.launchpad.net/webupd8team/java/ubuntu xenial InRelease
  The following signatures couldn't be verified because the public key is not available: NO_PUBKEY C2518248EEA14886
Reading package lists... Done
W: GPG error: http://ppa.launchpad.net/webupd8team/java/ubuntu xenial InRelease: The following signatures couldn't be verified because the public key is not available: NO_PUBKEY C2518248EEA14886
E: The repository 'http://ppa.launchpad.net/webupd8team/java/ubuntu xenial InRelease' is not signed.
N: Updating from such a repository can't be done securely, and is therefore disabled by default.
N: See apt-secure(8) manpage for repository creation and user configuration details.

$ apt-get install --yes grafana
Reading package lists... Done
Building dependency tree
Reading state information... Done
The following NEW packages will be installed:
  grafana
0 upgraded, 1 newly installed, 0 to remove and 14 not upgraded.
Need to get 0 B/43.9 MB of archives.
After this operation, 140 MB of additional disk space will be used.
Selecting previously unselected package grafana.
(Reading database ... 52702 files and directories currently installed.)
Preparing to unpack .../grafana_7.1.0_armhf.deb ...
Unpacking grafana (7.1.0) ...
Setting up grafana (7.1.0) ...
### NOT starting on installation, please execute the following statements to configure grafana to start automatically using systemd
 sudo /bin/systemctl daemon-reload
 sudo /bin/systemctl enable grafana-server
### You can start grafana-server by executing
 sudo /bin/systemctl start grafana-server
Processing triggers for systemd (241-7~deb10u4+rpi1) ...
Updating FireMotD available updates count ...

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

$ systemctl start grafana-server.service
OK
Wait for Grafana to start...
executing curl -s http://localhost:3000 >/dev/null
OK
Resetting Grafana admin password...
$ su -s /bin/bash -c grafana-cli admin reset-admin-password admin grafana
INFO[07-24|05:46:12] Connecting to DB                         logger=sqlstore dbtype=sqlite3
INFO[07-24|05:46:12] Starting DB migration                    logger=migrator

Admin password changed successfully ✔

OK
Restarting Grafana...
$ systemctl restart grafana-server.service
OK
executing curl -s http://localhost:3000 >/dev/null
OK Updating Grafana admin password...
$ curl --user admin:admin --header Content-Type: application/json --request PUT --data {"password":"admin"} http://localhost:3000/api/admin/users/1/password
{"message":"User password updated"}OK
Updating Grafana configuration...
$ sed -i -e /^# disable user signup \/ registration/ { n ; s/^;allow_sign_up = true/allow_sign_up = false/ } /etc/grafana/grafana.ini

$ sed -i -e /^# enable anonymous access/ { n ; s/^;enabled = false/enabled = true/ } /etc/grafana/grafana.ini
OK
$ systemctl restart grafana-server.service
Waiting for Grafana service...
executing curl -s http://localhost:3000 >/dev/null
OK
Connection Grafana to InfluxDB...{"message":"Data source with the same name already exists"}Adding openHAB dashboard tile for Grafana... 2020-07-24_05:46:20_CDT [openHABian] Adding an openHAB dashboard tile for 'grafana'... Replacing... OK
Adding install InfluxDB with database configuration to openHAB
$ touch /etc/openhab2/services/influxdb.cfg

2020-07-24_05:46:29_CDT [openHABian] Checking for default openHABian username:password combination... FAILED
2020-07-24_05:46:31_CDT [openHABian] We hope you got what you came for! See you again soon ;)

This

was reported here before.

With regard to the GPG error try I suggest to follow this description.

Thanks Wolfgang! Both those issues were resolved. I would have never figured out the pubkey issue. Now I have to figure out why OpenHAB isn’t writing to the database but I’ll start a new thread for that.