Closed matmai closed 4 years ago
What version of Java are you using? @mstormi we may need to make sure that permission corrections run after each openHAB upgrade.
openjdk version "1.8.0_252" OpenJDK Runtime Environment (Zulu 8.46.0.225-CA-linux_aarch32hf) (build 1.8.0_252-b225) OpenJDK Client VM (Zulu 8.46.0.225-CA-linux_aarch32hf) (build 25.252-b225, mixed mode, Evaluation)
That's the OH cache. It is removed when you upgrade the openhab2 package. If that now exists with wrong permissions that's not because of openHABian. You have possibly manually started openHAB ?
@ecdye it doesn't hurt to run permissions_corrections() after any upgrade but I wouldn't know how we could have caused that
During the update process the log says that OH was not running:
...
run-parts: executing /etc/kernel/postinst.d/unattended-upgrades 4.19.118-v8+ /boot/kernel8.img
openhab2 (2.5.6-2) wird eingerichtet ...
[openHAB] openHAB was not running so will not start after upgrade.
[openHAB] Please use the command:
sudo /bin/systemctl start openhab2.service
ca-certificates (20200601~deb10u1) wird eingerichtet ...
...
If I understand you right starting OH with openhab-cli start could have caused the problem?
Seems that could be the case because it could not acquire the lock:
$ sudo systemctl status openhab2.service
● openhab2.service - openHAB 2 - empowering the smart home
Loaded: loaded (/usr/lib/systemd/system/openhab2.service; enabled; vendor preset: enabled)
Active: inactive (dead) since Sun 2020-06-28 12:02:27 CEST; 4min 2s ago
Docs: https://www.openhab.org/docs/
https://community.openhab.org
Main PID: 19791 (code=exited, status=0/SUCCESS)
Jun 28 12:02:19 openhab karaf[19791]: at org.eclipse.osgi.internal.framework.EquinoxBundle$SystemBundle$EquinoxSystemModule.asyncStop(EquinoxBundle.java:156)
Jun 28 12:02:19 openhab karaf[19791]: at org.eclipse.osgi.internal.framework.EquinoxBundle$SystemBundle.stop(EquinoxBundle.java:262)
Jun 28 12:02:19 openhab karaf[19791]: at org.eclipse.osgi.internal.framework.EquinoxBundle$SystemBundle.stop(EquinoxBundle.java:267)
Jun 28 12:02:19 openhab karaf[19791]: at org.eclipse.osgi.launch.Equinox.stop(Equinox.java:123)
Jun 28 12:02:19 openhab karaf[19791]: at org.apache.karaf.main.Main$2.run(Main.java:354)
Jun 28 12:02:19 openhab karaf[19791]: Caused by: java.util.concurrent.TimeoutException: Timeout after waiting 5 seconds to acquire the lock.
Jun 28 12:02:19 openhab karaf[19791]: at org.eclipse.osgi.container.Module.lockStateChange(Module.java:334)
Jun 28 12:02:19 openhab karaf[19791]: ... 5 more
Jun 28 12:02:27 openhab systemd[1]: openhab2.service: Succeeded.
Jun 28 12:02:27 openhab systemd[1]: Stopped openHAB 2 - empowering the smart home.
If I understand you right starting OH with openhab-cli start could have caused the problem?
Yes. Did you do that? as root?
Yes, I executed sudo openhab-cli start
. After all I think that is the root cause.
Indeed, you must not do that.
If you wanted to start OH, use systemctl start openhab2
.
I should add a "are you sure?" note to openhab-cli start
Thanks for clarifying this issue!
openhabian-config was upgraded from [master]v1.5-602(f254443) to [master]v1.5-684(4157102) and raspberrypi-kernel from (1.20200601-1) to (1.20200212-1). After upgrading to openHAB 2.5.6-2 via openhabian-config service did not start.
Output from /var/log/openhab2/openhab.log /var/log/openhab2/events.log:
After fixing file permissions via openhabian-config (menu 14) it worked again.