openhab-core
openhab-core copied to clipboard
'systemctl stop openhab' takes a long time and throws an exception
With openhab 3.0.0 on Fedora, installed from the yum repo and managed by systemd... every time I try and stop OH using systemctl stop openhab
it logs this in the systemd journal:
Dec 17 00:41:28 xxx systemd[1]: Stopping openHAB - empowering the smart home...
Dec 17 00:41:33 xxx karaf[1204679]: org.osgi.framework.BundleException: Unable to acquire the state change lock for the module: osgi.identity; osgi.identity="org.eclipse.osgi"; type="osgi.bundle"; version:Version="3.12.100.v20180210-1608"; singleton:="true" [id=0] STOPPED [STOPPED]
Dec 17 00:41:33 xxx karaf[1204679]: at org.eclipse.osgi.container.Module.lockStateChange(Module.java:337)
Dec 17 00:41:33 xxx karaf[1204679]: at org.eclipse.osgi.internal.framework.EquinoxBundle$SystemBundle$EquinoxSystemModule.asyncStop(EquinoxBundle.java:156)
Dec 17 00:41:33 xxx karaf[1204679]: at org.eclipse.osgi.internal.framework.EquinoxBundle$SystemBundle.stop(EquinoxBundle.java:262)
Dec 17 00:41:33 xxx karaf[1204679]: at org.eclipse.osgi.internal.framework.EquinoxBundle$SystemBundle.stop(EquinoxBundle.java:267)
Dec 17 00:41:33 xxx karaf[1204679]: at org.eclipse.osgi.launch.Equinox.stop(Equinox.java:123)
Dec 17 00:41:33 xxx karaf[1204679]: at org.apache.karaf.main.Main$2.run(Main.java:354)
Dec 17 00:41:33 xxx karaf[1204679]: Caused by: java.util.concurrent.TimeoutException: Timeout after waiting 5 seconds to acquire the lock.
Dec 17 00:41:33 xxx karaf[1204679]: at org.eclipse.osgi.container.Module.lockStateChange(Module.java:334)
Dec 17 00:41:33 xxx karaf[1204679]: ... 5 more
Dec 17 00:41:43 xxx systemd[1]: openhab.service: Succeeded.
One more thing: I found the (empty) file /var/lib/openhab/cache/org.eclipse.osgi/.manager/.fileTableLock, stopped OH and removed it. But it came right back upon restart. Also tried clearing the entire /var/lib/openhab/cache directory and letting OH rebuild it on the next restart, but same thing again.
Is this still the case with openHAB 3.2?
This issue has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs. Thank you for your contributions.