Clear the Cache

Hi @Andrew_Rowe, I’m running Openhabian 2.4 on Raspberry Pi 3B.

@rlkoshak, I don’t think I had done anything else other than delete the cache that I can recall. I had been trying to debug my caldavio at that time (shelved for now), I beleive, so it is possible that someone’s post somewhere had guided me to do something - but I’m pretty sure I wasn’t messing around with OH system files or permissions, that would certainly have stuck out (and suggested an immediate fix for the startup problem). I was sticking to the caldav-specific files, I’m pretty confident.

Regardless, it appears that Juan ran into the same challenge as I, so I’m glad I posted the potential solution for others to find.

1 Like

If you restarted OH as a user other than openhab, that would have done it.

@rlkoshak That’s possible - I may have used sudo.

Hello everybody!
I currently have problems with installing Addons etc. through PaperUI, I am running Openhabian 2.4 on RaspberryPi 3 B. The log is full of red entries after trying to install Addons and I already tried clearing the cache with the commands stated above here in this thread but nothing seems to help.
sudo /etc/init.d/openhab2 stop
sudo rm -rf /var/lib/openhab2/cache/*
sudo rm -rf /var/lib/openhab2/tmp/*
sudo /etc/init.d/openhab2 start

I will once again try to install the whole thing new (as stated here https://www.openhab.org/docs/installation/openhabian.html) and hope it works from then on.

Hey @maatz first of all

Welcome to the openHAB Community :heart:

But now to the finger pointing :smiley:
Thread hijacking is not nice, I see have a problem and tried to clear the cache but still did not succeed.
You won’t get many answers like this.
I would recommend reading this topic How to ask a good question / Help Us Help You :slight_smile:

Also your post is 14 Days old and you did not state if you solved the problem or not. And if you solved it leave a note how for other people with the same problem.

Hej @BrutalBirdie,

thank your for your welcoming and the finger pointing :wink:
I just reinstalled Openhabian 2.4 today in the morning on a Vanilla Raspberry Pi 3B and now everything seems to work without flaws.
I was running some other things, such as the Unifi Controller, on the previous Raspberry.
So now I am happy installing addons, bindings etc. The weekend is saved… :smiley:

1 Like

What do you mean by “vanilla” ? Did you install Raspbian or did you use the openHABian image ?

I did use the openHABian image on a brand new RaspberryPi.

@rlkoshak I cannot delete files in my cache because they are read only for what ever reason. Even with the help of google and this forum I am not able to solve the issue. Can you please help?

rm: cannot remove 'cache/org.eclipse.osgi/198/0/bundleFile': Read-only file system                                         
rm: cannot remove 'cache/org.eclipse.osgi/156/0/bundleFile': Read-only file system                                         
rm: cannot remove 'cache/org.eclipse.osgi/91/0/bundleFile': Read-only file system                                          
rm: cannot remove 'cache/org.eclipse.osgi/114/0/bundleFile': Read-only file system

Try this first :
openhab-cli reset-ownership

And then clear the cache

Thanks @vzorglub - unfortunately same result.

Well it tells you what the problem is: Read-only file system.
There’s many potential reasons for this and as-many remedies, but evaluating and fixing this is a Linux issue and beyond scope of this forum. Try rebooting your system. If your system is a RPi your SD card may be corrupted and best is to reinstall.

Makes sense. Installed the last backup. Thanks

Consider moving to ZRAM to avoid this to happen again.

Thanks @mstormi for the hint. Done.
BTW: rpi-clone saved another time my ä** with having a second SD card and a full backup. All I lost was some log and influxdb data.

this solved all bunch of permission issues:
java.io.FileNotFoundException: /var/lib/openhab2/tmp/karaf.pid (Permission denied)
at java.io.FileOutputStream.open0(Native Method)
at java.io.FileOutputStream.open(FileOutputStream.java:270)
at java.io.FileOutputStream.(FileOutputStream.java:213)
at java.io.FileOutputStream.(FileOutputStream.java:101)
at org.apache.karaf.main.InstanceHelper.writePid(InstanceHelper.java:127)
at org.apache.karaf.main.Main.launch(Main.java:243)
at org.apache.karaf.main.Main.main(Main.java:178)
java.lang.RuntimeException: /var/log/openhab2/openhab.log (Permission denied)
at org.apache.karaf.main.util.BootstrapLogManager.getDefaultHandlerInternal(BootstrapLogManager.java:102)
at org.apache.karaf.main.util.BootstrapLogManager.getDefaultHandlersInternal(BootstrapLogManager.java:137)
at org.apache.karaf.main.util.BootstrapLogManager.getDefaultHandlers(BootstrapLogManager.java:70)
at org.apache.karaf.main.util.BootstrapLogManager.configureLogger(BootstrapLogManager.java:75)
at org.apache.karaf.main.Main.launch(Main.java:244)
at org.apache.karaf.main.Main.main(Main.java:178)
Caused by: java.io.FileNotFoundException: /var/log/openhab2/openhab.log (Permission denied)
at java.io.FileOutputStream.open0(Native Method)
at java.io.FileOutputStream.open(FileOutputStream.java:270)
at java.io.FileOutputStream.(FileOutputStream.java:213)
at org.apache.karaf.main.util.BootstrapLogManager$SimpleFileHandler.open(BootstrapLogManager.java:193)
at org.apache.karaf.main.util.BootstrapLogManager$SimpleFileHandler.(BootstrapLogManager.java:182)
at org.apache.karaf.main.util.BootstrapLogManager.getDefaultHandlerInternal(BootstrapLogManager.java:100)
… 5 more
!SESSION 2019-12-26 23:03:36.571 -----------------------------------------------
eclipse.buildId=unknown
java.version=1.8.0_152
java.vendor=Azul Systems, Inc.
BootLoader constants: OS=linux, ARCH=arm, WS=gtk, NL=en_US

!ENTRY org.eclipse.osgi 4 0 2019-12-26 23:03:36.573
!MESSAGE Error reading configuration: /var/lib/openhab2/cache/org.eclipse.osgi/.manager/.fileTableLock (Permission denied)
!STACK 0
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)
at java.io.RandomAccessFile.(RandomAccessFile.java:243)
at org.eclipse.osgi.internal.location.Locker_JavaNio.lock(Locker_JavaNio.java:36)
at org.eclipse.osgi.storagemanager.StorageManager.lock(StorageManager.java:388)
at org.eclipse.osgi.storagemanager.StorageManager.open(StorageManager.java:701)
at org.eclipse.osgi.storage.Storage.getChildStorageManager(Storage.java:1776)
at org.eclipse.osgi.storage.Storage.getInfoInputStream(Storage.java:1793)
at org.eclipse.osgi.storage.Storage.(Storage.java:132)
at org.eclipse.osgi.storage.Storage.createStorage(Storage.java:85)
at org.eclipse.osgi.internal.framework.EquinoxContainer.(EquinoxContainer.java:68)
at org.eclipse.osgi.launch.Equinox.(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:178)

Hello
I’m new user to openhab.
I have a problem , it stopped working
and I don’t know what to do.
my English not good
thank you

Raspberry pi 4
sdcard 32gb

Linux openhab 4.19.75-v7l+ #1270 SMP Tue Sep 24 18:51:41 BST 2019 armv7l

The programs included with the Debian GNU/Linux system are free software;
the exact distribution terms for each program are described in the
individual files in /usr/share/doc/*/copyright.

