Karaf console not working


I’m using OpenHAB 2.5.11-1 on a Pi4 using Openhabian. I recently upgraded my installation to OH3 and then downgraded again to Openhab 2.

I noticed that the Karaf Console doesn’t work anymore. “Openhab-cli console” returns the following:

/usr/bin/openhab-cli: 107: /usr/bin/openhab-cli: /usr/share/openhab/runtime/bin/client: not found

Looks like the “Openhab-cli console” command is now pointing to the directory used by OH3.

Anyway this can be fixed so that the command points to the right directory again? I gues it should be this one:

I can see the client file in this directory.

I checked i i can changed some config files. But could not find anything relevant in this file : org.apache.karaf.shell.cfg Controls most console setting


I would suggest to do a backup of your configuration and do a fresh install.
In case you would like to try to fix your existing installation you can use the following command line to search for files containing the string /openhab/. The result should be a list of files except .jar files.

find /var/lib/openhab2/  -type f -exec grep -l /openhab/ {} \; |grep -v \.jar