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

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

Okay, that’s interesting. This particular line:

Dec 04 18:43:30 OpenHab2 karaf[1747]: There is a Root instance already running with name openhab and pid 113

Says that openHAB is already running. Are you up and running with:

sudo kill -9 113

sudo systemctl daemon-reload
sudo systemctl enable openhab2.service
sudo systemctl start openhab2.service

Replied before seeing you edit, will reply with more info too.

@ptmuldoon, would you be able to temporarily disable the three bindings in your addons folder? I’m curious to see if this is still the root cause of the issue?

OK. I removed all 3 bindings from the Addon’s folder, and that did appear to get rid of the earlier errors of felix.fileinstall, but after Stop and Start of OH2, did get this weird error, although the Uis did load

2017-12-04 19:38:24.947 [INFO ] [basic.internal.servlet.WebAppServlet] - Started Basic UI at /basicui/app
2017-12-04 19:38:24.996 [ERROR] [org.apache.felix.scr                ] - Circular reference detected trying to get service {org.openhab.ui.dashboard.DashboardTile}={component.name=org.openhab.ui.basicui.dashboardtile, component.id=194, service.id=299, service.bundleid=213, service.scope=bundle}
 stack of references: ServiceReference: {org.openhab.ui.dashboard.DashboardTile}={component.name=org.openhab.ui.basicui.dashboardtile, component.id=194, service.id=299, service.bundleid=213, service.scope=bundle}
ServiceReference: {org.openhab.ui.dashboard.internal.DashboardService}={component.name=org.openhab.dashboard, component.id=195, service.id=300, service.bundleid=191, service.scope=bundle}

java.lang.Exception: stack trace
	at org.apache.felix.scr.impl.ComponentRegistry.enterCreate(ComponentRegistry.java:510) ~[?:?]
	at org.apache.felix.scr.impl.BundleComponentActivator.enterCreate(BundleComponentActivator.java:809) ~[?:?]
	at org.apache.felix.scr.impl.manager.SingleComponentManager.getService(SingleComponentManager.java:817) ~[?:?]
	at org.eclipse.osgi.internal.serviceregistry.ServiceFactoryUse$1.run(ServiceFactoryUse.java:212) ~[?:?]
.....
..... Alot more

And then after a separate OH2 stop and system restart, that error is gone and things look good.

I then stopped OH2 again, put the bindings back into the AddOns folder, and another system restart and I am not seeing that felix.fileinstall, error this time. Although I am seeing a bunch of Hue binding errors.

2017-12-04 19:59:38.782 [WARN ] [ome.core.thing.internal.ThingManager] - Initializing handler for thing 'hue:0210:00178824e7e9:1' takes more than 5000ms.
2017-12-04 19:59:38.829 [WARN ] [nal.common.AbstractInvocationHandler] - Timeout of 5000ms exceeded while calling method 'ThingHandler.initialize()' on 'org.eclipse.smarthome.binding.hue.handler.HueLightHandler@1945d42'. Thread 'safeCall-8' (254) is in state 'WAITING'
	at sun.misc.Unsafe.park(Native Method)
	at java.util.concurrent.locks.LockSupport.park(LockSupport.java:175)
	at java.util.concurrent.locks.AbstractQueuedSynchronizer.parkAndCheckInterrupt(AbstractQueuedSynchronizer.java:836)
	at java.util.concurrent.locks.AbstractQueuedSynchronizer.acquireQueued(AbstractQueuedSynchronizer.java:870)
	at java.util.concurrent.locks.AbstractQueuedSynchronizer.acquire(AbstractQueuedSynchronizer.java:1199)
	at java.util.concurrent.locks.ReentrantLock$NonfairSync.lock(ReentrantLock.java:209)
	at java.util.concurrent.locks.ReentrantLock.lock(ReentrantLock.java:285)
	at org.eclipse.smarthome.core.thing.internal.ThingManager.thingUpdated(ThingManager.java:406)
	at org.eclipse.smarthome.core.thing.internal.ThingRegistryImpl.notifyTrackers(ThingRegistryImpl.java:222)
	at org.eclipse.smarthome.core.thing.internal.ThingRegistryImpl.notifyListenersAboutUpdatedElement(ThingRegistryImpl.java:145)
	at org.eclipse.smarthome.core.thing.internal.ThingRegistryImpl.notifyListenersAboutUpdatedElement(ThingRegistryImpl.java:1)
	at org.eclipse.smarthome.core.common.registry.AbstractRegistry.updated(AbstractRegistry.java:188)
	at org.eclipse.smarthome.core.common.registry.AbstractRegistry.updated(AbstractRegistry.java:1)
	at org.eclipse.smarthome.core.common.registry.AbstractProvider.notifyListeners(AbstractProvider.java:62)
	at org.eclipse.smarthome.core.common.registry.AbstractProvider.notifyListenersAboutUpdatedElement(AbstractProvider.java:86)
	at org.eclipse.smarthome.core.common.registry.AbstractManagedProvider.update(AbstractManagedProvider.java:132)
	at org.eclipse.smarthome.core.thing.internal.ThingManager$1$1.run(ThingManager.java:233)
	at org.eclipse.smarthome.core.thing.internal.ThingManager$1$1.run(ThingManager.java:1)
	at java.security.AccessController.doPrivileged(Native Method)
	...

And the after 1 more OH2 stop and start (no reboot), the Circular error is back. And then after yet another Stop and Start, no errors this time.

So OH2 appears to be currently running, but am getting those strange errors.

Almost like clockwork, OH2 froze up again at 6:30am here for me again with the Blacklist Error. And I did delete the cache and tmp directories about 2 days ago.

