OH3 not starting after update (code=exited, status=2)

Hi All,
I am very longtime Domotica Enthusiasts and therfore enthusiastic OH2.5 user.I just started with OH3. First of all, Its looks great.
I installed OH3 on a new hyper-V VM with the latest Debian and used the manual openhabian installation. I copied al the config files (about 120 Things, 800 items) from the OH2.5 and after some configuration adjustments for the semantic model. Everything was working fine and I started to build pages.
I always let openhabian-config do the updates but it is giving error now . *(There was an error or interruption during the execution of: │ “02 | Upgrade System” ).
I did some research, and

Sudo systemctl status openhab

give me a Process: 31341 ExecStart=/usr/share/openhab/runtime/bin/karaf ${OPENHAB_STARTMODE} (code=exited, status=2)
Main PID: 31341 (code=exited, status=2)

I have done I new clean install on a separate VM but have the same Issue.
Does somebody have an Idea where to look.
Thanks, (OH25 is still running fine)
Hans

Hi Hans, welcome to the community forum!

There may be more of a hint using the command:

sudo journalctl -u openhab -b

There should be some indicators near the bottom of the file, can you see anything that might suggest what’s wrong?

Hi Ben,
Thanks for the response.
I found this in the journalctl:

Jan 28 22:40:11 openhabian systemd[1]: Started openHAB - empowering the smart home.
Jan 28 22:40:11 openhabian karaf[26382]: /usr/share/openhab/runtime/bin/karaf: 247: [: Illegal number:
Jan 28 22:40:11 openhabian karaf[26382]: /usr/share/openhab/runtime/bin/karaf: 247: [: Illegal number:
Jan 28 22:40:11 openhabian karaf[26382]: /usr/share/openhab/runtime/bin/karaf: 95: [: Illegal number:
Jan 28 22:40:11 openhabian karaf[26382]: /usr/share/openhab/runtime/bin/karaf: 301: [: Illegal number:
Jan 28 22:40:11 openhabian karaf[26382]: /usr/share/openhab/runtime/bin/karaf: 337: exec: /usr/bin/java: Exec format error
Jan 28 22:40:11 openhabian systemd[1]: openhab.service: Main process exited, code=exited, status=2/INVALIDARGUMENT
Jan 28 22:40:11 openhabian systemd[1]: openhab.service: Failed with result ‘exit-code’.

On a other topic i found it has something to do with java.

Java -version

gives an error, I will look into that tomorrow, thanks.

I found the solution, it turned out to be a wrong java version, 32 bit instead of 64. How this happened is not clear to me.

sudo update-alternatives --config jav

I needed : /usr/lib/jvm/java-11-openjdk-amd64/bin/java

1 Like