Hello,
on the OH2 Release 2.5.12 I made RaspberryPi system update. After that Grafana is not starting anymore. I tried to restart grafana manually and made few hard resets as well. Nothing helped.
My lovely OH2 system is not showing my graphs anymore displaying the ERR_CONNECTION_REFUSED in the browser
How can I resolve it?
â grafana-server.service - Grafana instance
Loaded: loaded (/usr/lib/systemd/system/grafana-server.service; enabled; vendor preset: enabled)
Active: failed (Result: exit-code) since Fri 2022-11-11 13:06:17 CET; 5min ago
Docs: http://docs.grafana.org
Process: 642 ExecStart=/usr/sbin/grafana-server --config=${CONF_FILE} --pidfile=${PID_FILE_DIR}/grafana-server.pid --packaging=deb cfg:default.paths.logs=${LOG_DIR} c
Main PID: 642 (code=exited, status=1/FAILURE)
Nov 11 13:06:17 OH2 systemd[1]: grafana-server.service: Unit entered failed state.
Nov 11 13:06:17 OH2 systemd[1]: grafana-server.service: Failed with result 'exit-code'.
Nov 11 13:06:17 OH2 systemd[1]: grafana-server.service: Service hold-off time over, scheduling restart.
Nov 11 13:06:17 OH2 systemd[1]: Stopped Grafana instance.
Nov 11 13:06:17 OH2 systemd[1]: grafana-server.service: Start request repeated too quickly.
Nov 11 13:06:17 OH2 systemd[1]: Failed to start Grafana instance.
Nov 11 13:06:17 OH2 systemd[1]: grafana-server.service: Unit entered failed state.
Nov 11 13:06:17 OH2 systemd[1]: grafana-server.service: Failed with result 'exit-code'.
sudo journalctl | grep grafana shows
Nov 11 13:06:04 OH2 systemd[1]: [/usr/lib/systemd/system/grafana-server.service:24] Unknown lvalue 'LockPersonality' in section 'Service'
Nov 11 13:06:04 OH2 systemd[1]: [/usr/lib/systemd/system/grafana-server.service:29] Unknown lvalue 'ProtectClock' in section 'Service'
Nov 11 13:06:04 OH2 systemd[1]: [/usr/lib/systemd/system/grafana-server.service:32] Unknown lvalue 'ProtectHostname' in section 'Service'
Nov 11 13:06:04 OH2 systemd[1]: [/usr/lib/systemd/system/grafana-server.service:33] Unknown lvalue 'ProtectKernelLogs' in section 'Service'
Nov 11 13:06:04 OH2 systemd[1]: [/usr/lib/systemd/system/grafana-server.service:36] Unknown lvalue 'ProtectProc' in section 'Service'
Nov 11 13:06:04 OH2 systemd[1]: [/usr/lib/systemd/system/grafana-server.service:42] Unknown lvalue 'RestrictSUIDSGID' in section 'Service'
Nov 11 13:06:13 OH2 grafana-server[524]: /usr/sbin/grafana-server: /lib/arm-linux-gnueabihf/libc.so.6: version `GLIBC_2.28' not found (required by /usr/sbin/grafana-server)
If you are going to keep running deprecated and no longer supported software like OH 2, please please donât upgrade like this. Itâs only a matter of time before something outside of your control will change and youâll either be forced to upgrade or abandon the system entirely.
If you are on OH 2, you should never upgrade the system, OS, or anything else. You should also limit how much you change to your OH configs because each and every change could be the thing that breaks your system and there probably wonât be a fix for it.
Your problems are compounded by the fact that you are running on a no longer supported operating system to begin with. So any updates that do get installed are highly likely to break.
In this case, the problem has something to do with Grafana which to some extent makes it outside the scope of this forum. Please do check the Grafana support pages, forum, and github for similar problems running Graphana on an RPi.
Hopefully downgrading Grafana to a version that is supported on Stretch will work. If it does, donât change anything. And consider what you will do when the system finally breaks due to things outside your control.
If it doesnât, create a new SD card from a fresh openHABian image which still has support to install OH 2.5.12. You can restore a backup of your configs on to that and at least youâll be running with a newer and supported operating system which should support newer Grafana versions.
Hello Rich,
this is very valuable hint. Thank you for this. My plan is to switch to Oh3. I was planing to do this after bringing some improvemetns. It seems this was/is not a good strategy. I made sd image and backup but if I revert to this one i will lose some small updates i made on my HAB Panel. This will be the last move if i am not going to fix it. I will try to revert to older version of the Grafana if I new how to do this without losing my settings.
Would you recomendat at this stage switching to Oh3? Would this fixt the problem with Grafana?
Yes, OH 2 is over two years past itâs support date. Search the forum, there are some steps you need to take to migrate your HABPanels but they can be migrated from one OH 2 to another or from one OH 2 to an OH 3. But there are other breaking changes in rules and such youâll have to adopt to.
No, for that you need to update the whole operating system, not just OH 3. Grafanaâs ability to run has nothing to do with OH itself.
openHABian is based on Debian Linux. Each version of Debian Linux has a name (taken from characters from the Toy Story movies). A version of Debian is only supported for a few years before support is dropped. The end of support means no more updates to the OS are offered. Itâs end of life.
When you run apt-get upgrade itâs going to look for upgrades to that version of the OS, in your case stretch. Support for stretch ended in 2020 so there are no upgrades to be had.
While itâs theoretically possible to upgrade from stretch to buster and from there to bullseye (you canât jump straight to `bullseye, that is highly recommended against. Each step takes hours to complete and a lot can go wrong. It takes less time in the long run and safer to just start over from scratch with a fresh SD card image.from openHABian and migrate your configs to that. Note that openHABian will still let you install and use OH 2.5. Itâs the operating system that needs to be upgraded.
Or, see if you can go back to a pervious version of Grafana, and then donât touch it, ever.
I understand precisely. Thank you.
I will be more careful with the update and read more before doing that. I am sure I can find some posts in this forum on the porting procedure.