OH4 not starting after upgrade

My setup:
Raspi 4
Openhabian (bullseye)

I have just upgraded my Openhab from version 3 to version 4. Now the start fails with the following exception:

2023-07-24 08:13:33.251 [ERROR] [af.features.internal.service.BootFeaturesInstaller] - Error installing boot features
org.apache.felix.resolver.reason.ReasonException: Unable to resolve root: missing requirement [root] osgi.identity; osgi.identity=openhab-runtime-base; type=karaf.feature; version="[4.0.0,4.0.0]"; filter:="(&(osgi.identity=openhab-runtime-base)(type=karaf.feature)(version>=4.0.0)(version<=4.0.0))" [caused by: Unable to resolve openhab-runtime-base/4.0.0: missing requirement [openhab-runtime-base/4.0.0] osgi.identity; osgi.identity=openhab-core-base; type=karaf.feature [caused by: Unable to resolve openhab-core-base/4.0.0: missing requirement [openhab-core-base/4.0.0] osgi.identity; osgi.identity=org.openhab.core.config.core; type=osgi.bundle; version="[4.0.0,4.0.0]"; resolution:=mandatory [caused by: Unable to resolve org.openhab.core.config.core/4.0.0: missing requirement [org.openhab.core.config.core/4.0.0] osgi.wiring.package; filter:="(&(osgi.wiring.package=org.openhab.core.common.registry)(version>=4.0.0)(!(version>=5.0.0)))" [caused by: Unable to resolve org.openhab.core/4.0.0: missing requirement [org.openhab.core/4.0.0] osgi.ee; filter:="(&(osgi.ee=JavaSE)(version=17))"]]]]
	at org.apache.felix.resolver.Candidates$MissingRequirementError.toException(Candidates.java:1341) ~[org.eclipse.osgi-3.18.0.jar:?]
	at org.apache.felix.resolver.ResolverImpl.doResolve(ResolverImpl.java:433) ~[org.eclipse.osgi-3.18.0.jar:?]
	at org.apache.felix.resolver.ResolverImpl.resolve(ResolverImpl.java:420) ~[org.eclipse.osgi-3.18.0.jar:?]
	at org.apache.felix.resolver.ResolverImpl.resolve(ResolverImpl.java:374) ~[org.eclipse.osgi-3.18.0.jar:?]
	at org.apache.karaf.features.internal.region.SubsystemResolver.resolve(SubsystemResolver.java:256) ~[?:?]
	at org.apache.karaf.features.internal.service.Deployer.deploy(Deployer.java:399) ~[?:?]
	at org.apache.karaf.features.internal.service.FeaturesServiceImpl.doProvision(FeaturesServiceImpl.java:1069) ~[?:?]
	at org.apache.karaf.features.internal.service.FeaturesServiceImpl.lambda$doProvisionInThread$13(FeaturesServiceImpl.java:1004) ~[?:?]
	at java.util.concurrent.FutureTask.run(Unknown Source) ~[?:?]
	at java.util.concurrent.ThreadPoolExecutor.runWorker(Unknown Source) ~[?:?]
	at java.util.concurrent.ThreadPoolExecutor$Worker.run(Unknown Source) ~[?:?]
	at java.lang.Thread.run(Unknown Source) ~[?:?]

Looks like there’s a problem with Java 17. Tried to install Java 17 from (updated) openhabian-config, but ended with an error:

$ apt-get install --yes -o DPkg::Lock::Timeout= openjdk-17-jre-headless 
+ apt-get install --yes -o DPkg::Lock::Timeout= openjdk-17-jre-headless
Reading package lists... Done
Building dependency tree       
Reading state information... Done
Some packages could not be installed. This may mean that you have
requested an impossible situation or if you are using the unstable
distribution that some required packages have not yet been created
or been moved out of Incoming.
The following information may help to resolve the situation:

The following packages have unmet dependencies:
 openjdk-17-jre-headless : Depends: libc6 (>= 2.29) but 2.28-10+rpt2+rpi1+deb10u2 is to be installed
                                           Depends: libgcc-s1 (>= 3.5) but it is not installable

So I tried to install “libgcc-s1” manual but (not unexpected) failed also:

openhabian@ohab:/etc/apt/sources.list.d $ sudo apt-get install libgcc-s1
Reading package lists... Done
Building dependency tree       
Reading state information... Done
Package libgcc-s1 is not available, but is referred to by another package.
This may mean that the package is missing, has been obsoleted, or
is only available from another source

E: Package 'libgcc-s1' has no installation candidate

Now I’m a bit lost. Any hint where to look at to find (and resolve) the problem?

Try adding this repo in /etc/apt/sources.list.d/raspi.list (or any other .list)

deb [trusted=yes] http://mirrors.ocf.berkeley.edu/raspbian/raspbian bullseye main

Hello @mstormi ,
Thank you for your answer.

I tried, but had the same result. But I found out that, even if I was quite sure, that I have buster running, and not bullseye. Sorry for the wrong information. Could this be the source of the issues? I have tried both

deb [trusted=yes] http://mirrors.ocf.berkeley.edu/raspbian/raspbian bullseye main

and also

deb [trusted=yes] http://mirrors.ocf.berkeley.edu/raspbian/raspbian buster main

but the results stayed the same.

As a next step I have re-created my Openhab with the latest Openhabian image and restored my backup.
In general it worked perfectly well, Java 17 and everything is there, but I got stuck with another issue with the Enocean Add-On, which is not able to connect to the USB300 Enocean stick, which is also mentioned in EnOcean USB300 initialization fails with OH 4.0.0.M3 and OH 4.0.0.#3512

So, finally, I switched back to Openhab 3.4.4 (runs like a charm) and need to find a solution later, but I doubt I find the time before the weekend.

thank you I was having the same issue with Java 17 not installing on upgrade. I did what you had tried but I prefixed it with sudo and it fixed it :slight_smile:

This topic was automatically closed 41 days after the last reply. New replies are no longer allowed.