Platform information:
Hardware: Pi 3 B+
OS: OpenHabian
Java Runtime Environment: ?
openHAB version: 4.3.2
I had a crash of my previous installation (Version 3.?; SD damaged) and had to setup a new installation from scratch (4.3.2). I had a backup from the old one and restored it. Everything fine so far, but not able to debug. If I open a Karaf console and try to set debug level log:set or using any other log command: “command not known”.
After 4-5h searching the forum I already checked:
in org.ops4j.pax.logging.cfg
everthing fine: “org.ops4j.pax.logging.log4j2.config.file=${karaf.etc}/log4j2.xml”
log4j2.xml looks fine, too
No more idea, how to solve it. Even thinking, going back to OpenHAB 3.something.
rlkoshak
(Rich Koshak)
February 5, 2025, 6:45pm
2
Often when there is a problem with logging there will be something logged out by systemctl. Is there anything relevant in
sudo systemctl status openhab
If it says something about the journal having been rotated restart OH and run it again.
Beyond that, with the information provided all I can recommend is to double check the permissions on the logging config files and /var/log/openhab folder.
● openhab.service - openHAB - empowering the smart home
Loaded: loaded (/lib/systemd/system/openhab.service; enabled; preset: enabled)
Drop-In: /etc/systemd/system/openhab.service.d
└─override.conf
Active: active (running) since Wed 2025-02-05 21:03:57 CET; 1min 51s ago
Docs: Introduction | openHAB
https://community.openhab.org
Process: 632 ExecStartPre=/bin/rm -f /var/lock/LCK…ttyAMA0 /var/lock/LCK…ttyACM0 (code=exited, status=0/SUCCESS)
Main PID: 637 (java)
Tasks: 203 (limit: 2157)
CPU: 1min 21.165s
CGroup: /system.slice/openhab.service
└─637 /usr/bin/java -XX:-UsePerfData -Dopenhab.home=/usr/share/openhab -Dopenhab.conf=/etc/openhab -Dopen>
Feb 05 21:03:57 openhabian systemd[1]: Starting openhab.service - openHAB - empowering the smart home…
Feb 05 21:03:57 openhabian systemd[1]: Started openhab.service - openHAB - empowering the smart home.
I will check permissions now
I am not very smart in linux: Is this the required information?
openhabian@openhabian:~ $ ls -l /var/log/openhab
total 2960
-rw-rw-r-- 1 openhab openhab 0 Feb 3 20:45 audit.log
-rw-rw-r-- 1 openhab openhab 0 Feb 3 20:45 events.log
-rw-rw-r-- 1 openhab openhab 288 Feb 3 18:51 events.log.1.gz
-rw-rw-r-- 1 openhab openhab 203 Feb 3 20:45 events.log.2.gz
-rw-rw-r-- 1 openhab openhab 2994957 Feb 5 21:05 openhab.log
-rw-rw-r-- 1 openhab openhab 2243 Feb 3 18:51 openhab.log.1.gz
-rw-rw-r-- 1 openhab openhab 1479 Feb 3 20:45 openhab.log.2.gz
-rw-rw-r-- 1 openhab openhab 15937 Feb 3 20:51 openhab.log.3.gz
-rwxrwxr-x 1 openhab openhab 0 Jan 12 22:13 Readme.txt
rlkoshak:
logging config files
openhabian@openhabian:/var/lib/openhab/etc $ ls -l
total 252
-rw-rw-r-- 1 openhab openhab 1035 Jan 12 22:13 all.policy
-rw-rw-r-- 1 openhab openhab 786 Jan 12 22:13 branding.properties
-rw-rw-r-- 1 openhab openhab 786 Jan 12 22:13 branding-ssh.properties
-rw-rw-r-- 1 openhab openhab 19028 Feb 3 13:42 config.properties
-rw-rw-r-- 1 openhab openhab 317 Jan 12 22:13 custom.properties
-rw-rw-r-- 1 openhab openhab 269 Jan 12 22:13 custom.system.properties
-rw-rw-r-- 1 openhab openhab 1144 Jan 12 22:13 distribution.info
-rw-r–r-- 1 openhab openhab 4616 Jan 10 2024 equinox-debug.properties
-rw------- 1 openhab openhab 1704 Jan 10 2024 host.key
-rw------- 1 openhab openhab 451 Jan 10 2024 host.key.pub
-rw-r–r-- 1 openhab openhab 252 Jan 10 2024 java.util.logging.properties
-rw-r–r-- 1 openhab openhab 1318 Jan 10 2024 jetty-web.xml
-rw-r–r-- 1 openhab openhab 4425 Jan 10 2024 jetty.xml
-rw-rw-r-- 1 openhab openhab 1665 Feb 3 13:42 jmx.acl.org.apache.karaf.bundle.cfg
-rw-rw-r-- 1 openhab openhab 3317 Feb 3 13:42 jmx.acl.org.apache.karaf.config.cfg
-rw-rw-r-- 1 openhab openhab 15657 Jan 12 22:13 jre.properties
-rw-r–r-- 1 openhab openhab 2098 Jan 10 2024 keys.properties
-rw-r–r-- 1 openhab openhab 605 Jan 10 2024 keystore
-rw-r–r-- 1 openhab openhab 6188 Feb 5 21:02 log4j2.xml
-rw-rw-r-- 1 openhab openhab 493 Feb 3 13:42 org.apache.felix.eventadmin.impl.EventAdmin.cfg
-rw-rw-r-- 1 openhab openhab 420 Feb 3 13:42 org.apache.felix.fileinstall-deploy.cfg
-rw-rw-r-- 1 openhab openhab 1738 Feb 3 13:42 org.apache.karaf.command.acl.bundle.cfg
-rw-rw-r-- 1 openhab openhab 2026 Feb 3 13:42 org.apache.karaf.command.acl.config.cfg
-rw-rw-r-- 1 openhab openhab 1142 Feb 3 13:42 org.apache.karaf.command.acl.feature.cfg
-rw-rw-r-- 1 openhab openhab 1155 Feb 3 13:42 org.apache.karaf.command.acl.jaas.cfg
-rw-rw-r-- 1 openhab openhab 1220 Feb 3 13:42 org.apache.karaf.command.acl.kar.cfg
-rw-rw-r-- 1 openhab openhab 1376 Feb 3 13:42 org.apache.karaf.command.acl.scope_bundle.cfg
-rw-rw-r-- 1 openhab openhab 1118 Feb 3 13:42 org.apache.karaf.command.acl.shell.cfg
-rw-rw-r-- 1 openhab openhab 1385 Feb 3 13:42 org.apache.karaf.command.acl.system.cfg
-rw-rw-r-- 1 openhab openhab 3343 Feb 3 20:45 org.apache.karaf.features.cfg
-rw-rw-r-- 1 openhab openhab 3799 Feb 3 20:45 org.apache.karaf.features.repos.cfg
-rw-rw-r-- 1 openhab openhab 1178 Jan 12 22:13 org.apache.karaf.features.xml
-rw-rw-r-- 1 openhab openhab 1122 Feb 3 13:42 org.apache.karaf.jaas.cfg
-rw-rw-r-- 1 openhab openhab 532 Feb 3 13:42 org.apache.karaf.kar.cfg
-rw-rw-r-- 1 openhab openhab 762 Feb 3 13:42 org.apache.karaf.log.cfg
-rw-rw-r-- 1 openhab openhab 4788 Feb 3 13:44 org.apache.karaf.shell.cfg
-rw-rw-r-- 1 openhab openhab 82 Feb 3 20:45 org.jupnp.cfg
-rw-r–r-- 1 openhab openhab 33 Jan 10 2024 org.openhab.audio.cfg
-rw-r–r-- 1 openhab openhab 22 Jan 10 2024 org.openhab.voice.cfg
-rw-r–r-- 1 openhab openhab 65 Jan 10 2024 org.ops4j.pax.logging.cfg
-rw-rw-r-- 1 openhab openhab 5637 Feb 3 13:42 org.ops4j.pax.url.mvn.cfg
-rw-r–r-- 1 openhab openhab 1346 Jan 10 2024 org.ops4j.pax.web.cfg
-rw-rw-r-- 1 openhab openhab 0 Jan 12 22:13 overrides.properties
-rw-rw-r-- 1 openhab openhab 7989 Feb 3 20:45 profile.cfg
drwxr-xr-x 2 openhab openhab 4096 Jan 10 2024 scripts
-rw-r–r-- 1 openhab openhab 1897 Jan 10 2024 shell.init.script
-rw-rw-r-- 1 openhab openhab 1218 Jan 12 22:13 startup.properties
-rw-rw-r-- 1 openhab openhab 5547 Jan 12 22:13 system.properties
-rw-r–r-- 1 openhab openhab 1525 Jan 10 2024 users.properties
-rw-rw-r-- 1 openhab openhab 342 Jan 12 22:13 version.properties
rlkoshak
(Rich Koshak)
February 5, 2025, 8:41pm
6
Please use code fences in the future for code, logs, output from command lines and such to preserve the white space.
```
code/logs go here
```
The output from systemctl does not show anything wrong with the logging itself and the file permissions looks correct.
The dates on openhab.log shows it’s been written to recently. What’s being logged there? any relevant errors there? events.log isn’t being written to at all, do you not have any Things or Items being updated since Feb 3rd?
Compare your log4j2.xml file to the original unmodified config: openhab-distro/distributions/openhab/src/main/resources/userdata/etc/log4j2.xml at main · openhab/openhab-distro · GitHub
Will come back tomorrow. Too late for tonight.
From the log-file:
2025-02-06 13:08:02.052 [WARN ] [internal.service.FeaturesServiceImpl] - Can’t load features repository mvn:org.apache.karaf.features/standard/4.4.3/xml/features
2025-02-06 13:08:20.750 [WARN ] [nstance.core.internal.osgi.Activator] - Error starting activator
2025-02-06 13:08:24.652 [INFO ] [org.openhab.core.Activator ] - Starting openHAB 4.0.4 (build Release Build)
2025-02-06 13:08:25.774 [INFO ] [.core.internal.i18n.I18nProviderImpl] - Time zone set to ‘Europe/Berlin’.
2025-02-06 13:08:25.798 [INFO ] [.core.internal.i18n.I18nProviderImpl] - Location set to ‘49.03143724678271,8.390995860099794’.
2025-02-06 13:08:25.801 [INFO ] [.core.internal.i18n.I18nProviderImpl] - Locale set to ‘de_DE’.
2025-02-06 13:08:26.819 [INFO ] [rketplace.MarketplaceBundleInstaller] - Reinstalling missing marketplace bundle: marketplace:146648
2025-02-06 13:08:26.825 [WARN ] [rketplace.MarketplaceBundleInstaller] - Failed reinstalling add-on from cache
Things or items not modified => no change in event.log
log4j2.xml file replaced completely
No change of the situation so far.
I don’t understand, why in the log “Starting openHAB 4.0.4” is mentioned. Version is 4.3.2.
I got it: I tried to remove the HUE-BIinding by UI => no success, but with the help of “Cant Remove Bindings” I identified the number of the binding, could delete it, after cleaning the cache and reboot …
Now everything is fine again