Openhab stopped working after upgrade to 3.4.2

  • Platform information:
    • Hardware:amd64
    • OS: Ubuntu 20.04 LTS
    • Java Runtime Environment: Openjdk version “11.0.17” 2022-10-18 (ubuntu provided)
    • openHAB version: 3.4.2

Hello together,

i am running openhab since version 3.3 on Ubuntu 20.04 LTS. After i upgraded openhab from the repository yesterday, it stopped working altogether.

systemctl says it’s running, but all log files are empty. I checked the logging-configuration, but it seems fine. I still can login into the karaf console (this seems to be working ok), so it doesn’t seem to be a java issue.

Other than that, I don’t know what to do, since the installation has gone completely silent. Other services are running fine (influxdb for example) and i can reach them over the network. Port 8080 is closed according to nmap. Any advice?

After some digging in the console I found that almost all bundles are stuck to “resolved”. Openhab Core seems to be only waiting bundle.

 bundle:list | grep Waiting
153 x Waiting  x  80 x 3.4.2                  x openHAB Core :: Bundles :: Core

this seems quite weird to me

there are some bundles, that are stuck in “starting”, too

 bundle:list | grep Starting
 43 x Starting x  80 x 5.11.0                 x jna
 44 x Starting x  80 x 2.3.3                  x JAXB OSGI
103 x Starting x  80 x 2.17.0.v20190920-0401  x EMF Common
104 x Starting x  80 x 2.20.0.v20190920-0401  x EMF Ecore
105 x Starting x  80 x 2.14.0.v20190528-0725  x EMF Change Model
106 x Starting x  80 x 2.16.0.v20190528-0725  x EMF XML/XMI Persistence
107 x Starting x  80 x 3.13.0.v20200828-1034  x Common Eclipse Runtime
139 x Starting x  80 x 2.26.0.v20220228-0751  x Xtext
140 x Starting x  80 x 2.26.0.v20220228-0758  x Xtext Common Types
141 x Starting x  80 x 2.26.0.v20220228-0751  x Xtext IDE Core
144 x Starting x  80 x 2.26.0.v20220228-0758  x Xbase Generic IDE Services
146 x Starting x  80 x 1.0.3                  x OSGi resource locator

A

bundle:restart 100-236

seemed to do the trick. Is there any documentation about the required karaf bundles? The documentation in the console-section is a bit sparse. Are alle bundles required to be started or is it ok for some to be “resolved”?

no, all installed bundles should be “Active” (unless you manually stopped them)
But in my experience of multiple updates/upgrades from OH1 since now is, that sometimes openHAB will do that somehow. Normally a complete reboot of the running OS would solve that. A bundle:restart of resolved items didn’t do it - or perhaps I did it in the wrong order…?
Sometimes I did have to restart my RaspberryPi on two or three times - and then somehow magically it was solved.

Unfortunately, restarting the OS doesn’t seem to solve the issue.

After a reboot I’m stuck with a jetty error page and a bunch of hanging bundles. I can restart them all manually, but this is extremely tedious after every reboot.

ok… I didn’t have that. That’s a bigger issue then.

have you tried to clean the cache ?

1 Like

How can i achieve that?

I suspect there is some kind of karaf config issue, maybe it can be solved that way

A quick google search helped :slight_smile:

After stopping the daemon, then using

openhab-cli clean-cache

and restarting the service, everything came up just fine! Thanks!

3 Likes

I’m maintaining openhab on NixOS (although this hasn’t been released to the public yet), but one we do is to essentially store the version of the last running openhab and if it changes due to an upgrade, we auto-clean the cache as part of the setup script that runs before the normal openhab process is spawned.

I have no idea how openhabian does it, but that might be an idea.

This is part of the debian based package ( .deb ) files which includes openhabian.
As part of the preinst script of a deb file during upgrade, install action cache and tmp files are removed.
Nevertheless it looks like sometimes this action needs to be executed manually, too.