Karaf is logging correctly, but when entering a command in console, it fails to save the history of commands with:
2022-01-24 11:25:00.506 [WARN ] [org.jline ] - Failed to save history
java.nio.file.AccessDeniedException: /var/lib/openhab2/.karaf/karaf.history
For some reason karaf still tries to save history to the wrong directory. The dir permissions for /var/lib/openhab are for openhab, and /var/lib/openhab2 is set as root. I would rather just change the pointer to the correct directory than change permissions to an otherwise empty directory.
Is there a karaf config file that can be modified to correct this location?
Apparently the issue was reported some time back…
Migrating from OH2.3 on Raspbian stretch to OH3.4.2-1, using apt install, I’m slowly tracking inconsistencies. And as the OP, I got this issue too and applied the proposed solution in
It works, but sadly it’s just a workaround, it doesn’t explain in first place which file the key is (still) initiated from.
In the same way I found that in karaf env (but not in the shell env) “openhab2” still remains :
Any clue for where it come from? I couldn’t find it in $OPENHAB_USERDATA files, nor in \etc
I manually removed the remaining openhab2 folders and will check if some error arise in /var/log.