OpenHAB no longer working after upgrade

It would have done that, too if properly used as recommended i.e. using menu 03.

2 Likes

It appears as though openhab has screwed my system. I had no choice but to upgrade via apt to get other updates. Buit, apparently, openhab is not able to handle (why is it even updatable via apt then?). I can’t upgrade to jdk17 because I’m on

Linux version 5.10.103-v7l+ (dom@buildbot) (arm-linux-gnueabihf-gcc-8 (Ubuntu/Linaro 8.4.0-3ubuntu1) 8.4.0, GNU ld (GNU Binutils for Ubuntu) 2.34) #1529 SMP Tue Mar 8 12:24:00 GMT 2022

which apparently is not compatible with either jdk17 or openhab 4 (again, why did it upgrade it if wasn’t compatible).

So unless someone sees anything above that is incorrect, how do I revert back to openhab 3 without loosing all my settings?

Okay. Luckly, I upgrade the openhabian OS and the was able to install JRE 17 and now it works. Two things should be looked at to prevent somebody else from encountering this:

  • Don’t register for update via apt
  • If 1 isn’t fixed, Fix documentation to make it clear that JRE 17 will NOT be intalled this route.

Better for 1 to be fixed.

There’s a lot wrong with what you’re saying here.
Noone and none of the docs said installing openhab via apt would install Java or do anything but install/upgrade the openHAB package.
And if on openHABian, to upgrade you should not be using apt but the proper menu option.

And if the below means you’re really using openHABian on Ubuntu then you’ve fully messed it up yourself.
Openhabian is not supported on Ubuntu as clearly state the docs.

Noone and none of the docs said installing openhab via apt would install Java or do anything but install/upgrade the openHAB package.

As show in previous messages, in at least two places the documentation (initial install and release notes) says it will

openHABian will automatically install Java 17 during the upgrade.

Show me a link where it says apt won’t do that; I may have missed that line.

The upgrade section from version 2 to 4 specifically says to use apt to do the upgrading.

My initial install (several years ago) used the openHabian image. The new instructions can be found here (option 1). The linux version shown above is what is a result of that install plus the upgrades over the years. Not to mention the documentation mentions Ubuntu all through it; if it isn’t supported, it should be removed. Did you also notice that the like provided also gives an option for install using apt?

I reiterate:

Two things should be looked at to prevent somebody else from encountering this:

  • Don’t register for update via apt
  • If 1 isn’t fixed, Fix documentation to make it clear that JRE 17 will NOT be installed this route.

Better for 1 to be fixed.

That would have prevented the grief I encountered. At minimum, if an update is attempted, it should fail and not leave the system unusable.

There is no such section on upgrades from OH2 to OH4.
Show the link.

All the quotes the others have given here are from the official openHABian docs or openHABian section of the Release Notes.
NONE of those did nor will ever tell to use apt at all yourself.
OpenHABian is a menu driven system it’s made that you don’t have to use apt.

Anything else is just a (false) interpretation of yours.

No. THE official openHABian docs definitely do NOT mention Ubuntu other than with the clear statement that it is NOT supported. It never ever was.

Reading and respecting the (right) docs rather than making assumptions would have.

I have the feeling you have either a fundamental misunderstanding of what openHABian is versus what openHAB itself is, or you have been using some wrong docs or misreading the right ones.

Rather than just refer to those please give the exact links here.

I’ll adjust the thread title and solution tick, too, as they’re misleading to readers.
Next time please also mind the posting rules below and clarify right in the original post what system you are using and what’s the proper context required for any reader to apply to understand your post.

How to ask a good question / Help Us Help You - Tutorials & Examples - openHAB Community

That links talks about Ubuntu, apt and upgrading fron OH2.

Changing the solution will only mislead others as that WAS the solution for me.

It looks like you are mixing up openHABian and openHAB. The first section discusses openHABian but everything else (apt and rpm based distributions) is openHAB on anything but openHABian.

Exactly. @edwolfe3 you misread those docs.

The solution tick isn’t there to document your outcome, it’s there to provide others a hint what they might want to try when they are in about the same situation as you and face about the same problem.
That now obviously doesn’t apply here.

I know yhe difference between openhabian and openhab. I think you are completly wrong and i stand by my solution.

The documentation isn’t clear that apt should not be used. If it shouldnt be used why does it let me? Why didn’t openhab at least stop the upgrade when it detected the envireonment wasn’t right capabke of running the upgrade?

The solution tick isn’t there to document your outcome, it’s there to provide others a hint what they might want to try when they are in about the same situation as you and face about the same problem.

The difference?

When i used apt to update other things, it updated openhab to v4 in an environment that did not support java 17. Therfore, i was unable to start the upgraded openhab server and was also unable to install java 17. Therefore MY SOLUTION BASED ON MY ISSUE was to upgrade ubuntu (which was setup using the original openhabian image). It then worked.

