Since upgrading to unstable 1104/1106 OH2.2.0 doesnt run

Clearly got myself in an OH2 pickle again. This is a completely clean install (clean, as in uninstalled, nuked dirs)…

openhab.log now just reads;

Dec 04, 2017 3:28:00 PM org.apache.karaf.main.Main launch
INFO: Installing and starting initial bundles
Dec 04, 2017 3:28:04 PM org.apache.karaf.main.Main launch
INFO: All initial bundles installed and set to start
Dec 04, 2017 3:28:04 PM org.apache.karaf.main.lock.SimpleFileLock lock
INFO: Trying to lock /var/lib/openhab2/tmp/lock
Dec 04, 2017 3:28:04 PM org.apache.karaf.main.lock.SimpleFileLock lock
INFO: Lock acquired
Dec 04, 2017 3:28:04 PM org.apache.karaf.main.Main$KarafLockCallback lockAquired
INFO: Lock acquired. Setting startlevel to 100

I’ve even elected to go back to an earlier build (2.2.0~20171125131803-1) and am facing the same thing.

The service is starting, but thats about it;

vini@openhab2:~ $ sudo systemctl status openhab2.service
[sudo] password for vini:
● openhab2.service - openHAB 2 - empowering the smart home
Loaded: loaded (/usr/lib/systemd/system/openhab2.service; enabled; vendor preset: enabled)
Active: active (running) since Mon 2017-12-04 15:27:51 UTC; 3min 49s ago
Docs: http://docs.openhab.org
https://community.openhab.org
Main PID: 469 (java)
CGroup: /system.slice/openhab2.service
└─469 /usr/bin/java -Dopenhab.home=/usr/share/openhab2 -Dopenhab.conf=/etc/openhab2 -Dopenhab.runtime=/usr/share/openhab2/runtime -Dopenhab.userdata=/var/lib/openhab2 -Dopenhab.logdir=/var/log/openhab2 -Dfelix.cm.dir=/var/lib/
Dec 04 15:27:51 openhab2 systemd[1]: Started openHAB 2 - empowering the smart home.

netstat doesn’t even show a port as being opened…

Same problems here. After fixing the problem in addons.cfg , everything is fine. After another update / restart the problem is back again.

EDIT: Even after restarting the service,

package = expert
ui = "paper,basic"
transformation = map,regex,xslt,exec,javascript,scale,xpath,jsonpath
remote = true
binding = homematic,milight,wol1,network
misc = restdocs
is back again.

Could be related to one of the issues that seems to have been on going for a while with snapshots where by installation of openhab2-addons gets things messed up on restarts. Only just started dabbling in snapshots myself this week and got very frustrated with trying to get a clean snapshot install (based on the documentation) running on a clean machine and eventually nailed it to this lot:

So I’ve now got a clean OH snapshot running without doing the apt-get for the addons and I’m testing migration of my OH2.1 version stuff. Basically the addons are available from the online repos so you can live without them offline.

Not sure if the latest and greatest snapshot should now have a proper fix (or is in the build pipeline) as the maintainers are talking about prerparing for a 2.2 release.

I can’t even get the Stable to run - the HTTP server suggests its running, but just gives Error 404. Jetty not found.

I’m gonna blow my OS, grrrr

Dec 04, 2017 6:51:27 PM org.apache.karaf.main.Main launch
INFO: Installing and starting initial bundles
Dec 04, 2017 6:51:28 PM org.apache.karaf.main.Main launch
INFO: All initial bundles installed and set to start
Dec 04, 2017 6:51:28 PM org.apache.karaf.main.lock.SimpleFileLock lock
INFO: Trying to lock /var/lib/openhab2/tmp/lock
Dec 04, 2017 6:51:28 PM org.apache.karaf.main.lock.SimpleFileLock lock
INFO: Lock acquired
Dec 04, 2017 6:51:28 PM org.apache.karaf.main.Main$KarafLockCallback lockAquired
INFO: Lock acquired. Setting startlevel to 100
2017-12-04 18:52:58.529 [INFO ] [.dashboard.internal.DashboardService] - Started dashboard at http://192.168.1.11:8181
2017-12-04 18:52:58.536 [INFO ] [.dashboard.internal.DashboardService] - Started dashboard at https://192.168.1.11:8443
2017-12-04 18:57:31.186 [INFO ] [.dashboard.internal.DashboardService] - Stopped dashboard
Dec 04, 2017 6:58:15 PM org.apache.karaf.main.lock.SimpleFileLock lock
INFO: Trying to lock /var/lib/openhab2/tmp/lock
Dec 04, 2017 6:58:15 PM org.apache.karaf.main.lock.SimpleFileLock lock
INFO: Lock acquired
Dec 04, 2017 6:58:15 PM org.apache.karaf.main.Main$KarafLockCallback lockAquired
INFO: Lock acquired. Setting startlevel to 100
2017-12-04 18:58:59.598 [INFO ] [.dashboard.internal.DashboardService] - Started dashboard at http://192.168.1.11:8181
2017-12-04 18:58:59.644 [INFO ] [.dashboard.internal.DashboardService] - Started dashboard at https://192.168.1.11:8443

