Update/upgrade grafana

Thank you for your helpfulness!

Yes, I think the same.
It’s only strange that I get this answer when I enter this command:

Somewhere are files from the new version of grafana on my system…

This command

will remove all config files and give you a clean start when you re-install.

@robb01:
I’m without words.
Now I have done:

[11:47:31] openhabian@openhab:~$ sudo apt-get purge grafana
[sudo] password for openhabian:
Sorry, try again.
[sudo] password for openhabian:
Sorry, try again.
[sudo] password for openhabian:
Reading package lists… Done
Building dependency tree
Reading state information… Done
The following packages will be REMOVED:
grafana*
0 upgraded, 0 newly installed, 1 to remove and 5 not upgraded.
After this operation, 105 MB disk space will be freed.
Do you want to continue? [Y/n] y
(Reading database … 50524 files and directories currently installed.)
Removing grafana (6.7.1) …
(Reading database … 50186 files and directories currently installed.)
Purging configuration files for grafana (6.7.1) …
Updating FireMotD available updates count …
[14:41:52] openhabian@openhab:~$ sudo apt-get purge grafana
Reading package lists… Done
Building dependency tree
Reading state information… Done
Package ‘grafana’ is not installed, so not removed
0 upgraded, 0 newly installed, 0 to remove and 5 not upgraded.
[14:42:16] openhabian@openhab:~$ sudo apt-get update
Hit:1 Index of /debian buster InRelease
Get:2 https://packages.grafana.com/oss/deb stable InRelease [12.1 kB]
Ign:3 https://dl.bintray.com/openhab/apt-repo2 stable InRelease
Hit:4 InfluxData - Package Repository buster InRelease
Get:5 https://dl.bintray.com/openhab/apt-repo2 stable Release [6,051 B]
Err:2 https://packages.grafana.com/oss/deb stable InRelease
The following signatures couldn’t be verified because the public key is not available: NO_PUBKEY 8C8C34C524098CB6
Err:7 Index of /raspbian buster InRelease
Cannot initiate the connection to raspbian.raspberrypi.org:80 (2a00:1098:0:80:1000:75:0:3). - connect (101: Network is unreachable) Could not connect to ra spbian.raspberrypi.org:80 (93.93.128.193), connection timed out
Reading package lists… Done
W: GPG error: https://packages.grafana.com/oss/deb stable InRelease: The following signatures couldn’t be verified because the public key is not available: N O_PUBKEY 8C8C34C524098CB6
E: The repository ‘https://packages.grafana.com/oss/deb stable 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.
[14:43:37] openhabian@openhab:~$ sudo apt-get install -y apt-transport-https
Reading package lists… Done
Building dependency tree
Reading state information… Done
apt-transport-https is already the newest version (1.8.2).
0 upgraded, 0 newly installed, 0 to remove and 5 not upgraded.
[14:46:54] openhabian@openhab:~$ sudo apt-get install -y software-properties-common wget
Reading package lists… Done
Building dependency tree
Reading state information… Done
software-properties-common is already the newest version (0.96.20.2-2).
wget is already the newest version (1.20.1-1.1).
0 upgraded, 0 newly installed, 0 to remove and 5 not upgraded.
[14:46:57] openhabian@openhab:~$ wget -q -O - https://packages.grafana.com/gpg.key | sudo apt-key add -
OK
[14:47:22] openhabian@openhab:~$ sudo add-apt-repository “deb https://packages.grafana.com/oss/deb stable main”
Traceback (most recent call last):
File “/usr/bin/add-apt-repository”, line 95, in
sp = SoftwareProperties(options=options)
File “/usr/lib/python3/dist-packages/softwareproperties/SoftwareProperties.py”, line 109, in init
self.reload_sourceslist()
File “/usr/lib/python3/dist-packages/softwareproperties/SoftwareProperties.py”, line 599, in reload_sourceslist
self.distro.get_sources(self.sourceslist)
File “/usr/lib/python3/dist-packages/aptsources/distro.py”, line 93, in get_sources
(self.id, self.codename))
aptsources.distro.NoDistroTemplateException: Error: could not find a distribution template for Raspbian/buster
[14:47:37] openhabian@openhab:~$ sudo apt-get update
Get:1 Index of /raspbian buster InRelease [15.0 kB]
Ign:2 https://dl.bintray.com/openhab/apt-repo2 stable InRelease
Get:3 https://dl.bintray.com/openhab/apt-repo2 stable Release [6,051 B]
Hit:4 InfluxData - Package Repository buster InRelease
Hit:5 Index of /debian buster InRelease
Get:6 Index of /raspbian buster/main armhf Packages [13.0 MB]
Err:8 https://packages.grafana.com/oss/deb stable InRelease
Cannot initiate the connection to packages.grafana.com:443 (2a04:4e42:39::729). - connect (101: Network is unreachable) Could not connect to packages.grafa na.com:443 (151.101.242.217), connection timed out
Fetched 13.0 MB in 30s (429 kB/s)
Reading package lists… Done
W: Failed to fetch https://packages.grafana.com/oss/deb/dists/stable/InRelease Cannot initiate the connection to packages.grafana.com:443 (2a04:4e42:39::729 ). - connect (101: Network is unreachable) Could not connect to packages.grafana.com:443 (151.101.242.217), connection timed out
W: Some index files failed to download. They have been ignored, or old ones used instead.
[14:48:26] openhabian@openhab:~$ sudo apt-get update
Hit:1 Index of /raspbian buster InRelease
Hit:2 Index of /debian buster InRelease
Get:3 https://packages.grafana.com/oss/deb stable InRelease [12.1 kB]
Hit:4 InfluxData - Package Repository buster InRelease
Ign:5 https://dl.bintray.com/openhab/apt-repo2 stable InRelease
Get:6 https://dl.bintray.com/openhab/apt-repo2 stable Release [6,051 B]
Get:7 https://packages.grafana.com/oss/deb stable/main armhf Packages [15.0 kB]
Fetched 21.1 kB in 2s (9,759 B/s)
Reading package lists… Done
[14:49:14] openhabian@openhab:~$ sudo apt-get install 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 6 not upgraded.
Need to get 35.6 MB of archives.
After this operation, 105 MB of additional disk space will be used.
Get:1 https://packages.grafana.com/oss/deb stable/main armhf grafana armhf 6.7.1 [35.6 MB]
Fetched 35.6 MB in 14s (2,525 kB/s)
Selecting previously unselected package grafana.
(Reading database … 50186 files and directories currently installed.)
Preparing to unpack …/grafana_6.7.1_armhf.deb …
Unpacking grafana (6.7.1) …
Replaced by files in installed package grafana-rpi (6.6.1) …
Setting up grafana (6.7.1) …

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~deb10u3+rpi1) …
Updating FireMotD available updates count …
[14:50:17] openhabian@openhab:~$ sudo systemctl enable grafana-server
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
[14:58:27] openhabian@openhab:~$ sudo systemctl start grafana-server
[14:59:20] openhabian@openhab:~$ /usr/sbin/grafana-server -v
Version 6.6.1 (commit: 21bf8b71bc, branch: HEAD)

