OpenHab stopped working - console not accessible

  • Platform information:
    • Hardware: Raspberry 4
    • OS: Raspbian
    • Java Runtime Environment: the one the came with openhabian
    • openHAB version: 2.5
  • Issue of the topic:

Today Openhab became unresponsive on port 8080 after over one year of flawless operation.
I can not open port 8080 in browser.
Grafana (installed at port 3000) works as ususal.
Rebooted pi several times
openhab seems to be active (openhab-cli status)
at the logs there are errors:

{
2020-06-18 20:50:57.582 [WARN ] [raf.features.internal.osgi.Activator] - Error starting activator

java.io.IOException: Unexpected end of input at 1:1

at org.apache.karaf.util.json.JsonReader.error(JsonReader.java:337) ~[bundleFile:?]

at org.apache.karaf.util.json.JsonReader.expected(JsonReader.java:331) ~[bundleFile:?]

at org.apache.karaf.util.json.JsonReader.readValue(JsonReader.java:93) ~[bundleFile:?]

at org.apache.karaf.util.json.JsonReader.parse(JsonReader.java:58) ~[bundleFile:?]

at org.apache.karaf.util.json.JsonReader.read(JsonReader.java:52) ~[bundleFile:?]

at org.apache.karaf.features.internal.region.DigraphHelper.readDigraph(DigraphHelper.java:93) ~[bundleFile:?]

at org.apache.karaf.features.internal.region.DigraphHelper.loadDigraph(DigraphHelper.java:72) ~[bundleFile:?]

at org.apache.karaf.features.internal.osgi.Activator.doStart(Activator.java:146) ~[bundleFile:?]

at org.apache.karaf.util.tracker.BaseActivator.run(BaseActivator.java:312) [bundleFile:?]

at java.util.concurrent.Executors$RunnableAdapter.call(Executors.java:511) [?:1.8.0_222]

at java.util.concurrent.FutureTask.run(FutureTask.java:266) [?:1.8.0_222]

at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1149) [?:1.8.0_222]

at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:624) [?:1.8.0_222]

at java.lang.Thread.run(Thread.java:748) [?:1.8.0_222]

}

Any idea what i can do?

Console seems not to be available. Trying openhab-cli console shows

Failed to get session

Check the files in /var/lib/openhab2/jsondb. Are there any zero length files? Are there any files that look like they just abruptly end? If so, restore that file with the latest version in /var/lib/openhab2/jsondb/backup. I’d guess that the JSONDB somehow got corrupted which is preventing OH from starting up.

Tanks that pointed me to the right direction. There have been no files with zero size and after comparing file sizes with the files sizes in backup directory, there seems to be no problem.

I made it to stop openhabian, cleaning cache directories and restarting openhabian. Now i can access the Paper UI after the pi needed some minutes to sort things out :).

Root cause seems to be the amazon echo control binding. This binding started to consume all the memory and the system stopped working. After the reboot something seemed to be wrong in cache.

There are some bundles missing now (manually installed), but this is something i can work on now.

Thanks!
Awesome community!

Something happened recently which drove the Amazon Echo Control binding to memory leaks.

One of the other forum members created an updated binding which resolves this issue. If you want, you can use this binding temporarily instead of the one you currently have, but of course, use at your own risk.
https://janessa.me/esh/org.openhab.binding.amazonechocontrol-2.5.6-fix-leaks-fix-connection.jar