clearing the cache shouldn’t have anything to do with file permissions. You are deleting files and folders created by openHAB so after you clear the cache those files and folders are recreated by openHAB so the ownership will be openhab:openhab.
Either the openhab-cli script was changed and an issue needs to be filed, or bdm did some other stuff before or after running the cache clearing that caused the problem. In either case, it was the OP that was the source of the problem. I’m hesitant to add warnings to the OP that are not directly related to the OP.
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.
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
But now to the finger pointing
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
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.
thank your for your welcoming and the finger pointing
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…
@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
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.
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)
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”
Looking for a place to get started? Check out ‘sudo openhabian-config’ and the
documentation at openHABian | openHAB
The openHAB dashboard can be reached at http://openhab:8080
To interact with openHAB on the command line, execute: ‘openhab-cli --help’
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