I’m curious as to how you uninstalled. By “nuke directories”, do you mean manually deleted directories, then APT would have seen this as a user configuration, and would not have repopulated items when you reinstalled.

To completely wipe openHAB’s directories (move anything important away first):

sudo apt purge openhab2* && sudo apt install openhab2

Then try starting again to see if this works, if not then there’s definately something wrong with your OS configuration.

Hi @m3tatai, does this keep happening with the latest snapshot? I thought this would have been improved after #1103.

I’m still seeing these issues on the current 1112 build. After upgrading today, I am also getting stuck on the installing UIs.

I can often get back up and running with a manual stop and start of OH2, or a Stop OH2 and the reboot of the server.

Is this with a apt or manual install? It would be good to investigate this further.

I am on Ubuntu 16 Server running as a VM with ESXi server and using apt-get install and upgrades. Just had the stuck at UIs earlier today after the upgrade to 1112. But can typically get it going with a reboot.

And are you using the openhab2-addons* packages?

Yes, and I think that is where the problem is occurring. I have 3 addons in my \usr\share\openhab2\addons directory, They are the test security zwave binding, osram lightify, and myq addons. And in the logs, I can see those 3 bindings are getting an error with an uresolved requirement of com.google.common.base

2017-12-04 13:48:30.509 [WARN ] [org.apache.felix.fileinstall        ] - Error while starting bundle: file:/usr/share/openhab2/addons/org.openhab.binding.zwave-2.2.0-SNAPSHOT.jar
org.osgi.framework.BundleException: Could not resolve module: org.openhab.binding.zwave [11]
  Unresolved requirement: Import-Package: com.google.common.collect

	at org.eclipse.osgi.container.Module.start(Module.java:444) [?:?]
	at org.eclipse.osgi.internal.framework.EquinoxBundle.start(EquinoxBundle.java:383) [?:?]
	at org.apache.felix.fileinstall.internal.DirectoryWatcher.startBundle(DirectoryWatcher.java:1253) [8:org.apache.felix.fileinstall:3.5.8]
	at org.apache.felix.fileinstall.internal.DirectoryWatcher.startBundles(DirectoryWatcher.java:1225) [8:org.apache.felix.fileinstall:3.5.8]
	at org.apache.felix.fileinstall.internal.DirectoryWatcher.doProcess(DirectoryWatcher.java:512) [8:org.apache.felix.fileinstall:3.5.8]
	at org.apache.felix.fileinstall.internal.DirectoryWatcher.process(DirectoryWatcher.java:361) [8:org.apache.felix.fileinstall:3.5.8]
	at org.apache.felix.fileinstall.internal.DirectoryWatcher.run(DirectoryWatcher.java:312) [8:org.apache.felix.fileinstall:3.5.8]
2017-12-04 13:48:30.523 [WARN ] [org.apache.felix.fileinstall        ] - Error while starting bundle: file:/usr/share/openhab2/addons/org.openhab.binding.myq-1.10.0-SNAPSHOT.jar
org.osgi.framework.BundleException: Could not resolve module: org.openhab.binding.myq [12]
  Unresolved requirement: Import-Package: com.google.common.base

	at org.eclipse.osgi.container.Module.start(Module.java:444) [?:?]
	at org.eclipse.osgi.internal.framework.EquinoxBundle.start(EquinoxBundle.java:383) [?:?]
	at org.apache.felix.fileinstall.internal.DirectoryWatcher.startBundle(DirectoryWatcher.java:1253) [8:org.apache.felix.fileinstall:3.5.8]
	at org.apache.felix.fileinstall.internal.DirectoryWatcher.startBundles(DirectoryWatcher.java:1225) [8:org.apache.felix.fileinstall:3.5.8]
	at org.apache.felix.fileinstall.internal.DirectoryWatcher.doProcess(DirectoryWatcher.java:512) [8:org.apache.felix.fileinstall:3.5.8]
	at org.apache.felix.fileinstall.internal.DirectoryWatcher.process(DirectoryWatcher.java:361) [8:org.apache.felix.fileinstall:3.5.8]
	at org.apache.felix.fileinstall.internal.DirectoryWatcher.run(DirectoryWatcher.java:312) [8:org.apache.felix.fileinstall:3.5.8]
2017-12-04 13:48:30.527 [WARN ] [org.apache.felix.fileinstall        ] - Error while starting bundle: file:/usr/share/openhab2/addons/org.openhab.binding.osramlightify-2.2.0-SNAPSHOT.jar
org.osgi.framework.BundleException: Could not resolve module: org.openhab.binding.osramlightify [10]
  Unresolved requirement: Import-Package: com.google.common.base

Excellent, that might be a good place to start. @Kai, I recognise felix.fileinstall as a cause for a hanging start up. What’s your take on this?

Hi Benji,

I did apt-get remove openhab2* and then manually removed the leftover files in the dirs…

Followed by an apt-get install openhab2…

