OpenHab UI not available after reboot - Java issues

Hey openhab community,

I am in the middle of re-setting-up my openhab 3 on a raspi 3 due to move to a new house.

Yesterday I restarted my openHAB instance and realized, that the UI is no longer available. However I can access the server via ssh.

I already did a few basic steps such as “clean-cache” and “fix permissions”. But the problem still persists.

I checked the status of openhab service and came across a few java errors mentioned in relation to karat console. So I went to /usr/share/openhab and ran bash

Here are the results:

openhabian@openhabian:/usr/share/openhab $ bash
Launching the openHAB runtime...
Listening for transport dt_socket at address: 5005 /var/lib/openhab/tmp/ (Keine Berechtigung)
        at java.base/ Method)
        at java.base/
        at java.base/<init>(
        at java.base/<init>(
        at org.apache.karaf.main.InstanceHelper.writePid(
        at org.apache.karaf.main.Main.launch(
        at org.apache.karaf.main.Main.main(
java.lang.RuntimeException: /var/log/openhab/openhab.log (Keine Berechtigung)
        at org.apache.karaf.main.util.BootstrapLogManager.getDefaultHandlerInternal(
        at org.apache.karaf.main.util.BootstrapLogManager.getDefaultHandlersInternal(
        at org.apache.karaf.main.util.BootstrapLogManager.getDefaultHandlers(
        at org.apache.karaf.main.util.BootstrapLogManager.configureLogger(
        at org.apache.karaf.main.Main.launch(
        at org.apache.karaf.main.Main.main(
Caused by: /var/log/openhab/openhab.log (Keine Berechtigung)
        at java.base/ Method)
        at java.base/
        at java.base/<init>(
        at org.apache.karaf.main.util.BootstrapLogManager$
        at org.apache.karaf.main.util.BootstrapLogManager$SimpleFileHandler.<init>(
        at org.apache.karaf.main.util.BootstrapLogManager.getDefaultHandlerInternal(
        ... 5 more
!SESSION 2022-03-24 07:28:04.281 -----------------------------------------------
BootLoader constants: OS=linux, ARCH=arm, WS=gtk, NL=de_DE

!ENTRY org.eclipse.osgi 4 0 2022-03-24 07:28:04.619
!MESSAGE Error reading configuration: /var/lib/openhab/cache/org.eclipse.osgi/.manager/.fileTableLock (Keine Berechtigung)
!STACK 0 /var/lib/openhab/cache/org.eclipse.osgi/.manager/.fileTableLock (Keine Berechtigung)
        at java.base/ Method)
        at java.base/
        at java.base/<init>(
        at java.base/<init>(
        at org.eclipse.osgi.internal.location.Locker_JavaNio.lock(
        at org.eclipse.osgi.storagemanager.StorageManager.lock(
        at org.eclipse.osgi.internal.framework.EquinoxContainer.<init>(
        at org.eclipse.osgi.launch.Equinox.<init>(
        at org.eclipse.osgi.launch.EquinoxFactory.newFramework(
        at org.eclipse.osgi.launch.EquinoxFactory.newFramework(
        at org.apache.karaf.main.Main.launch(
        at org.apache.karaf.main.Main.main(

I am having troubles, as I am not an expert in java and also all openhab related stuff I learned “on the fly”. Hence I would appreciate any help to solve my issue and avoid any re-setup.

Thanks upfront to this awesome community.

Could you do

ls -ld /var/log/openhab /var/log/openhab/openhab.log /var/lib/openhab/tmp/ /var/lib/openhab/cache/org.eclipse.osgi/.manager/.fileTableLock

according to the error message ( no permision / keine Berechtigung ) I assume that at least the last three are owned by root and not the user openhab:openhab.

Please run the above command to check this ‘theory’ then run fix permissions and afterwards the above command again to check that permissions are fixed.

Hi @Wolfgang_S,

thanks a lot for the quick reply. I ran a bit further down the road on this and came across the log folder being assigned to openhab:opehabian - which is in my view wrong. This should be openhab:openhab, correct?

So I ran openhab-cli reset-ownership as the fix permission in openhabian-config did not work out previously.

Currently the result of your request looks as follows:

-rw-r--r-- 1 openhab openhab    0 24. Mär 07:21 /var/lib/openhab/cache/org.eclipse.osgi/.manager/.fileTableLock
-rw-r--r-- 1 openhab openhab    4 24. Mär 07:44 /var/lib/openhab/tmp/
drwxrwxr-x 1 openhab openhab 4096 24. Mär 07:38 /var/log/openhab
-rw-r--r-- 1 openhab openhab    0 24. Mär 07:21 /var/log/openhab/openhab.log

To me, this looks okay now. Shall I give it a try and restart my RaspberryPi?

Adding to that, I now see, that the UI is back up. So it seems that the permission to the log file/folder were causing this issue.

Do I need to restart or do any further checks to make sure it is properly running?

openhab:openhabian shouldn’t have been the root cause. The owner openhab should be ok as the owner then has write permission. Permissions now are fine. Before the files were most probably owned by root ( can’t see that any longer as the before ls command was not done ) and thus user openhab was not able to write to that files.
Although it is not required you can do a full restart of the system then you are sure that everything works as expected.

Okay, I did that. But now it seems like all my discoveries have been removed. The log shows various errors.


2022-03-24 07:53:31.158 [INFO ] [openhab.event.InboxRemovedEvent     ] - Discovery Result with UID 'hue:group:ecb5fa1ee339:0' has been removed.
2022-03-24 08:05:34.828 [WARN ] [.transport.servlet.ServletController] - Can't find the request for's Observer 
2022-03-24 08:05:58.903 [ERROR] [core.karaf.internal.FeatureInstaller] - Failed installing 'openhab-binding-hue, openhab-binding-deconz, openhab-misc-openhabcloud, openhab-binding-network, openhab-binding-amazonechocontrol, openhab-binding-sonos, openhab-ui-habpanel, openhab-binding-miio, openhab-binding-nuki, openhab-persistence-rrd4j, openhab-binding-netatmo, openhab-ui-basic, openhab-binding-ntp, openhab-binding-openweathermap, openhab-binding-systeminfo': null

But now, everything is slowly starting to come back. Very strange. I get another regular error:

2022-03-24 08:18:07.158 [INFO ] [control.internal.WebSocketConnection] - Web Socket close 1005. Reason: null

Any thoughts on the above errors, the behavior that all disappeared and now is coming back or the socket error?