Everything lost? No PaperUI etc :-(

Upps, I modify my starting post, big sorry …
Try to restore …

I reboot my raspberry after 10 days without a restart, now the openHAB comes not up fine.
myIP:8080 only show these entries:
“LOG-Viewer” and “HELP”, no PaperUI etc. as before !

The openHAB services are restarted several times in last days without any problem!

Raspberry system comes up fine after reboot, network also have connection.
My Files under /etc/openhab2/ seems fine and correct, things; rules are my versions.

openhab Logile show after reboot:


2018-11-10 15:01:10.020 [WARN ] [eclipse.jetty.servlet.ServletHandler] -

javax.servlet.ServletException: A MultiException has 1 exceptions. They are:

  1. java.lang.IllegalStateException: ServiceLocatorImpl(__HK2_Generated_1,2,13398080) has been shut down

    at org.glassfish.jersey.servlet.WebComponent.serviceImpl(WebComponent.java:489) [167:org.glassfish.jersey.containers.jersey-container-servlet-core:2.22.2]

    at org.glassfish.jersey.servlet.WebComponent.service(WebComponent.java:427) [167:org.glassfish.jersey.containers.jersey-container-servlet-core:2.22.2]


    2018-11-10 15:00:39.028 [.ItemChannelLinkAddedEvent] - Link ‘zwave_device_Z_Wave_USB_Stick_node6_alarm_heat1-zwave:device:Z-Wave-USB-Stick:node6:alarm_heat1’ has been added.

==> /var/log/openhab2/openhab.log <==

2018-11-10 15:00:40.705 [INFO ] [.dashboard.internal.DashboardService] - Started Dashboard at http://192.168.55.69:8080

2018-11-10 15:00:40.711 [INFO ] [.dashboard.internal.DashboardService] - Started Dashboard at https://192.168.55.69:8443

2018-11-10 15:01:01.458 [ERROR] [core.karaf.internal.FeatureInstaller] - Failed installing ‘openhab-binding-exec, openhab-ui-homebuilder, openhab-binding-yahooweather, openhab-misc-restdocs, openhab-persistence-influxdb, openhab-ui-habpanel, openhab-action-pushover, openhab-transformation-jsonpath, openhab-binding-gpio1, openhab-binding-mqtt1, openhab-binding-zwave, openhab-binding-ipp, openhab-binding-netatmo, openhab-ui-basic, openhab-transformation-map, openhab-binding-ntp, openhab-binding-astro, openhab-ui-paper, openhab-transformation-scale’: Error:

Error downloading mvn:org.openhab.core/org.openhab.io.rest.docs/2.3.0

==> /var/log/openhab2/events.log <==

2018-11-10 15:01:09.314 [vent.ItemStateChangedEvent] - ImageURL changed from NULL to https://www.placecage.com/c/480/360

2018-11-10 15:01:09.317 [vent.ItemStateChangedEvent] - ImageURL changed from https://www.placecage.com/c/480/360 to https://www.placecage.com/c/320/240

2018-11-10 15:01:09.321 [vent.ItemStateChangedEvent] - DemoLocation changed from NULL to 52.5200066,13.4049540

2018-11-10 15:01:09.329 [vent.ItemStateChangedEvent] - Wifi_Level changed from NULL to 3

2018-11-10 15:01:09.333 [vent.ItemStateChangedEvent] - Heating_GF_Corridor changed from NULL to OFF

First of all : Take a big backup of your configs

Secondly: according to this error message, OH2 is trying to download an addon and it fails. does the rPi have proper & working connectivity to the internet ?

Thirdly: Dude… really? :slight_smile: https://www.placecage.com/c/480/360

edit: you had a similar problem recently… what was the root-cause then? Can not install bingings on openhabian

In the meantime I find out:
in /etc/openhab2/services/addons.cfg the line
remote = true was commented out, and the timestamp from this file was from 28.May !?

I remove the hash (now remote=true), and at myip:8080 I see all entries again.

Try the following:

openhab-cli stop
openhab-cli clean-cache
openhab-cli start

and check the logs again

Ref: Clear the Cache

But still some error in log and the yesterday installed influxdb persistance was not with state “installed”, so I execute your provided steps (all steps done as user=root, hope this was correct).
Now everything stopped, nothing at port 8080, in logfile I get:
(same after reboot):

2018-11-10 17:34:45.677 [SEVERE] [org.apache.karaf.main.Main] - Could not launch framework_
java.lang.RuntimeException: Error initializing storage.
at org.eclipse.osgi.internal.framework.EquinoxContainer.<init>(EquinoxContainer.java:70)
at org.eclipse.osgi.launch.Equinox.<init>(Equinox.java:31)
at org.eclipse.osgi.launch.EquinoxFactory.newFramework(EquinoxFactory.java:24)
at org.apache.karaf.main.Main.launch(Main.java:256)
at org.apache.karaf.main.Main.main(Main.java:179)

Caused by: java.io.FileNotFoundException: /var/lib/openhab2/cache/org.eclipse.osgi/.manager/.fileTableLock (Permission denied)

at java.io.RandomAccessFile.open0(Native Method)

at java.io.RandomAccessFile.open(RandomAccessFile.java:316)

These message repeats every minute, nothing else in log :frowning:

what is the output of openhab-cli info ?

[17:40:23] root@maspi09:~# openhab-cli info

Version: 2.3.0 (Build)

User: openhab (Environment Variable Set)
User Groups: openhab tty dialout audio bluetooth gpio

Directories: Folder Name | Path | User:Group
----------- | ---- | ----------
OPENHAB_HOME | /usr/share/openhab2 | openhab:openhab
OPENHAB_RUNTIME | /usr/share/openhab2/runtime | openhab:openhab
OPENHAB_USERDATA | /var/lib/openhab2 | openhab:openhabian
OPENHAB_CONF | /etc/openhab2 | openhab:openhabian
OPENHAB_LOGDIR | /var/log/openhab2 | openhab:openhabian
OPENHAB_BACKUPS | /var/lib/openhab2/backups | root:root

URLs: http://192.168.55.69:8080
https://192.168.55.69:8443

is there anything within /var/lib/openhab2/cache/ currently?

ls -al /var/lib/openhab2/cache/

[17:51:29] root@maspi09:~# ll -al /var/lib/openhab2/cache/
total 20K
drwxrwxr-x+ 4 root root 4.0K Nov 10 17:37 ./
drwxrwxr-x+ 12 openhab openhabian 4.0K Nov 10 17:33 …/
-rw-rw-r-- 1 root root 2.6K Nov 10 17:33 1541867601238.log
drwxrwxr-x+ 3 root root 4.0K Nov 10 17:37 org.eclipse.core.runtime/
drwxrwxr-x+ 192 root root 4.0K Nov 10 17:37 org.eclipse.osgi/

owned by root… interesting

ok try the following:

sudo su
systemctl stop openhab2
mv /var/log/openhab2/openhab.log /var/log/openhab2/openhab.log.old
rm -rf /var/lib/openhab2/cache/*
rm -rf /var/lib/openhab2/tmp/*
systemctl start openhab2
tail -f /var/log/openhab2/openhab.log

edit: fixed the /var/lib/ paths

Done, but nothing changed, no other entry in log.
Seems the stop was not noted, also the start was within one seond (and produce NO line in the log!)
Reboot Raspi again?

no need for reboot. stopping and starting the OH2 service is enough
double check /var/lib/openhab2/cache & /var/lib/openhab2/tmp contents please
they should be empty

I edited my commands above for the removal of the files and dirs in these 2 locations

Folders are empty, but still NO entry when stopping or starting! Is this “normal”?

Only:

2018-11-10 18:01:07.583 [SEVERE] [org.apache.karaf.main.Main] - Could not launch framework
java.lang.RuntimeException: Error initializing storage.
at org.eclipse.osgi.internal.framework.EquinoxContainer.<init>(EquinoxContainer.java:70)
at org.eclipse.osgi.launch.Equinox.<init>(Equinox.java:31)
at org.eclipse.osgi.launch.EquinoxFactory.newFramework(EquinoxFactory.java:24)
at org.apache.karaf.main.Main.launch(Main.java:256)
at org.apache.karaf.main.Main.main(Main.java:179)

Caused by: java.io.IOException: Unable to create lock manager.

at org.eclipse.osgi.storagemanager.StorageManager.open(StorageManager.java:698)
at org.eclipse.osgi.storage.Storage.getChildStorageManager(Storage.java:1776)

And this is correct, owner “root” ?
ll /var/lib/openhab2/cache/org.eclipse.osgi/.manager/.fileTableLock
-rw-rw-r-- 1 root root 0 Nov 10 17:33 /var/lib/openhab2/cache/org.eclipse.osgi/.manager/.fileTableLock

how exactly are you trying to stop & start OH2? (just checking)

try also:

chown -R openhab:openhab /var/lib/openhab2

no, it’s not
somehow the files are being created with owner root when they should be under the ownership of user openhab…

I used your command as user root:
systemctl stop openhab2

Also execute your command: chown -R openhab:openhab /var/lib/openhab2

Now I restart: service openhab2 restart

=> oH coming up again … myip:8080 has content, but only with: Initial setup: Simple|Basic|Experts …

I don’t change manually .fileTableLock, but now it has openhab:openhab again !?

select expert and you should be fine

you did change it with the chown command (chown -R openhab:openhab /var/lib/openhab2)

openhab:openhab is the correct one
root:root is wrong :slight_smile:

You are correct, to quick, (and I know the -R option :wink: )

But now again only “Logviewer” and “Openhabian Help” at port 8080, after selecting expert …

give it a few seconds to install the other stuff included in the expert package
anything in the log file?