Actually it starts but Karaf do not start with the following error message:
KARAF_BASE is not valid: /usr/share/openhab2/userdata
Infact in openhabian KARAF_BASE should point to /srv/openhab2-userdata or /var/lib/openhab2
So I imagine that the command clean-cache messed up the KARAF directories settings.
I already tried to reboot, delete manually the cache and tmp.
I even tried to set manually the KARAF_BASE variable, but it didin’t change:
[17:26:50] openhabian@openHABianPiVarazze:/srv$ export KARAF_BASE=/var/lib/openhab2
[17:27:15] openhabian@openHABianPiVarazze:/srv$ sudo /usr/share/openhab2/runtime/bin/karaf start
mkdir: cannot create directory ‘/usr/share/openhab2/userdata/tmp’: No such file or directory
KARAF_BASE is not valid: /usr/share/openhab2/userdata
It means that the KARAF_BASE is set somewhere else at a higher level.
I eventually managed to get the system working again without reinstalling it.
I don’t know exactly what solved the issue, but after running the following comands from inside openhabian config menu it worked again:
“40 OpenHab related” -> “Default order”
“60 Manual/Fresh Setup” -> “65 System Tweaks”
Then I rebooted and waited 15-20 minutes.
Then I rebooted again and it worked as usual.
Maybe @ThomDietrich can give an explanation of what could have happened and why the above commands solved the issue?