[15:10:15] openhabian@openhab:~$ sudo /bin/systemctl daemon-reload
[sudo] password for openhabian:
[15:11:44] openhabian@openhab:~$ sudo /bin/systemctl enable grafana-server
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
[15:11:59] openhabian@openhab:~$ sudo /bin/systemctl start grafana-server
[15:12:19] openhabian@openhab:~$ /usr/sbin/grafana-server -v
Version 6.6.1 (commit: 21bf8b71bc, branch: HEAD)

Even after a rebbot i get with the command

/usr/sbin/grafana-server -v
allways the same answer.

Version 6.6.1 (commit: 21bf8b71bc, branch: HEAD)

Hello guys,
Does nobody have a possible solution?
Thank you for your support!

It seems this is where your problem lies. It looks to me like the config files are being over-written by this earlier installation. I haven’t previously come across grafana-rpi.

I would do something like

sudo find / -iname \grafana-rpi

and see if you can find any config or cfg files.

Has anybody upgraded to 7.0 yet? I tried installing via dpkg but the service didn’t start. I was able to revert to 6.6.2 without issues though…
This is what I tried:
sudo apt-get install -y adduser libfontconfig1
wget https://dl.grafana.com/oss/release/grafana_7.0.0_armhf.deb
sudo dpkg -i grafana_7.0.0_armhf.deb

