Hello,
I have been running openHAB 2.5.0-1 (Release Build) on a Raspberry for some time.
Release: Raspbian GNU / Linux 10 (buster)
Kernel: Linux 4.19.75-v7 +
Platform: Raspberry Pi 3 Model B Rev 1.2
However, OPENHAB has been down for a few days.
No more access to the RasPI. Tried everything. The RasPI can no longer be started from the micro SD. The SD card was also not readable by a normal PC. Micro SD was broken. I then used an older backup and was able to start the Raspberry with a new micro SD. The startup process shows no problems. But there is a problem with the openhab2.service. OpenHAB cannot be activated, see the following error:
[21:20:24] openhabian@openhab:~$ sudo systemctl status openhab2.service
openhab2.service - openHAB 2 - empowering the smart home
Loaded: loaded (/usr/lib/systemd/system/openhab2.service; enabled; vendor preset: enabled)
Active: activating (auto-restart) (Result: exit-code) since Wed 2020-10-21 21:26:57 CEST; 267ms ago
Docs: https://www.openhab.org/docs/
https://community.openhab.org
Process: 6536 ExecStart=/usr/share/openhab2/runtime/bin/karaf ${OPENHAB_STARTMODE} (code=exited, status=2)
Main PID: 6536 (code=exited, status=2)
Openhab Service remains constantly in the status: activating (auto-restart)
I did some browsing in the forum and started a query that contained the following errors:
sudo journalctl -u openhab2.service -b
[sudo] password for openhabian:
Oct 20 20:25:32 openhab karaf[1362]: Error: could not find libjava.so
Oct 20 20:25:32 openhab karaf[1362]: Error: Could not find Java SE Runtime Environment.
Oct 20 20:25:32 openhab systemd[1]: openhab2.service: Main process exited, code=exited, status=2/INVALIDARGUMENT
Oct 20 20:25:32 openhab systemd[1]: openhab2.service: Failed with result ‘exit-code’.
Oct 20 20:25:37 openhab systemd[1]: openhab2.service: Service RestartSec=5s expired, scheduling restart.
Oct 20 20:25:37 openhab systemd[1]: openhab2.service: Scheduled restart job, restart counter is at 5.
Oct 20 20:25:37 openhab systemd[1]: Stopped openHAB 2 - empowering the smart home.
Oct 20 20:25:37 openhab systemd[1]: Started openHAB 2 - empowering the smart home.
Oct 20 20:25:38 openhab karaf[1434]: /usr/share/openhab2/runtime/bin/karaf: 247: [: Illegal number:
Oct 20 20:25:38 openhab karaf[1434]: /usr/share/openhab2/runtime/bin/karaf: 247: [: Illegal number:
Oct 20 20:25:38 openhab karaf[1434]: /usr/share/openhab2/runtime/bin/karaf: 95: [: Illegal number:
Oct 20 20:25:38 openhab karaf[1434]: /usr/share/openhab2/runtime/bin/karaf: 296: [: Illegal number:
Oct 20 20:25:38 openhab karaf[1434]: Error: could not find libjava.so
Oct 20 20:25:38 openhab karaf[1434]: Error: Could not find Java SE Runtime Environment.
Oct 20 20:25:38 openhab systemd[1]: openhab2.service: Main process exited, code=exited, status=2/INVALIDARGUMENT
Oct 20 20:25:38 openhab systemd[1]: openhab2.service: Failed with result ‘exit-code’.
Oct 20 20:25:43 openhab systemd[1]: openhab2.service: Service RestartSec=5s expired, scheduling restart.
Oct 20 20:25:43 openhab systemd[1]: openhab2.service: Scheduled restart job, restart counter is at 6.
Oct 20 20:25:43 openhab systemd[1]: Stopped openHAB 2 - empowering the smart home.
Oct 20 20:25:43 openhab systemd[1]: Started openHAB 2 - empowering the smart home.
Oct 20 20:25:43 openhab karaf[1507]: /usr/share/openhab2/runtime/bin/karaf: 247: [: Illegal number:
Then I tried to determine the Java version, but there is another error.
Apparently Java is missing here or parts of it. Can’t explain to me why this error exists despite the backup.
[21:44:23] openhabian@openhab:~$ sudo java -version
[sudo] password for openhabian:
Error: could not find libjava.so
Error: Could not find Java SE Runtime Environment.
Does anyone have any advice, need help with the problem.
Thanks in advance!