[SOLVED] Update failed

Woops…not it happened to me. Just did a upgrade with openhabian-config and now my system is dead.

Jan 24 21:47:59 openhabianpi systemd[1]: openhab.service: Service RestartSec=5s expired, scheduling restart.
Jan 24 21:47:59 openhabianpi systemd[1]: openhab.service: Scheduled restart job, restart counter is at 5.
Jan 24 21:47:59 openhabianpi systemd[1]: Stopped openHAB instance, reachable at http://openhabianpi:8080.
Jan 24 21:47:59 openhabianpi systemd[1]: Started openHAB instance, reachable at http://openhabianpi:8080.
Jan 24 21:47:59 openhabianpi karaf[2199]: /usr/share/openhab/runtime/bin/karaf: 247: [: Illegal number:
Jan 24 21:48:00 openhabianpi karaf[2199]: /usr/share/openhab/runtime/bin/karaf: 247: [: Illegal number:
Jan 24 21:48:00 openhabianpi karaf[2199]: /usr/share/openhab/runtime/bin/karaf: 97: [: Illegal number:
Jan 24 21:48:00 openhabianpi karaf[2199]: /usr/share/openhab/runtime/bin/karaf: 300: [: Illegal number:
Jan 24 21:48:00 openhabianpi karaf[2199]: /usr/bin/java: error while loading shared libraries: libjli.so: cannot open shared object file: No such file or directory

Any solution on this topic?

Jan 24 16:51:30 openHABianPi systemd[1]: **openhab.service: Control process exited, code=exited status=127**

Jan 24 16:51:30 openHABianPi systemd[1]: **openhab.service: Unit entered failed state.**

Jan 24 16:51:30 openHABianPi systemd[1]: **openhab.service: Failed with result 'exit-code'.**

Jan 24 16:51:35 openHABianPi systemd[1]: openhab.service: Service hold-off time over, scheduling restart.

Jan 24 16:51:35 openHABianPi systemd[1]: Stopped openHAB - empowering the smart home.

Jan 24 16:51:35 openHABianPi systemd[1]: Started openHAB - empowering the smart home.

Jan 24 16:51:35 openHABianPi karaf[10579]: /usr/share/openhab/runtime/bin/karaf: 247: [: Illegal number:

Jan 24 16:51:35 openHABianPi karaf[10579]: /usr/share/openhab/runtime/bin/karaf: 247: [: Illegal number:

Jan 24 16:51:35 openHABianPi karaf[10579]: /usr/share/openhab/runtime/bin/karaf: 97: [: Illegal number:

Jan 24 16:51:35 openHABianPi karaf[10579]: /usr/share/openhab/runtime/bin/karaf: 300: [: Illegal number:

Jan 24 16:51:35 openHABianPi systemd[1]: **openhab.service: Main process exited, code=exited, status=127/n/a**

Jan 24 16:51:35 openHABianPi karaf[10650]: /usr/share/openhab/runtime/bin/karaf: 247: [: Illegal number:

Jan 24 16:51:35 openHABianPi karaf[10650]: /usr/share/openhab/runtime/bin/karaf: 247: [: Illegal number:

Jan 24 16:51:35 openHABianPi karaf[10650]: /usr/share/openhab/runtime/bin/karaf: 97: [: Illegal number:

Jan 24 16:51:35 openHABianPi karaf[10650]: /usr/share/openhab/runtime/bin/karaf: 300: [: Illegal number:

This is the output, over and over again…

Still nothing here, for me the quickest way was to restore a backup on another Pi.
The problem one is still running to see if we could fix it, just for learning purposes :slight_smile:

I guess there is something wrong with the openhabian-config 02 update option, I just run another check for updates and run everything, same thing happened again:

Jan 24 22:34:35 openhabian systemd[1]: **openhab.service: Main process exited, code=exited, status=127/n/a**

Jan 24 22:34:35 openhabian systemd[1]: **openhab.service: Failed with result 'exit-code'.**

Jan 24 22:34:40 openhabian systemd[1]: openhab.service: Scheduled restart job, restart counter is at 3.

Jan 24 22:34:40 openhabian systemd[1]: Stopped openHAB instance, reachable at http://openhabian:8080.

Jan 24 22:34:40 openhabian systemd[1]: Started openHAB instance, reachable at http://openhabian:8080.

Jan 24 22:34:41 openhabian karaf[985]: /usr/share/openhab/runtime/bin/karaf: 247: [: Illegal number:

Jan 24 22:34:41 openhabian karaf[985]: /usr/share/openhab/runtime/bin/karaf: 247: [: Illegal number:

Jan 24 22:34:41 openhabian karaf[985]: /usr/share/openhab/runtime/bin/karaf: 97: [: Illegal number:

Jan 24 22:34:41 openhabian karaf[985]: /usr/share/openhab/runtime/bin/karaf: 300: [: Illegal number:

Jan 24 22:34:41 openhabian karaf[985]: /usr/bin/java: error while loading shared libraries: libjli.so: cannot open shared object file: No such file or directory

@mstormi , please help us - it seems something happened with openHABian with regards of Java. Thank you!

I’m another person with the same problem. I have the same error as @Stehof . I have tried sudo apt-get reinstall zulu* but that hasn’t helped and also sudo apt-get install openjdk-11-jdk and restarted multiple times. Neither of those options worked.

Looks like an issue has been raised on GitHub:

2 Likes

Yea I tried the same commands, didn’t fixed it for me either…

See also here

Yea I saw it and tried it, still nothing yet… :frowning:

Sorry for the broken fix, it is up and working now.

3 Likes

Thanks again for this quick fix, just checked the logging and no problems whatsoever, everything is working great again! :slight_smile:

I hope the issue won’t accure again with this software package.

Thanks, works fine again.

I upgraded to 4.0.0. too, but openhab is not starting.
I read that Java 17 should be installed.
I started with
sudo openhabian-config update, chose
02 Upgrade system
and afterwards 45 OpenJDK 17 Install and activate OpenJDK 17 as Java provider
This produced the errormessage

2023-01-02_17:26:19_CET [openHABian] Reconfiguring OpenJDK 11... OK
2023-01-02_17:26:51_CET [openHABian] Updating Linux package information... OK
2023-01-02_17:26:54_CET [openHABian] Fetching OpenJDK 17... FAILED
2023-01-02_17:26:56_CET [openHABian] Installing OpenJDK 17... FAILED

java -version shows
openjdk version “11.0.16” 2022-07-19

[quote=“Wolfgang_S, post:18, topic:132175”]

  • what is the output of sudo systemctl status openhab
* openhab.service - openHAB - empowering the smart home
   Loaded: loaded (/lib/systemd/system/openhab.service; enabled; vendor preset: enabled)
  Drop-In: /etc/systemd/system/openhab.service.d
           `-override.conf
   Active: active (running) since Mon 2023-01-02 17:46:46 CET; 1min 27s ago
     Docs: https://www.openhab.org/docs/
           https://community.openhab.org
 Main PID: 929 (java)
    Tasks: 38 (limit: 4915)
   CGroup: /system.slice/openhab.service
           `-929 /usr/bin/java -XX:-UsePerfData -Dopenhab.home=/usr/share/openhab -Dopenhab.conf=/etc/openhab -Dopenhab.runtime=/usr/share/openhab/runt
Jan 02 17:47:17 Raspi karaf[929]:         ... 13 more
Jan 02 17:47:17 Raspi karaf[929]: Caused by: org.apache.felix.resolver.reason.ReasonException: Unable to resolve openhab-core-base/4.0.0.SNAPSHOT: missorg.openhab.core.automation; type=osgi.bundle; version="[4.0.0.202212302156,4.0.0.202212302156]"; resolution:=mandatory [caused by: Unable to resolve oJan 02 17:47:17 Raspi karaf[929]:         at org.apache.felix.resolver.Candidates$MissingRequirementError.toException(Candidates.java:1341)
Jan 02 17:47:17 Raspi karaf[929]:         ... 14 more
Jan 02 17:47:17 Raspi karaf[929]: Caused by: org.apache.felix.resolver.reason.ReasonException: Unable to resolve org.openhab.core.automation/4.0.0.2022Jan 02 17:47:17 Raspi karaf[929]:         at org.apache.felix.resolver.Candidates$MissingRequirementError.toException(Candidates.java:1341)
Jan 02 17:47:17 Raspi karaf[929]:         ... 15 more
Jan 02 17:47:17 Raspi karaf[929]: Caused by: org.apache.felix.resolver.reason.ReasonException: Unable to resolve org.openhab.core/4.0.0.202212302150: mJan 02 17:47:17 Raspi karaf[929]:         at org.apache.felix.resolver.Candidates$MissingRequirementError.toException(Candidates.java:1341)
Jan 02 17:47:17 Raspi karaf[929]:         ... 16 more
2023-01-02 17:47:17.155 [ERROR] [ternal.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.SNAPSHOT,4.0.0.SNAPSHOT]"; filter:="(&(osgi.identity=openhab-runtime-base)(type=karaf.feature)(version>=4.0.0.SNAPSHOT)(version<=4.0.0.SNAPSHOT))" [caused by: Unable to resolve openhab-runtime-base/4.0.0.SNAPSHOT: missing requirement [openhab-runtime-base/4.0.0.SNAPSHOT] osgi.identity; osgi.identity=openhab-core-automation-rest; type=karaf.feature [caused by: Unable to resolve openhab-core-automation-rest/4.0.0.S
NAPSHOT: missing requirement [openhab-core-automation-rest/4.0.0.SNAPSHOT] osgi.identity; osgi.identity=openhab-core-base; type=karaf.feature [caused b
y: Unable to resolve openhab-core-base/4.0.0.SNAPSHOT: missing requirement [openhab-core-base/4.0.0.SNAPSHOT] osgi.identity; osgi.identity=org.openhab.
core.automation; type=osgi.bundle; version="[4.0.0.202212302156,4.0.0.202212302156]"; resolution:=mandatory [caused by: Unable to resolve org.openhab.c
ore.automation/4.0.0.202212302156: missing requirement [org.openhab.core.automation/4.0.0.202212302156] osgi.wiring.package; filter:="(&(osgi.wiring.pa
ckage=org.openhab.core)(version>=4.0.0)(!(version>=5.0.0)))" [caused by: Unable to resolve org.openhab.core/4.0.0.202212302150: missing requirement [or
g.openhab.core/4.0.0.202212302150] osgi.ee; filter:="(&(osgi.ee=JavaSE)(version=17))"]]]]]
        at org.apache.felix.resolver.Candidates$MissingRequirementError.toException(Candidates.java:1341) ~[org.eclipse.osgi-3.17.200.jar:?]
        at org.apache.felix.resolver.ResolverImpl.doResolve(ResolverImpl.java:433) ~[org.eclipse.osgi-3.17.200.jar:?]
        at org.apache.felix.resolver.ResolverImpl.resolve(ResolverImpl.java:420) ~[org.eclipse.osgi-3.17.200.jar:?]
        at org.apache.felix.resolver.ResolverImpl.resolve(ResolverImpl.java:374) ~[org.eclipse.osgi-3.17.200.jar:?]
        at org.apache.karaf.features.internal.region.SubsystemResolver.resolve(SubsystemResolver.java:257) ~[?:?]
:
openhabian@Raspi:/var/log/openhab $ sudo netstat -tulpn | grep java  
tcp6       0      0 127.0.0.1:32991         :::*                    LISTEN      929/java

I installed Java 17.0.5.fx-librca following

with success, but after rebooting the same error

> 2023-01-02 18:16:30.010 [ERROR] [ternal.service.BootFeaturesInstaller] - Error installing boot features

shows up, but
java -version yields
openjdk version “11.0.16” 2022-07-19

Try:

sudo update-alternatives --config java

In case there are different versions of java installed you need to make sure that the version you would like to have in the ‘default’ PATH is made available using update-alternatives ( this tool creates links ).
See: man update-alternatives

sdk install java 17.0.5.fx-librca

yields
java 17.0.0f-librca is already installed.


sudo update-alternatives --config java

shows: Es gibt nur eine Alternative … java-11-openjdk-armhf/bin/java

But

java -version 

shows:
openJDK version “17.0.5” 2022-10-18 LTS

OpenJDK 32-bit Server VM ( …)
I am confused!

Do I have to edit /etc/bash.bashrc manually as described in
https://u-labs.de/portal/java-auf-dem-raspberry-pi-installieren-aktuelle-jre-laufzeitumgebung-jdk-z-b-java-17-kostenfrei-legal-2021/
If thats the case - how do I find the path of the java 17 version?

BTW: openhabian-config option 45 Install and activate OpenJDK as Java provider still not working

{Seems to be a typical Linux problem: Do an update && upgrade of a running system and get into a jungle of advices not able to leave in 2 days :)}

Try the following:

  • run java -version
  • in case it results in …17.0.5…
  • then run which java
  • the resulting output should show you the path where the binary is found
  • I do not know the way of how sdkman does installations … it could be that java is installed in a users directory. That would explain why update-alternatives does not find it

I am not aware of that this is a typical linux problem.
I rather would ask why changing that early to OH 4.0 ? OH 4.0 at this moment is in a very early phase which I woldn’t use in a production environment.

1 Like

I have the same problem at macos:

What ever I tried even upgrade to zulu jdk 17 the error message persists. openhab@macos never tried to load jdk17

Is the information of old installations somewhere openhab stored?
"Unable to find any JVMs matching version “11”.

but

java -version
openjdk version “17.0.8.1” 2023-08-24 LTS
OpenJDK Runtime Environment Zulu17.44+53-CA (build 17.0.8.1+1-LTS)
OpenJDK 64-Bit Server VM Zulu17.44+53-CA (build 17.0.8.1+1-LTS, mixed mode, sharing)

and
./start.sh
Launching the openHAB runtime…
Unable to find any JVMs matching version “11”.

.

Platform information: Macos
    Hardware: McMini
    OS: Catalina 10.15.7
    Java Runtime Environment: ?
    openHAB version: 4.1
    2,3 GHz Quad-Core Intel Core i7
Issue of the topic: installation failed
  • Where did you install zulu jdk ?
  • how did you install it ?
  • did you the update-alternatives tool ?
  • what is the result of which java and where java
  • not sure if that at the end will help but what is the output of sh -x ./start.sh
  • what is shown if you run at prompt where you execute ./start.sh: env | egrep -i "JAVA|JDK|JRE|LD_LIBRARY_PATH" ?