Debian GNU/Linux comes with ABSOLUTELY NO WARRANTY, to the extent
permitted by applicable law.
Last login: Tue Jan 7 22:27:07 2020 from 192.168.0.3

2020-01-08 01:18:44,920: FireMotD: Info: No FireMotD ExportFile detected. Please generate with “sudo ./FireMotD -S”

          Welcome to            __  _____    ____  _
        ____  ____  ___  ____  / / / /   |  / __ )(_)___ _____
       / __ \/ __ \/ _ \/ __ \/ /_/ / /| | / __  / / __ `/ __ \
      / /_/ / /_/ /  __/ / / / __  / ___ |/ /_/ / / /_/ / / / /
      \____/ .___/\___/_/ /_/_/ /_/_/  |_/_____/_/\__,_/_/ /_/
          /_/
              openHAB 2.5.0-1 (Release Build)

Looking for a place to get started? Check out ‘sudo openhabian-config’ and the
documentation at https://www.openhab.org/docs/installation/openhabian.html
The openHAB dashboard can be reached at http://openhab:8080
To interact with openHAB on the command line, execute: ‘openhab-cli --help’

[01:44:30] openhabian@openhab:~$ sudo du -xh / | grep -P “G\t”
[sudo] password for openhabian:
25G /var/log
26G /var
1.7G /usr
29G /
[01:44:59] openhabian@openhab:~$

[01:45:06] openhabian@openhab:~$ df -h
Filesystem Size Used Avail Use% Mounted on
/dev/root 30G 29G 0 100% /
devtmpfs 1.9G 0 1.9G 0% /dev
tmpfs 2.0G 0 2.0G 0% /dev/shm
tmpfs 2.0G 488K 2.0G 1% /run
tmpfs 5.0M 8.0K 5.0M 1% /run/lock
tmpfs 2.0G 0 2.0G 0% /sys/fs/cgroup
tmpfs 5.0M 0 5.0M 0% /var/cache/samba
tmpfs 5.0M 0 5.0M 0% /var/lib/samba
tmpfs 50M 32K 50M 1% /tmp
/dev/mmcblk0p1 253M 52M 201M 21% /boot
tmpfs 396M 0 396M 0% /run/user/1000
[01:47:06] openhabian@openhab:~$

Okay?
What exactly is not working?
You postet the output of df -h, is there a problem with space on the device?
I will just assume your openHAB is not working correctly.
Please provide the openHAB logs. See openHAB doc logs and or more about logging

And please try to describe what is not working and what was the last thing you did before it stopped working.

I have left behind the card that had stop working which did not open the saitmap due Limited space on the card and because I do not know How to function it I started on a new card and built from start the openhab. I have ordered a new raspberry Pi 4 and when I am going to have it on my hands I will try to put the card back to locate my mistake. Thank you I will write again when I am going to be ready if you are willing to help me. Chris

OMG. What did I do? I killed my openhab, please help.

I wanted to clean the cache, as reaction times of my mqtt stuff got a litlle bit slow.

So I cleaned the cache by using “openhab-cli clean-cache”.

But after a reboot nothing is working anymore. I get the following error message:

2020-02-02 13:44:35.739 [ERROR] [core.karaf.internal.FeatureInstaller] - Failed installing 'openhab-misc-openhabcloud, openhab-binding-darksky, openhab-ui-habpanel, openhab-binding-chromecast, openhab-binding-mqtt, openhab-transformation-map, openhab-ui-habmin, openhab-binding-dmx, openhab-ui-paper, openhab-transformation-scale, openhab-binding-http1, openhab-ui-homebuilder, openhab-binding-tado, openhab-voice-googletts, openhab-binding-plclogo, openhab-transformation-javascript, openhab-transformation-jsonpath, openhab-binding-mihome, openhab-misc-mqttbroker, openhab-binding-wifiled, openhab-persistence-rrd4j, openhab-ui-basic, openhab-binding-openweathermap, openhab-binding-astro, openhab-binding-expire1': Unable to resolve root: missing requirement [root] osgi.identity; osgi.identity=openhab-voice-googletts; type=karaf.feature; version="[2.5.0.SNAPSHOT,2.5.0.SNAPSHOT]"; filter:="(&(osgi.identity=openhab-voice-googletts)(type=karaf.feature)(version>=2.5.0.SNAPSHOT)(version<=2.5.0.SNAPSHOT))" [caused by: Unable to resolve openhab-voice-googletts/2.5.0.SNAPSHOT: missing requirement [openhab-voice-googletts/2.5.0.SNAPSHOT] osgi.identity; osgi.identity=org.openhab.voice.googletts; type=osgi.bundle; version="[2.5.0.201912151153,2.5.0.201912151153]"; resolution:=mandatory [caused by: Unable to resolve org.openhab.voice.googletts/2.5.0.201912151153: missing requirement [org.openhab.voice.googletts/2.5.0.201912151153] osgi.wiring.package; filter:="(&(osgi.wiring.package=com.google.api.gax.core)(version>=1.42.0)(!(version>=2.0.0)))"]]

What can I do? . I cant even get access to myopenhab, as it is offline and paper.ui isnt running either…

I read that deleting the addon config could solve the problem. but how do i do that?

3:59:30] openhabian@openHABianPi:~$ /var/lib/openhab2/config/org/openhab/addon s.config
-bash: /var/lib/openhab2/config/org/openhab/addons.config: Permission denied
[14:00:18] openhabian@openHABianPi:~$ sudo /var/lib/openhab2/config/org/openhab/ addons.config
[sudo] password for openhabian:
sudo: /var/lib/openhab2/config/org/openhab/addons.config: command not found
[14:00:37] openhabian@openHABianPi:~$ /var/lib/openhab2/config/org/openhab/addons.config
-bash: /var/lib/openhab2/config/org/openhab/addons.config: Permission denied

How do I get to that folder and how do I delete it?

Sorry for my total linux noobness.

EDIT: After 2h research of how to delete a folder in linux i can say: Deleting the addons.conf folder didn’t solve any problems. I dont see the error message anymore in my log, but still nothing works. No openHab app, no paper.ui, and myopenhab is offline.
.
I am literally crying.