Startup fails after (not recognized upgrade) under debian with openhab2-offline and openhab2-online

Hi,

after upgrading the openhab2-online runtime, openhab2 runtime is not starting anymore giving the following error in syslog:

1275 Nov 11 15:15:44 gautama start.sh[2191]: Launching the openHAB runtime...
1276 Nov 11 15:15:45 gautama start.sh[2191]: karaf: KARAF_BASE is not valid: /usr/share/openhab2/userdata
1277 Nov 11 15:15:45 gautama systemd[1]: openhab2.service: main process exited, code=exited, status=1/FAILURE
1278 Nov 11 15:15:45 gautama systemd[2278]: Failed at step EXEC spawning /usr/share/openhab2/runtime/karaf/bin/stop: No such file or directory
1279 Nov 11 15:15:45 gautama systemd[1]: openhab2.service: control process exited, code=exited status=203
1280 Nov 11 15:15:45 gautama systemd[1]: Unit openhab2.service entered failed state.
1281 Nov 11 15:15:45 gautama systemd[1]: openhab2.service holdoff time over, scheduling restart.
1282 Nov 11 15:15:45 gautama systemd[1]: Stopping openHAB 2 - empowering the smart home...
1283 Nov 11 15:15:45 gautama systemd[1]: Starting openHAB 2 - empowering the smart home...
1284 Nov 11 15:15:45 gautama systemd[1]: openhab2.service start request repeated too quickly, refusing to start.
1285 Nov 11 15:15:45 gautama systemd[1]: Failed to start openHAB 2 - empowering the smart home.
1286 Nov 11 15:15:45 gautama systemd[1]: Unit openhab2.service entered failed state.

I think the important part is this here:

1276 Nov 11 15:15:45 gautama start.sh[2191]: karaf: KARAF_BASE is not valid: /usr/share/openhab2/userdata

Additionally, the upgrade of the openhab-online package runs fine and successful, but it is not recognized by aptitude, i.e., a necessary upgrade for this package is still shown after the upgrade. Aptitude still wants to upgrade to the same version:

root@gautama:/opt/openhab2_backup# aptitude upgrade
The following packages will be upgraded:
  openhab2-offline
1 packages upgraded, 0 newly installed, 0 to remove and 0 not upgraded.
Need to get 0 B/165 MB of archives. After unpacking 0 B will be used.
Do you want to continue? [Y/n/?] v

Versions will be shown.

The following packages will be upgraded:
  openhab2-offline [2.0.0~20161111033050 -> 2.0.0~20161111033050]
1 packages upgraded, 0 newly installed, 0 to remove and 0 not upgraded.
Need to get 0 B/165 MB of archives. After unpacking 0 B will be used.
Do you want to continue? [Y/n/?]

I changed from openhab-online to openhab-offline (as indicated in the above snippet) but there I have a) the same errors and b) the same strange upgrade behavior.

Does anyone suffer from the same problem(s)?
Thank you very much in advance.

Best,
Robin

Thank you. Sorry, the structure of this forum is quite new for me, so I did not recognize the announcement as important for me.

Hi,
I had the same problem, ran your script and it’s working fine now

Thanks

This also fixed my openhab2 installation (starts again), but now I get the following two errors:

22:30:39.701 [WARN ] [org.apache.felix.fileinstall        ] - Error while starting bundle: file:/usr/share/openhab2/addons/org.openhab.binding.isy-1.9.0-SNAPSHOT.jar
org.osgi.framework.BundleException: Could not resolve module: org.openhab.binding.isy [201]
  Unresolved requirement: Import-Package: org.openhab.core.binding

	at org.eclipse.osgi.container.Module.start(Module.java:434)[org.eclipse.osgi-3.10.2.v20150203-1939.jar:]
	at org.eclipse.osgi.internal.framework.EquinoxBundle.start(EquinoxBundle.java:393)[org.eclipse.osgi-3.10.2.v20150203-1939.jar:]
	at org.apache.felix.fileinstall.internal.DirectoryWatcher.startBundle(DirectoryWatcher.java:1245)[8:org.apache.felix.fileinstall:3.5.0]
	at org.apache.felix.fileinstall.internal.DirectoryWatcher.startBundles(DirectoryWatcher.java:1217)[8:org.apache.felix.fileinstall:3.5.0]
	at org.apache.felix.fileinstall.internal.DirectoryWatcher.doProcess(DirectoryWatcher.java:509)[8:org.apache.felix.fileinstall:3.5.0]
	at org.apache.felix.fileinstall.internal.DirectoryWatcher.process(DirectoryWatcher.java:358)[8:org.apache.felix.fileinstall:3.5.0]
	at org.apache.felix.fileinstall.internal.DirectoryWatcher.run(DirectoryWatcher.java:310)[8:org.apache.felix.fileinstall:3.5.0]
22:30:39.708 [WARN ] [org.apache.felix.fileinstall        ] - Error while starting bundle: file:/usr/share/openhab2/addons/org.openhab.binding.nx584-2.0.0-SNAPSHOT.jar
org.osgi.framework.BundleException: Could not resolve module: org.openhab.binding.nx584 [200]
  Unresolved requirement: Import-Package: gnu.io

	at org.eclipse.osgi.container.Module.start(Module.java:434)[org.eclipse.osgi-3.10.2.v20150203-1939.jar:]
	at org.eclipse.osgi.internal.framework.EquinoxBundle.start(EquinoxBundle.java:393)[org.eclipse.osgi-3.10.2.v20150203-1939.jar:]
	at org.apache.felix.fileinstall.internal.DirectoryWatcher.startBundle(DirectoryWatcher.java:1245)[8:org.apache.felix.fileinstall:3.5.0]
	at org.apache.felix.fileinstall.internal.DirectoryWatcher.startBundles(DirectoryWatcher.java:1217)[8:org.apache.felix.fileinstall:3.5.0]
	at org.apache.felix.fileinstall.internal.DirectoryWatcher.doProcess(DirectoryWatcher.java:509)[8:org.apache.felix.fileinstall:3.5.0]
	at org.apache.felix.fileinstall.internal.DirectoryWatcher.process(DirectoryWatcher.java:358)[8:org.apache.felix.fileinstall:3.5.0]
	at org.apache.felix.fileinstall.internal.DirectoryWatcher.run(DirectoryWatcher.java:310)[8:org.apache.felix.fileinstall:3.5.0]

This used to work, so I wonder if it possible had to do something with the upgrade.

Suggestions appreciated!