I know yhe difference between openhabian and openhab. I think you are completly wrong and i stand by my solution.

The documentation isn’t clear that apt should not be used.

This is very much a legitimate concern. I don’t think that the openhabian devs would any way be opposed to any PRs that improve on the documentation.

If it shouldnt be used why does it let me?

For a number of reasons (and I’m speaking as a non-openHABian user/developer):

  1. Because rolling your own packaging manager and distribution mechanism is a lot of work for no gain. It makes much more sense to use existing mechanisms and formats (such as apt/deb). It’s based on debian after all.
  2. There is little incentive to take away choice from end-users. The recommendation is “we strongly suggest you do it this way. If you don’t, you can, but you’re on your own”

Why didn’t openhab at least stop the upgrade when it detected the envireonment wasn’t right capabke of running the upgrade?

I’m not sure how openhab (the application) should prevent an OS level change.

The solution tick isn’t there to document your outcome, it’s there to provide others a hint what they might want to try when they are in about the same situation as you and face about the same problem.

The difference?

When i used apt to update other things, it updated openhab to v4 in an environment that did not support java 17. Therfore, i was unable to start the upgraded openhab server and was also unable to install java 17. Therefore MY SOLUTION BASED ON MY ISSUE was to upgrade ubuntu (which was setup using the original openhabian image). It then worked.

I think it’s very reasonable to assume that if you break things by using apt directly, you can also unbreak it by using apt. That however doesn’t mean that this is a solution that should be recommended. The recommendation is still to use the openhabian config tool, which if you do, do not get you into this mess.

And I’m saying that this is NOT clear in the documentation, but that aside, I wasn’t even trying to upgrade openhab when this happened. I was just trying to keep my system updated which then upgraded openhab and cause the problem. That would be the reason to create a custom package manager that doesn’t allow the update; maybe just put a warning that says openhab is not going to be updated use this other option instead.

I stand by openhab updating when it shouldn’t have caused my problem and the solution was to upgrade to a version of the OS that allowed me to get out of the mess OH created.

To prevent this from happening I think different package names e.g. openhab4, openhab5 like openjdk11, openjdk17 would be required. Going from one to an other version the package name explicitly needs to be changed.
But I assume this has other drawbacks.

1 Like

That was an openhabian distribution (iso) downloaded from a link on this page which was the current at the time. The command cat /proc/version shows ubuntu. So if ubuntu isnt supported why is openhabian using it as its base that is linked from yhe download oage and why does the documentation show commands for an ubuntu base?

Of course. While I decidedly disagree with the claim that it’s unclear and quite some more of what @edwolfe807 is saying here, we (devs) all welcome any improvement at any time.

Use the link at the bottom of the web page to edit and improve in place. Or for openHABian create your pull request against this file, mind the guidelines.

1 Like

cat /proc/version doesn’t show the name of the Linux distro, it’s AFAIK just what system was used to build the kernel (which isn’t necessarily the same as the target system, even my recently setup test box shows that).
So if you used the SD image (not ISO) - you never stated that before, just like you didn’t state the hardware - you have probably never been running Ubuntu. Duh.

The docs show apt install commands because on a real Ubuntu or other Linux you can use apt to install openHAB.
But that has NOTHING to do with openHABian then.
That’s the part you still have not understood.

While I’m positive I would be an asset with my 40+ years of development, I am swamped with paid jobs at the moment. I’ll keep this in mind for when I have some free time.

So, just to be clear, your repeated claim of

is incorrect?

The part you still don’t understand is that using a perfect legitimate system command, apt, screwed up the system because of openhab. That should not happen.

Please use

cat /etc/os-release

to identify the OS of your system.

When you downloaded it from the link you posted it should show stretch/buster/bullseye or an other member of the Debian family.

Upfront: mind the forum rules, no cross-posting.
I moved this discussion back here where it belongs.

Not at all.
Ubuntu is not supported nor it ever was.
Seems you never have been running Ubuntu. But it was you to claim that not me.

Plus, you misunderstand the term “supported”.
The fact that some system works or seems to is not the same as that it’s supported which means that vendors or in this case maintainers state that it should work, that they have verified it to work at least to some proper extent and that (at least in principle) they are willing to help i.e. support users when those have problems running it. Not supported does not mean it does not work. It means they’re not willing to help you with that.

:roll_eyes: Nope, this is part of what you still don’t understand:
apt is NOT a “perfect legitimate system command” to use on openHABian for the purpose of upgrading the system.
Read this part of the docs again (you should have before use).
https://www.openhab.org/docs/installation/openhabian.html#befair
And no, your statement shows you have not understood the relation and difference of openHABian and openHAB.