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

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?

/etc/openhab2/services/addons.cfg

# The installation package of this openHAB instance
# Note: This is only regarded at the VERY FIRST START of openHAB
# Note: If you want to specify your add-ons yourself through entries below, set$
# as otherwise your definition might be in conflict with what the installation $
#
# Optional. If not set, the dashboard (https://<yourserver>:8080/) will ask you$
#
# Valid options:
#   - minimal  : Installation only with dashboard, but no UIs or other add-ons.$
#   - simple   : Setup for using openHAB purely through UIs - you need to expec$
#   - standard : Default setup for normal users, best for textual setup
#   - expert   : Setup for expert users, especially for people migrating from o$
#   - demo     : A demo setup which includes UIs, a few bindings, config files $
#
# See http://docs.openhab.org/configuration/packages.html for a detailed explan$
#
package = expert

# Access Remote Add-on Repository
# Defines whether the remote openHAB add-on repository should be used for brows$
# This not only makes latest snapshots of add-ons available, it is also require$
# any legacy 1.x add-on. (default is true)
#
remote = true

# Include legacy 1.x bindings. If set to true, it also allows the installation $
# already a 2.x version available (requires remote repo access, see above). (de$
#
#legacy = true

# A comma-separated list of bindings to install (e.g. "sonos,knx,zwave")
#binding =

# A comma-separated list of UIs to install (e.g. "basic,paper")
ui = "paper,basic"

# A comma-separated list of persistence services to install (e.g. "rrd4j,jpa")
#persistence =
# A comma-separated list of actions to install (e.g. "mail,pushover")
#action =

# A comma-separated list of transformation services to install (e.g. "map,jsonp$
#transformation =

# A comma-separated list of voice services to install (e.g. "marytts,freetts")
#voice =

# A comma-separated list of miscellaneous services to install (e.g. "myopenhab")
#action =

# A comma-separated list of transformation services to install (e.g. "map,jsonp$
#transformation =

# A comma-separated list of voice services to install (e.g. "marytts,freetts")
#voice =

# A comma-separated list of miscellaneous services to install (e.g. "myopenhab")
#misc =

1 Like

If you remove the quotes from that file, does that resolve your problem?

My problem is still there. :confused:

Just to confirm that’s after making sure the quotes are gone from both /etc/openhab2/services/addons.cfg and /var/lib/openhab2/etc/org.openhab.addons.cfg, before restarting? Do the the quotes come back?

I agree with @Benjy - the quotes in the /etc/openhab2/services/addons.cfg are definitely wrong (and I assume you entered them yourself? If so, do you remember why? Do we have a flaw anywhere in the documentation?).

I very much expect the problem to be solved if you stop your openHAB, clean both cfg files from the quotes and then restart.

1 Like