Currently on Build 1112

017-12-05 06:29:54.858 [WARN ] [org.apache.karaf.services.eventadmin] - EventAdmin: Blacklisting ServiceReference [{org.osgi.service.event.EventHandler, org.eclipse.smarthome.core.events.EventPublisher}={event.topics=smarthome, component.name=org.eclipse.smarthome.core.internal.events.OSGiEventManager, component.id=49, service.id=147, service.bundleid=111, service.scope=bundle} | Bundle(org.eclipse.smarthome.core_0.9.0.201712011551 [111])] due to timeout!
2017-12-05 06:29:55.511 [ERROR] [b.core.service.AbstractActiveService] - Error while executing background thread HTTP Refresh Service
java.lang.NullPointerException: null
2017-12-05 06:29:56.511 [ERROR] [b.core.service.AbstractActiveService] - Error while executing background thread HTTP Refresh Service
java.lang.NullPointerException: null
2017-12-05 06:29:56.557 [WARN ] [org.apache.karaf.services.eventadmin] - EventAdmin: Blacklisting ServiceReference [{org.osgi.service.event.EventHandler, org.eclipse.smarthome.core.events.EventPublisher}={event.topics=smarthome, component.name=org.eclipse.smarthome.core.internal.events.OSGiEventManager, component.id=49, service.id=147, service.bundleid=111, service.scope=bundle} | Bundle(org.eclipse.smarthome.core_0.9.0.201712011551 [111])] due to timeout!
2017-12-05 06:29:57.381 [WARN ] [org.apache.karaf.services.eventadmin] - EventAdmin: Blacklisting ServiceReference [{org.osgi.service.event.EventHandler, org.eclipse.smarthome.core.events.EventPublisher}={event.topics=smarthome, component.name=org.eclipse.smarthome.core.internal.events.OSGiEventManager, component.id=49, service.id=147, service.bundleid=111, service.scope=bundle} | Bundle(org.eclipse.smarthome.core_0.9.0.201712011551 [111])] due to timeout!
2017-12-05 06:29:57.512 [ERROR] [b.core.service.AbstractActiveService] - Error while executing background thread HTTP Refresh Service
java.lang.NullPointerException: null
2017-12-05 06:29:57.584 [WARN ] [org.apache.karaf.services.eventadmin] - EventAdmin: Blacklisting ServiceReference [{org.osgi.service.event.EventHandler, org.eclipse.smarthome.core.events.EventPublisher}={event.topics=smarthome, component.name=org.eclipse.smarthome.core.internal.events.OSGiEventManager, component.id=49, service.id=147, service.bundleid=111, service.scope=bundle} | Bundle(org.eclipse.smarthome.core_0.9.0.201712011551 [111])] due to timeout!
2017-12-05 06:29:58.616 [ERROR] [b.core.service.AbstractActiveService] - Error while executing background thread HTTP Refresh Service
java.lang.NullPointerException: null
2017-12-05 06:30:02.251 [ERROR] [b.core.service.AbstractActiveService] - Error while executing background thread HTTP Refresh Service
java.lang.NullPointerException: null
2017-12-05 06:30:02.256 [INFO ] [io.openhabcloud.internal.CloudClient] - Disconnected from the openHAB Cloud service (UUID = 5e173177-a9ee-47cc-a2bb-ec0f655ee0f8, base URL = http://localhost:8080)

I’m using the latest build and still got this problems.

The problem might be that FileInstall is currently configured to use a low start-level for the bundles in addons - which can potentially result in the effects we see here, i.e. dependencies not being resolved.
We can experiment with a different setting, although I am a bit concerned that this might break the compatibility with openhab1 addons. Anyhow @ptmuldoon, could you try to edit two lines in the file etc/org.apache.felix.fileinstall-deploy.cfgto:

felix.fileinstall.start.level   = 100
felix.fileinstall.active.level  = 100

and see if that makes any difference regarding the loading of the bundles from addons?

1 Like

The lines in the log BEFORE the blacklisting happened would be interesting. Could you post them as well?

@m3tatai You should remove the quotes here to have

ui = paper,basic

This should resolve your installation issues.

I am running OH on a minimal Ubuntu Server installation, and I installed it using the Openhabian script.

If I choose the option to update all system components, this does an apt update of all installed components - and OH then gets into this frozen state.

I have then gone into the Openhabian config, and chosen the option to switch to the latest Snapshot.

Something about the apt update process gets it stuck - but performing the “switch” seems to then fix it once the OH service is restarted.

I hope this bit of information helps!

This solved only till next server or openhab restart.

And then the quotes are back?

Yes. Tried it several times, always same result.

Wonderful. We so far had nobody who was able to reproduce the “miraculously added quotes” issue - you are the first one, congratulations :slight_smile:

So may I ask you for two further files?

  1. /var/lib/openhab2/config/org/openhab/addons.config
  2. /etc/openhab/services/addons.cfg

Thanks!

1 Like

Awesome :slight_smile:

I’ll try to help you as far as possible.

/var/lib/openhab2/config/org/openhab/addons.config

binding="homematic,milight,wol1,network"
felix.fileinstall.filename="file:/var/lib/openhab2/etc/org.openhab.addons.cfg"
misc="restdocs"
package="expert"
remote="true"
service.pid="org.openhab.addons"
transformation="map,regex,xslt,exec,javascript,scale,xpath,jsonpath"
ui="paper,basic"

/etc/openhab/services/addons.cfg
File file is not existing

/var/lib/openhab2/etc/org.openhab.addons.cfg

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

By restarting the server or service this file changed to:

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

There may be a missing “2” there, do you have anything in /etc/openhab2/services/addons.cfg?