Did that already a couple of times, but it seems that nothenig changed:
● openhab2.service - openHAB 2 - empowering the smart home
Loaded: loaded (/usr/lib/systemd/system/openhab2.service; enabled)
Active: active (running) since Ter 2019-01-15 08:10:46 -02; 26min ago
Docs: https://www.openhab.org/docs/ https://community.openhab.org
Main PID: 480 (java)
CGroup: /system.slice/openhab2.service
└─480 /usr/bin/java -Dopenhab.home=/usr/share/openhab2 -Dopenhab.conf=/etc/openhab2 -Dopenhab.runtime=/usr/share/openhab2/runtime -Dopenhab.userdata=/var/…
Jan 15 08:11:02 raspberrypi karaf[480]: … 3 more
Jan 15 08:11:02 raspberrypi karaf[480]: Caused by: java.lang.RuntimeException: Karaf can’t startup, make sure the log file can be accessed and written by t…on denied)
Jan 15 08:11:02 raspberrypi karaf[480]: at org.apache.karaf.main.lock.SimpleFileLock.(SimpleFileLock.java:55)
Jan 15 08:11:02 raspberrypi karaf[480]: … 8 more
Jan 15 08:11:02 raspberrypi karaf[480]: Caused by: java.io.FileNotFoundException: /var/lib/openhab2/tmp/lock (Permission denied)
Jan 15 08:11:02 raspberrypi karaf[480]: at java.io.RandomAccessFile.open0(Native Method)
Jan 15 08:11:02 raspberrypi karaf[480]: at java.io.RandomAccessFile.open(RandomAccessFile.java:316)
Jan 15 08:11:02 raspberrypi karaf[480]: at java.io.RandomAccessFile.(RandomAccessFile.java:243)
Jan 15 08:11:02 raspberrypi karaf[480]: at org.apache.karaf.main.lock.SimpleFileLock.(SimpleFileLock.java:53)
Jan 15 08:11:02 raspberrypi karaf[480]: … 8 more
I there were any kind of SD problem, I think that it will not respond to my commands consistently. I think that I would face other problems such as an unstable system. I really don’t feel that. The problem started after the upgrade to OH 2.4. Due to the new MQTT protocol I was following the procedures to make it work. But every change made things worse. After I deleted the cache Karaf and myIP:8080 stopped working…
Something I have found useful when I encounter odd problems that could result from a failing SD card is the command debsums. It doen’t provide definitive proof of a failing SD card, but it can provide supporting evidence.
Entered on the command line in an SSH session on my RPi 3B:
sudo debsums -s
From man debsums, Verify installed Debian package files against MD5 checksum lists from /var/lib/dpkg/info/*.md5sums.
[Updated to include comparable command for RPM-based linux distributions]
I am more familiar with the RPM packaging system, which offers an even better command for this sort of thing:
sudo rpm --verify
Not only does this command verify MD5 checksums, it also checks permissions of installed packages.