paul11
(Paul)
February 28, 2023, 12:12pm
1
Rasperry Pi 3:
Hardware: _Rasberry Pi 3 B+
OS: _Raspbian GNU/Linux 11
Java Runtime Environment:
openHAB version: OpenHAB 3.4.2
I’m having a problem with openHab crashing.
Every day it freezes and I can’t use it, it doesn’t respond in browser or app. I need to update Zram to restore functionality. And so almost every day. Additionally, I can’t read the log files via Log Viewer. It does not see the log files. How can all this be fixed?
If use
> log :list
I have this:
openhab> log:list
Logger │ Level
───────────────────────────────────────────────────┼──────
ROOT │ WARN
javax.jmdns │ ERROR
javax.mail │ ERROR
openhab.event │ INFO
openhab.event.AddonEvent │ ERROR
openhab.event.ChannelDescriptionChangedEvent │ ERROR
openhab.event.InboxUpdatedEvent │ ERROR
openhab.event.ItemAddedEvent │ ERROR
openhab.event.ItemChannelLinkAddedEvent │ ERROR
openhab.event.ItemChannelLinkRemovedEvent │ ERROR
openhab.event.ItemRemovedEvent │ ERROR
openhab.event.ItemStateEvent │ ERROR
openhab.event.RuleAddedEvent │ ERROR
openhab.event.RuleRemovedEvent │ ERROR
openhab.event.RuleStatusInfoEvent │ ERROR
openhab.event.StartlevelEvent │ ERROR
openhab.event.ThingAddedEvent │ ERROR
openhab.event.ThingRemovedEvent │ ERROR
openhab.event.ThingStatusInfoEvent │ ERROR
openhab.event.ThingUpdatedEvent │ ERROR
org.apache.cxf.jaxrs.sse.SseEventSinkImpl │ ERROR
org.apache.cxf.phase.PhaseInterceptorChain │ ERROR
org.apache.karaf.jaas.modules.audit │ INFO
org.apache.karaf.kar.internal.KarServiceImpl │ ERROR
org.apache.karaf.shell.ssh.SshUtils │ ERROR
org.apache.karaf.shell.support │ OFF
org.apache.sshd │ WARN
org.eclipse.lsp4j │ OFF
org.jupnp │ ERROR
org.openhab │ INFO
org.ops4j.pax.url.mvn.internal.AetherBasedResolver │ ERROR
org.ops4j.pax.web.pax-web-runtime │ OFF
su.litvak.chromecast.api.v2.Channel │ ERROR
rlkoshak
(Rich Koshak)
February 28, 2023, 2:20pm
2
Are your ZRAM file systems running out of room? When it stops responding, ssh to the machine and run dh -h
and see if any of the “overlay” file systems are out of space.
paul11
(Paul)
February 28, 2023, 7:59pm
5
In this moment I have this:
openhabian@openhabian:~ $ sudo df -h
Filesystem Size Used Avail Use% Mounted on
/dev/root 29G 8.8G 20G 32% /
devtmpfs 454M 0 454M 0% /dev
tmpfs 487M 0 487M 0% /dev/shm
tmpfs 195M 22M 173M 12% /run
tmpfs 5.0M 8.0K 5.0M 1% /run/lock
/dev/mmcblk0p1 253M 50M 203M 20% /boot
/dev/sda3 30G 28K 28G 1% /storage
/dev/zram2 468M 458M 0 100% /opt/zram/zram2
/dev/zram4 468M 458M 0 100% /opt/zram/zram4
tmpfs 98M 0 98M 0% /run/user/1000
/dev/zram1 347M 165M 157M 52% /opt/zram/zram1
overlay1 347M 165M 157M 52% /var/lib/openhab/persistence
/dev/zram16 468M 216K 433M 1% /opt/zram/zram16
overlay16 468M 216K 433M 1% /var/log
but I had to restart zram.
paul11
(Paul)
March 1, 2023, 12:36pm
6
I turn off zram and I have this:
openhabian@openhabian:~ $ sudo df -h
Filesystem Size Used Avail Use% Mounted on
/dev/root 29G 8.3G 20G 30% /
devtmpfs 454M 0 454M 0% /dev
tmpfs 487M 0 487M 0% /dev/shm
tmpfs 195M 22M 173M 12% /run
tmpfs 5.0M 8.0K 5.0M 1% /run/lock
/dev/mmcblk0p1 253M 50M 203M 20% /boot
/dev/sda3 30G 28K 28G 1% /storage
/dev/zram2 468M 458M 0 100% /opt/zram/zram2
/dev/zram4 468M 458M 0 100% /opt/zram/zram4
tmpfs 98M 0 98M 0% /run/user/1000
Is ok ?
I can’t use openhab because it keeps crashing. How should I fix it?
rlkoshak
(Rich Koshak)
March 1, 2023, 1:59pm
7
Two of your file systems are 100% full I’d start by looking there.
Also, what’s in the logs? openhab.log and the syslog?
apella12
(Bob Eckhoff)
March 1, 2023, 3:50pm
8
I don’t know anything about zram but for comparison here is my output with Zram running;
openhabian@openhab:~ $ df -h
Filesystem Size Used Avail Use% Mounted on
/dev/root 29G 8.5G 19G 31% /
devtmpfs 454M 0 454M 0% /dev
tmpfs 487M 0 487M 0% /dev/shm
tmpfs 487M 3.1M 484M 1% /run
tmpfs 5.0M 8.0K 5.0M 1% /run/lock
tmpfs 487M 0 487M 0% /sys/fs/cgroup
/dev/mmcblk0p1 253M 49M 204M 20% /boot
/dev/zram1 469M 57M 377M 14% /opt/zram/zram1
overlay1 469M 57M 377M 14% /var/log
tmpfs 98M 0 98M 0% /run/user/1000
What looks odd are your 2 files that are at 100% do not have an “Overlay” and then they do not go away when you stop zram. Maybe just delete them?
Do they disappear in case the system is booted ? Look like they are a left over.
paul11
(Paul)
March 1, 2023, 6:30pm
10
At the moment, after turning off and on again Zram openhab does not want to start and I have it
openhabian@openhabian:~ $ sudo df -h
Filesystem Size Used Avail Use% Mounted on
/dev/root 29G 8.7G 20G 32% /
devtmpfs 454M 0 454M 0% /dev
tmpfs 487M 0 487M 0% /dev/shm
tmpfs 195M 22M 173M 12% /run
tmpfs 5.0M 4.0K 5.0M 1% /run/lock
/dev/mmcblk0p1 253M 50M 203M 20% /boot
/dev/sda3 30G 28K 28G 1% /storage
/dev/zram2 468M 458M 0 100% /opt/zram/zram2
/dev/zram4 468M 458M 0 100% /opt/zram/zram4
tmpfs 98M 0 98M 0% /run/user/1000
openhabian@openhabian:~ $ zramctl
NAME ALGORITHM DISKSIZE DATA COMPR TOTAL STREAMS MOUNTPOINT
/dev/zram20 zstd 500M 13.5M 454.5K 656K 4
/dev/zram19 zstd 500M 604K 13.9K 144K 4
/dev/zram16 zstd 500M 38M 4.6M 5M 4
/dev/zram1 zstd 375M 230.4M 7.2M 8.2M 4
/dev/zram0 lzo-rle 500M 12K 1.6K 40K 4
/dev/zram15 zstd 500M 30.4M 3.2M 3.6M 4
/dev/zram14 zstd 500M 161.2M 33.2M 34.8M 4
/dev/zram13 zstd 500M 22.9M 1.8M 2.2M 4
/dev/zram12 zstd 500M 17.7M 999.6K 1.3M 4
/dev/zram11 zstd 500M 171.4M 27.5M 28.7M 4
/dev/zram10 zstd 500M 166.1M 26.5M 27.6M 4
/dev/zram9 zstd 500M 75.7M 10.9M 11.5M 4
/dev/zram8 zstd 500M 265.7M 46.7M 48.3M 4
/dev/zram7 zstd 500M 19M 1.1M 1.4M 4
/dev/zram6 zstd 500M 236.6M 38.7M 40.2M 4
/dev/zram5 zstd 500M 227.3M 37M 38.4M 4
/dev/zram4 zstd 500M 474.4M 79.7M 82.2M 4 /opt/zram/zram4
/dev/zram3 zstd 500M 476.8M 86.8M 89.3M 4
/dev/zram2 zstd 500M 474.6M 80.3M 82.7M 4 /opt/zram/zram2
Can I fix openhab somehow?