I just did an ‘apt-get update’ to the latest #1112 and it killed startup of my simple test installation, wouldn’t load the UIs. Before the update it was apt-get installed without addons as previously said, plenty of reinstalls with purges to get it running. Wouldn’t usually consider a server reboot for this sort of software but did give it a shot and it worked?! That would suggest the service management wasn’t or isn’t stop/starting properly although only did the documented method. I’ll pay a little more attention the services and processes if it shows again.

Yes, that wouldn’t have worked, because configurable system files won’t replace themselves. To do this without a purge you must specify:

sudo apt-get -o Dpkg::Options::="--force-confmiss" install openhab2

This isn’t just for openHAB however, this is the same for anything apt installed. To clean everything related to a program you must use apt-get purge. If you manually delete things without purging, the things set as “configurable” won’t replace themselves because apt assumes that deleting the file was a choice you made.

This might have been your java process was also updated? But yes please, any information you can give me so that I can look into it will be great.

As a tip, if the service isn’t working, then you can view the logfile for the service with:

sudo journalctl -u openhab2.service -b

Useful to know. My fat fingers just had me remove the /usr/ dir, so if my OS wasnt broken before, it is now.

Clean OS (Raspbian Stretch Lite), fiddling to get Oracle Java installed and then running the apt-get on the unstable, has me with a working OpenHab instance.

Now just to reconfigure it all :s

1 Like

There was no java update, it was only:
Upgrade: raspi-config:armhf (20171127, 20171201), openhab2:armhf (2.2.0~20171203035709-1, 2.2.0~20171204165516-1)

The service itself was running ok in terms of stop/start, openhab.log was reflecting requests, just not sure why a reboot worked as I have run Linux servers for long enough that I generally know when I should reboot and to me this didn’t deserve it. But as it was enough for now I can’t reproduce so I’ll progress on testing 2.1 migration and see if it plays ball. Thanks.

1 Like

My OH install is also no longer starting up. Unsure what could have caused it with only doing a stop of OH2 and then a reboot of Ubunut

This is what I see:

- Logs begin at Mon 2017-12-04 18:42:48 EST, end at Mon 2017-12-04 19:05:10 EST. --
Dec 04 18:43:08 OpenHab2 systemd[1]: Started openHAB 2 - empowering the smart home.
Dec 04 18:43:18 OpenHab2 karaf[1137]: There is a Root instance already running with name openhab and pid 113
Dec 04 18:43:18 OpenHab2 systemd[1]: openhab2.service: Main process exited, code=exited, status=1/FAILURE
Dec 04 18:43:24 OpenHab2 karaf[1496]: Can't connect to the container. The container is not running.
Dec 04 18:43:24 OpenHab2 systemd[1]: openhab2.service: Control process exited, code=exited status=1
Dec 04 18:43:24 OpenHab2 systemd[1]: openhab2.service: Unit entered failed state.
Dec 04 18:43:24 OpenHab2 systemd[1]: openhab2.service: Failed with result 'exit-code'.
Dec 04 18:43:29 OpenHab2 systemd[1]: openhab2.service: Service hold-off time over, scheduling restart.
Dec 04 18:43:29 OpenHab2 systemd[1]: Stopped openHAB 2 - empowering the smart home.
Dec 04 18:43:29 OpenHab2 systemd[1]: Started openHAB 2 - empowering the smart home.
Dec 04 18:43:30 OpenHab2 karaf[1747]: There is a Root instance already running with name openhab and pid 113
Dec 04 18:43:30 OpenHab2 systemd[1]: openhab2.service: Main process exited, code=exited, status=1/FAILURE
Dec 04 18:43:30 OpenHab2 karaf[1878]: Can't connect to the container. The container is not running.
Dec 04 18:43:30 OpenHab2 systemd[1]: openhab2.service: Control process exited, code=exited status=1
Dec 04 18:43:30 OpenHab2 systemd[1]: openhab2.service: Unit entered failed state.
Dec 04 18:43:30 OpenHab2 systemd[1]: openhab2.service: Failed with result 'exit-code'.
Dec 04 18:43:35 OpenHab2 systemd[1]: openhab2.service: Service hold-off time over, scheduling restart.
Dec 04 18:43:35 OpenHab2 systemd[1]: Stopped openHAB 2 - empowering the smart home.
Dec 04 18:43:35 OpenHab2 systemd[1]: Started openHAB 2 - empowering the smart home.
Dec 04 18:43:35 OpenHab2 karaf[2027]: There is a Root instance already running with name openhab and pid 113
Dec 04 18:43:35 OpenHab2 systemd[1]: openhab2.service: Main process exited, code=exited, status=1/FAILURE
Dec 04 18:43:36 OpenHab2 karaf[2158]: Can't connect to the container. The container is not running.
Dec 04 18:43:36 OpenHab2 systemd[1]: openhab2.service: Control process exited, code=exited status=1
Dec 04 18:43:36 OpenHab2 systemd[1]: openhab2.service: Unit entered failed state.
Dec 04 18:43:36 OpenHab2 systemd[1]: openhab2.service: Failed with result 'exit-code'.

EDIT. Did a reinstall of OH2 with and that got the service started, but then same issues with the UIs not loading and the above error I mentioned up above.

sudo apt-get install --reinstall openhab2