Inadvertant upgrade from 3.3.0 to whatever version is current (4.0.1?) failed, system broken

Let me get this out here up front - I am by no means Linux fluent. Any solutions will need to be spelled out rather explicitly.

I did what I though was just an OS update (apt update, apt upgrade) on my RPi 4 copy of OH3.3.0.

In the process I noticed that it seemed to be upgrading OH to version 4, along with a multitude of errors some indicating a problem with the OH database (I unfortunately didn’t capture those…). NOT what I intended. Now OH is not running. Did another apt update and got these errors:

“W: An error occurred during the signature verification. The repository is not updated and the previous index files will be used. GPG error: JFrog stable InRelease: The following signatures were invalid: EXPKEYSIG 075721F6A224060A openHAB Bintray Repositories
W: Failed to fetch JFrog The following signatures were invalid: EXPKEYSIG 075721F6A224060A openHAB Bintray Repositories

Am I screwed? Is there a way to recover from this?

That error at the end of your post I think is because the apt repo key expired and you need to replace it. Here is instructions for that step

Also version 4 is going to require Java 17 (OH3 ran on Java version 11)


As @Andrew_Rowe said, those warnings would have likely said what was wrong and if you’re coming from openHAB 3.3.0 then it’s very likely that you’ve not got Java 17 installed.

However if you haven’t read the breaking changes from Release openHAB 4.0.0 · openhab/openhab-distro · GitHub then there’s probably more you need to do, so please have a read of it.

If you’re looking to get back to openHAB 3.3.0, then you can try and revert using the command:

sudo apt install openhab=3.3.0-1

There’s no guarantee this will work, because 3.3.0 is quite old and there’s no certainty about downgrading particular across major versions. However, hopefully you made a backup with openhab-cli in which case you can restore it again which is the best way to getting back to normal quickly.

1 Like

I would assume that as long as the repo key is outdated the upgrade process did not take place so the version still must be at that one before initializing the upgrade process.

@scubabeme that’s easy to test

dpkg -l opnehab openhab-addons

will show the current installed versions.

As you use OS commands to do the upgrade manually I assume that you don’t use openhabian.
As in the release notes described are you already on Debian 11 / Bullseye ?

“sudo apt install openhab=3.3.0-1” WORKED! Thank you very much for that idea! Now to do another backup (truthfully has been awhile…mea culpa, mea culpa) and investigate an intentional v4.0.1 to see how much work it will be.

Since I’m here and people will be reading this anyway, is it recommended to go to 3.4.0 first? Is there a thread or help topic that outlines an upgrade to 4.0.1 from 3.3.0? I will be looking for such on my own, but a link here might be faster than my own search.

The upgrade process will handle the steps it can from 3.3.0 to 4.0.1, but you’ll need to read the breaking changes from each step in between. i.e. have a look at the each of the major release notes.

This should be reported at the end of the apt upgrade, but always best to know before you upgrade.

1 Like