Two days ago Openhab stopped working. I restarted the Rpi and found following message in daemon.log
Nov 17 06:20:10 openhabHost systemd[1]: Started openHAB - empowering the smart home.
Nov 17 06:20:10 openhabHost systemd[1]: Started Frontail openHAB instance, reachable at http://openhabHost:9001.
Nov 17 06:20:10 openhabHost karaf[11813]: /usr/share/openhab/runtime/bin/karaf: 247: [: Illegal number:
Nov 17 06:20:10 openhabHost karaf[11813]: /usr/share/openhab/runtime/bin/karaf: 247: [: Illegal number:
Nov 17 06:20:10 openhabHost karaf[11813]: /usr/share/openhab/runtime/bin/karaf: 97: [: Illegal number:
Nov 17 06:20:10 openhabHost karaf[11813]: /usr/share/openhab/runtime/bin/karaf: 300: [: Illegal number:
Nov 17 06:20:10 openhabHost karaf[11813]: -Djava.endorsed.dirs=/usr/lib/jvm/java-11-openjdk-armhf/jre/lib/endorsed:/usr/lib/jvm/java-11-openjdk-armhf/lib/endorsed:/usr/share/openhab/runtime/lib/endorsed is not supported. Endorsed standards and standalone APIs
Nov 17 06:20:10 openhabHost karaf[11813]: in modular form will be supported via the concept of upgradeable modules.
Nov 17 06:20:10 openhabHost karaf[11813]: Error: Could not create the Java Virtual Machine.
Nov 17 06:20:10 openhabHost karaf[11813]: Error: A fatal exception has occurred. Program will exit.
Nov 17 06:20:10 openhabHost systemd[1]: openhab.service: Main process exited, code=exited, status=1/FAILURE
Nov 17 06:20:10 openhabHost systemd[1]: openhab.service: Failed with result 'exit-code'.
A system update through openhab-config did not help, same error.
Any idea on how to solve this? I hope anybody can help - it is winter in Germany, no OH no heating
Same error messages were displayed in an other case. In that one java was installed for the wrong archtitecture.
You just mentioned that openhab stoppped working two days ago.
Did you do any changes to the system before this happened like a system update using openhabian-config ?
openhabian@openhabHost:~ $ java --version
Error occurred during initialization of VM
java/lang/ClassFormatError: Unknown constant tag 97 in class file java/lang/Throwable
openhabian@openhabHost:~ $
openhabian@openhabHost:~ $ ldd /usr/bin/java
linux-vdso.so.1 (0xbefb7000)
/usr/lib/arm-linux-gnueabihf/libarmmem-${PLATFORM}.so => /usr/lib/arm-linux-gnueabihf/libarmmem-v7l.so (0xb6f9c000)
libjli.so => not found
libc.so.6 => /lib/arm-linux-gnueabihf/libc.so.6 (0xb6e48000)
/lib/ld-linux-armhf.so.3 (0xb6fb1000)
openhabian@openhabHost:~ $ readlink -f /usr/bin/java
/usr/lib/jvm/java-11-openjdk-armhf/bin/java
openhabian@openhabHost:~ $ dpkg -l |grep -i java
ii ca-certificates-java 20190909 all Common CA certificates (JKS keystore)
ii java-common 0.72 all Base package for Java runtimes
ii javascript-common 11+nmu1 all Base support for JavaScript library packages
ii libjs-jquery 3.5.1+dfsg+~3.5.5-7 all JavaScript library for dynamic web applications
ii libjs-sphinxdoc 3.4.3-2 all JavaScript support for Sphinx documentation
ii libjs-underscore 1.9.1~dfsg-3 all JavaScript's functional programming helper library
ii nodejs 16.18.1-deb-1nodesource1 armhf Node.js event-based server-side javascript engine
ii openjdk-11-jre-headless:armhf 11.0.16+8-1~deb11u1 armhf OpenJDK Java runtime, using Hotspot JIT (headless)
openhabian@openhabHost:~ $
I saw a few msg around libjli missing, but I am not sure if they are relevant for me, since all related to older OH versions…
Ok, intestesting, I would not even know where to change them.
How could I have messed with them? Misuse of openhabian-config? Or when importing OH-2.5 configuration (through the restore option in openhabian-config)? Understanding that would avoid another post in the future
To be honest, I am quite used to Linux, but I am now a Java expert so I am quite blind on how OH works…
Given noone knows what’s different on your system vs a standard one - no.
Sure you can try whatever you like to, but given a reinstall was recommended as the best (and fastest) solution, don’t expect anyone to help/guide you in that. That’s a time sink.
The library should be included in package openjdk-11-jre-headless
I just manually downloaded the package from the related repository.
It should be located under /usr/lib/jvm/java-11-openjdk-armhf/lib/jli/libjli.so
If not already done try to reinstall the openjdk-11-jre-headless package.
You also can check if and which version of that package are in the cache of your disk:
Well, this might be true for an installation w/o some tweaks like socat, etc… with additional scripts and services I need to create again from my documentation
I need to check btw why the SD copy did not work, this is supposed to work straight as swapped, right?