At boot time, openhab log cycles over and over and UI not available

  • Platform information:

Release = Raspbian GNU/Linux 10 (buster)
Kernel = Linux 5.10.17-v7+
Platform = Raspberry Pi 2 Model B Rev 1.1
CPU Usage = 0.25% avg over 4 cpu(s) (4 core(s) x 1 socket(s))
CPU Load = 1m: 3.35, 5m: 1.06, 15m: 0.37
Memory = Free: 0.64GB (68%), Used: 0.30GB (32%), Total: 0.95GB
Swap = Free: 2.39GB (100%), Used: 0.00GB (0%), Total: 2.39GB
Root = Free: 20.11GB (74%), Used: 6.93GB (26%), Total: 28.23GB
Processes = 127 running processes of 32768 maximum processes

I’ve been rebooting my rPi as I made modifications to my pool controller software. Got that working but now openhab logs shows it looping and the GUI is unavailable.

Shutting down or restarting the openhab runtime, gives the following error

Launching the openHAB runtime…
Property karaf.framework.åquionx must be set in the etc/config.properties configuration file
Error occurred shutting down framework: java.lang.IllegalArgumentException: Property karaf.framework.åquionx must be set in the etc/config.properties configuration file
java.lang.IllegalArgumentException: Property karaf.framework.åquionx must be set in the etc/config.properties configuration file
at org.apache.karaf.main.ConfigProperties.getPropertyOrFail(ConfigProperties.java:315)
at org.apache.karaf.main.ConfigProperties.getFramework(ConfigProperties.java:327)
at org.apache.karaf.main.ConfigProperties.(ConfigProperties.java:246)
at org.apache.karaf.main.Main.updateInstancePidAfterShutdown(Main.java:227)
at org.apache.karaf.main.Main.main(Main.java:192)

I cleared the cache but stuck on what next to try.
sudo openhab-cli status shows

A systemd service configuration exists…
Use ‘sudo /bin/systemctl status openhab.service’ to find the status of an openHAB service
openHAB is not running.

sudo /bin/systemctl status openhab.service

openhab.service - openHAB - empowering the smart home
Loaded: loaded (/lib/systemd/system/openhab.service; enabled; vendor preset: enabled)
Active: active (running) since Thu 2021-04-15 20:22:37 PDT; 1s ago
Docs: Introduction | openHAB
https://community.openhab.org
Main PID: 10111 (karaf)
Tasks: 7 (limit: 2181)
CGroup: /system.slice/openhab.service
├─10111 /bin/sh /usr/share/openhab/runtime/bin/karaf daemon
├─10190 /usr/bin/java -version
└─10191 grep ^IBM
Apr 15 20:22:37 casajuarez systemd[1]: Started openHAB - empowering the smart home.

This is the error I get when I try starting openhab from the CLI with debug enabled

sudo openhab-cli start --debug

A systemd service configuration exists…
Use ‘sudo /bin/systemctl start openhab.service’ to start an openHAB service
Launching an instance in this terminal…
Launching the openHAB runtime…
Listening for transport dt_socket at address: 5005
Property karaf.framework.åquioox must be set in the etc/config.properties configuration file
Error occurred shutting down framework: java.lang.IllegalArgumentException: Property karaf.framework.åquioox must be set in the etc/config.properties configuration file
java.lang.IllegalArgumentException: Property karaf.framework.åquioox must be set in the etc/config.properties configuration file
at org.apache.karaf.main.ConfigProperties.getPropertyOrFail(ConfigProperties.java:315)
at org.apache.karaf.main.ConfigProperties.getFramework(ConfigProperties.java:327)
at org.apache.karaf.main.ConfigProperties.(ConfigProperties.java:246)
at org.apache.karaf.main.Main.updateInstancePidAfterShutdown(Main.java:227)
at org.apache.karaf.main.Main.main(Main.java:192)

This doesn’t look right, it should probably be karaf.framework.equinox. Looks like something might have been messed up in the karaf installation. Try repairing it by running sudo apt install --reinstall openhab and see if it helps

@pacive thank you for that command. I’m now able to boot up Openhab. Frontail log (IP address:9001) is not updating any longer. Do you have any suggestions on fixing that?

Try restarting the service first (sudo systemctl restart frontail), it might have lost its handle to the log file when reinstalling.

Do you run openHABian ?
If no you should be worried this is sign of your SD card wearing out.
Either way, I’d replace that asap.

I went to the /var/log/openhab and the events and openhab logs are not populating. I tried sudo systemctl restart frontail and it did not work.

Then I agree with @mstormi, It might be that your SD-card is failing, so you should definitely save what can be saved and replace it.

Fortunately, I do have openHABian and I recently did a backup. I haven’t tested the restore so I don’t know if this will work. I run a nodejs-PoolController from Tagyoureit as well as pm2 to manage their processes. Yesterday, I was doing some git pulls to update the client and server software. It also uses java 11. I was did several reboots to verify the pm2 autostartup and restarting the app.js state of the client/server software when everything went awry.

Looking to replace my SD card but I wanted know where I can get a copy of the log4j2.xml file. I looked at the journalctl entries and I discovered that error in processing the log4j2.xml file. I looked at it and found some different characters so I would like to replace with the default log4j2.xml that is stored at /var/lib/openhab/etc. Here’s a snippet from sudo journalctl -u openhab.service -b

Apr 16 10:34:11 casajuarez systemd[1]: Started openHAB - empowering the smart home.
Apr 16 10:35:20 casajuarez karaf[837]: [Fatal Error] log4j2.xml:1:30: Invalid byte 1 of 1-byte UTF-8 sequence.
Apr 16 10:35:21 casajuarez karaf[837]: org.ops4j.pax.logging.pax-logging-api [log4j2] ERROR : Error parsing /var/lib/openhab/etc/log4j2.xml Ignored FQCN: org.apache.logging.log4j.spi.Abs
Apr 16 10:35:21 casajuarez karaf[837]: org.xml.sax.SAXParseException; systemId: file:///var/lib/openhab/etc/log4j2.xml; lineNumber: 1; columnNumber: 30; Invalid byte 1 of 1-byte UTF-8 se
Apr 16 10:35:21 casajuarez karaf[837]: at java.xml/com.sun.org.apache.xerces.internal.parsers.DOMParser.parse(DOMParser.java:262)

Realized I had another installation of OH3 so I copied that log4j2.xml file to rPI. It worked and I’m back up and running. Thanks