Suddenly unable to access openHAB

Ok, thanks for the reply, I will try 3.4.4, currently I have this:

openhabian@openhab:~ $ sudo apt-cache search openhab
openhab-addons - openhab-addons
openhab - openhab
openhab2-addons - openhab2-addons
openhab2-addons-legacy - openhab2-addons-legacy
openhab2 - openhab2

openhabian@openhab:~ $ sudo apt search openhab
Sorting… Done
Full Text Search… Done
openhab/stable,now 4.0.0-1 all [installed]
openhab

openhab-addons/stable,now 4.0.0-1 all [installed]
openhab-addons

openhab2/stable 2.5.12-1 all
openhab2

openhab2-addons/stable 2.5.12-1 all
openhab2-addons

openhab2-addons-legacy/stable 2.5.3-1 all
openhab2-addons-legacy

So I will try to stick to 3.4.4, I assume I need to do this with the addons also?

Edit: That one does not work:

openhabian@openhab:~ $ sudo apt-mark hold openhab-3.4.4
E: Unable to locate package openhab-3.4.4

Actually, it looks like 3.4.5 was just released.

Use apt-cache showpkg openhab

I don’t know if the add-ons need to be installed or not. If it is then OH I think doesn’t download from the internet when installing add-ons and instead grabs it from the installed package. If you’ve installed the add-ons package, you’ll probably want to fix that package too.

1 Like

Ok, it seems I managed to get it run :grinning:
First I downgraded openhab:

openhabian@openhab:~ $ sudo apt-get install openhab=3.4.5-1
Reading package lists… Done
Building dependency tree
Reading state information… Done
The following packages were automatically installed and are no longer required:
raspi-gpio raspinfo
Use ‘sudo apt autoremove’ to remove them.
The following held packages will be changed:
openhab
The following packages will be DOWNGRADED:
openhab
0 upgraded, 0 newly installed, 1 downgraded, 0 to remove and 21 not upgraded.
Need to get 104 MB of archives.
After this operation, 129 kB of additional disk space will be used.
Do you want to continue? [Y/n]

Then the same with openhab-addons:

openhabian@openhab:~ $ sudo apt-get install openhab-addons=3.4.5-1
Reading package lists… Done
Building dependency tree
Reading state information… Done
The following packages were automatically installed and are no longer required:
raspi-gpio raspinfo
Use ‘sudo apt autoremove’ to remove them.
The following packages will be DOWNGRADED:
openhab-addons
0 upgraded, 0 newly installed, 1 downgraded, 0 to remove and 22 not upgraded.
Need to get 378 MB of archives.
After this operation, 15.4 MB disk space will be freed.
Do you want to continue? [Y/n]
Get:1 JFrog stable/main armhf openhab-addons all 3.4.5-1 [378 MB]
Fetched 378 MB in 1min 1s (6,233 kB/s)
dpkg: warning: downgrading openhab-addons from 4.0.0-1 to 3.4.5-1
(Reading database … 63738 files and directories currently installed.)
Preparing to unpack …/openhab-addons_3.4.5-1_all.deb …
Unpacking openhab-addons (3.4.5-1) over (4.0.0-1) …
Setting up openhab-addons (3.4.5-1) …
Updating FireMotD available updates count …

Then I set both on hold:

openhabian@openhab:~ $ sudo apt-mark hold openhab
openhab set on hold.
openhabian@openhab:~ $ sudo apt-mark hold openhab-addons
openhab-addons set on hold.
openhabian@openhab:~ $ sudo apt-mark showhold
openhab
openhab-addons

Now everything works fine again, thanks a lot! :+1:

3 Likes

Worked for me too:

Just mark your openHAB version hold to prevent apt from upgrading it.

Yes, I didn’t mention

sudo apt-mark hold openhab

Do I have to repeat this after every new start of the system?

No!

The same upgrade to 4.0 happened to me. I followed Panicman’s advice, but no joy. In final desperation, I went to my backup “tapes” from a week earlier and restored all openhab directories. That worked. Then I locked version 3.4 down as per Panicman’s advice.

Worked for me too! At the beginning of the week, I went to do my usual update and suddenly found myself going from 3.4.5 to 4.0.2 and the system stopped working. Thanks to Rich Koshak and thanks to you for posting your solution steps here. Got my system back up and running again. :pray: Will now put my OH3 production systems on hold to prevent this from happening on them!

Unfortunately it didn’t remember „on hold“ after reboot

Update:
I have to correct my message. It happened after the manually update from 3.4.4-2 to 3.4.5-1
To avoid this in the future I have written a system script to run the hold statement before starting a weekly script to automatically run an system update.

1 Like