I’m on a RPi, during upgrade (via “openhabian-config”) from 2.5.4 to 2.5.5 I got grafana 7.0.0 without any problem.

In my case updating openHAB from 2.5.3 to 2.5.5 my RPi via openhabian-config Grafana does not start any more (it was also updatet to v7.0).

If I call grafana-cli (or grafana-server) manually on console I get also following error:
/usr/share/grafana/bin/grafana-cli: /lib/arm-linux-gnueabihf/libc.so.6: version 'GLIBC_2.28' not found (required by /usr/share/grafana/bin/grafana-cli)

I also tried to solve it by updating core libs:
sudo apt-get dist-upgrade

No success.

I’m on a Pi4B, updated via 02 “Upgrade all installed software packages to their newest version”
I remember that I got a warning during update from 2.5.3 to 2.5.4 that a grafana setting file would be overwritten, I skipped that and stayed so on grafana 6.x.
Last update on 2.5.5 was then flawless without any warning or so.

are you running Stretch or Buster? Maybe you need to get to Buster if you don’t have it? That’s just a guess - I don’t have a way to test this theory.

Yes, I still use Stretch. That is a good point. I will try to switch to Buster.
But I think on the other hand Grafana then should stop update to version 7 on Stretch …

Edit: after upgrade to Buster (using this how-to: http://baddotrobot.com/blog/2019/08/29/upgrade-raspian-stretch-to-buster/) Grafana 7.0 works again!

As confirmed here, it is a stretch issue.
Our friends at Domoticz were hit hard by this (Domoticz stopped working and they needed upgrading to Buster to get it working again after an automatic update of Domoticz).
Someone over there did find a solution to still make it work on Stretch: https://www.domoticz.com/forum/viewtopic.php?f=6&t=31157&start=180#p240741.
I followed these instructions and have Grafana 7.0.0 running again on an RPi 3B+ with Stretch.

Thanks for the workaround.
It seems that they plan on building a version with lower glibc dependency, so maybe we just have to wait a little: https://github.com/grafana/grafana/issues/24844

If I get too impatient, I’ll try the testing repo as suggested :slight_smile:

Did someone have solved it before? I couldn’t solve it so far.

@mvo

According to v7.0.0 ARM64 binaries don't work on Ubuntu 18.04 · Issue #24844 · grafana/grafana · GitHub the build environment was moved to a stretch based build system three days ago. The latest stable release ( 7.0.1 ) was made available 5 days ago.
So you either may upgrade to buster in case you are still on stretch or wait a few more days until the next release is made available. Alternatively you may install an older version.

I’m not specialist on linux, then the best is to way for new release. Thanks o much for your support.

I had the same problems when my Grafana was updated to 7.0 by an apt upgrade. As I don’t need Grafana 7 for a particular reason, the solution for me was

sudo apt-get install grafana=6.7.3

I´m not seeking a way to update Grafana. Infact my request is more, how to get rid of it.
Originally long time ago I used openhabian-config to install grafana and influxdb. But I have no need of Grafana, as I run it on another server (windows). And since there are no way to choose to only install Influxdb from openhabian-config, I now seek a way to get rid of it…
But before I do, I wonder, how would updating openhab2 react, if Granfa is no longer at the system?

grafana and influxdb are not installed together with / are not part of the bare openhab software.
So in case you deinstall grafana and then do an update of openhab only openhab will be updated.
For updating the linux package management is being used.

They are, if you install them via openhabian-config, which I said… They are then installed together.