I’d be happy to try it, as well. What needs to be changed to enable Felix? Is it as simple as commenting out this line in runtime/karaf/etc/custom.properties?
Commenting out that lines should be enough.
You can also add:
karaf.framework=felix
to the file (if comment out is not enough – but it should)
Normally if you change the OSGi framework all bundles will be reinstalled but it would perhaps me a cleaner approach to start a clean one (delete the old karaf data folder).
Ok, sounds good. I saw that the default (Felix) was specified in config.properties, so I figured commenting out the entry in custom.properties would be enough.
I have an installation on three separate systems, two of which are “production”, and the other one is used for testing. I can use my test system to start with a clean install. I’ll also make a backup of my current test setup, which currently is exhibiting the startup issue.
Result: I continued to see initialization not working consistently. Sometimes it would start up normally, sometimes not.
Here’s what I did:
I did my normal “update” process, which is to remove the runtime directory, and the userdata/cache and userdata/tmp directories, then unzip the latest nightly.
Then I commented out the equinox line in runtime/karaf/etc/custom.properties
Then started openHAB
The Circular reference exception no longer occurred, but I did see several NPEs right at startup – perhaps something looking for equinox things that are no longer there??
> 2016-07-04 11:15:16.553 [INFO ] [ui.habmin.internal.servlet.HABminApp] - Started HABmin servlet at /habmin
> 2016-07-04 11:15:16.667 [ERROR] [org.eclipse.equinox.registry ] - FrameworkEvent ERROR - org.eclipse.equinox.registry
> java.lang.NullPointerException
> at org.eclipse.core.internal.registry.osgi.EclipseBundleListener.checkForNLSFiles(EclipseBundleListener.java:217)[66:org.eclipse.equinox.registry:3.6.0.v20150318-1503]
> at org.eclipse.core.internal.registry.osgi.EclipseBundleListener.checkForNLSFragment(EclipseBundleListener.java:198)[66:org.eclipse.equinox.registry:3.6.0.v20150318-1503]
> at org.eclipse.core.internal.registry.osgi.EclipseBundleListener.addBundle(EclipseBundleListener.java:154)[66:org.eclipse.equinox.registry:3.6.0.v20150318-1503]
> at org.eclipse.core.internal.registry.osgi.EclipseBundleListener.bundleChanged(EclipseBundleListener.java:79)[66:org.eclipse.equinox.registry:3.6.0.v20150318-1503]
> at org.apache.felix.framework.util.EventDispatcher.invokeBundleListenerCallback(EventDispatcher.java:916)[org.apache.felix.framework-5.4.0.jar:]
> at org.apache.felix.framework.util.EventDispatcher.fireEventImmediately(EventDispatcher.java:835)[org.apache.felix.framework-5.4.0.jar:]
> at org.apache.felix.framework.util.EventDispatcher.fireBundleEvent(EventDispatcher.java:517)[org.apache.felix.framework-5.4.0.jar:]
> at org.apache.felix.framework.Felix.fireBundleEvent(Felix.java:4541)[org.apache.felix.framework-5.4.0.jar:]
> at org.apache.felix.framework.StatefulResolver.fireResolvedEvents(StatefulResolver.java:1241)[org.apache.felix.framework-5.4.0.jar:]
> at org.apache.felix.framework.StatefulResolver.resolve(StatefulResolver.java:465)[org.apache.felix.framework-5.4.0.jar:]
> at org.apache.felix.framework.Felix.resolveBundleRevision(Felix.java:4106)[org.apache.felix.framework-5.4.0.jar:]
> at org.apache.felix.framework.Felix.startBundle(Felix.java:2117)[org.apache.felix.framework-5.4.0.jar:]
> at org.apache.felix.framework.Felix.setActiveStartLevel(Felix.java:1371)[org.apache.felix.framework-5.4.0.jar:]
> at org.apache.felix.framework.FrameworkStartLevelImpl.run(FrameworkStartLevelImpl.java:308)[org.apache.felix.framework-5.4.0.jar:]
> at java.lang.Thread.run(Thread.java:745)[:1.8.0_91]
> 2016-07-04 11:15:16.674 [ERROR] [org.eclipse.equinox.registry ] - FrameworkEvent ERROR - org.eclipse.equinox.registry
> java.lang.NullPointerException
> at org.eclipse.core.internal.registry.osgi.EclipseBundleListener.checkForNLSFiles(EclipseBundleListener.java:217)[66:org.eclipse.equinox.registry:3.6.0.v20150318-1503]
> at org.eclipse.core.internal.registry.osgi.EclipseBundleListener.checkForNLSFragment(EclipseBundleListener.java:198)[66:org.eclipse.equinox.registry:3.6.0.v20150318-1503]
> at org.eclipse.core.internal.registry.osgi.EclipseBundleListener.addBundle(EclipseBundleListener.java:154)[66:org.eclipse.equinox.registry:3.6.0.v20150318-1503]
> at org.eclipse.core.internal.registry.osgi.EclipseBundleListener.bundleChanged(EclipseBundleListener.java:79)[66:org.eclipse.equinox.registry:3.6.0.v20150318-1503]
> at org.apache.felix.framework.util.EventDispatcher.invokeBundleListenerCallback(EventDispatcher.java:916)[org.apache.felix.framework-5.4.0.jar:]
> at org.apache.felix.framework.util.EventDispatcher.fireEventImmediately(EventDispatcher.java:835)[org.apache.felix.framework-5.4.0.jar:]
> at org.apache.felix.framework.util.EventDispatcher.fireBundleEvent(EventDispatcher.java:517)[org.apache.felix.framework-5.4.0.jar:]
> at org.apache.felix.framework.Felix.fireBundleEvent(Felix.java:4541)[org.apache.felix.framework-5.4.0.jar:]
> at org.apache.felix.framework.StatefulResolver.fireResolvedEvents(StatefulResolver.java:1244)[org.apache.felix.framework-5.4.0.jar:]
> at org.apache.felix.framework.StatefulResolver.resolve(StatefulResolver.java:465)[org.apache.felix.framework-5.4.0.jar:]
> at org.apache.felix.framework.Felix.resolveBundleRevision(Felix.java:4106)[org.apache.felix.framework-5.4.0.jar:]
> at org.apache.felix.framework.Felix.startBundle(Felix.java:2117)[org.apache.felix.framework-5.4.0.jar:]
> at org.apache.felix.framework.Felix.setActiveStartLevel(Felix.java:1371)[org.apache.felix.framework-5.4.0.jar:]
> at org.apache.felix.framework.FrameworkStartLevelImpl.run(FrameworkStartLevelImpl.java:308)[org.apache.felix.framework-5.4.0.jar:]
> at java.lang.Thread.run(Thread.java:745)[:1.8.0_91]
> 2016-07-04 11:15:16.829 [ERROR] [org.eclipse.equinox.registry ] - FrameworkEvent ERROR - org.eclipse.equinox.registry
> java.lang.NullPointerException
> at org.eclipse.core.internal.registry.osgi.EclipseBundleListener.checkForNLSFiles(EclipseBundleListener.java:217)[66:org.eclipse.equinox.registry:3.6.0.v20150318-1503]
> at org.eclipse.core.internal.registry.osgi.EclipseBundleListener.checkForNLSFragment(EclipseBundleListener.java:198)[66:org.eclipse.equinox.registry:3.6.0.v20150318-1503]
> at org.eclipse.core.internal.registry.osgi.EclipseBundleListener.addBundle(EclipseBundleListener.java:154)[66:org.eclipse.equinox.registry:3.6.0.v20150318-1503]
> at org.eclipse.core.internal.registry.osgi.EclipseBundleListener.bundleChanged(EclipseBundleListener.java:79)[66:org.eclipse.equinox.registry:3.6.0.v20150318-1503]
> at org.apache.felix.framework.util.EventDispatcher.invokeBundleListenerCallback(EventDispatcher.java:916)[org.apache.felix.framework-5.4.0.jar:]
> at org.apache.felix.framework.util.EventDispatcher.fireEventImmediately(EventDispatcher.java:835)[org.apache.felix.framework-5.4.0.jar:]
> at org.apache.felix.framework.util.EventDispatcher.fireBundleEvent(EventDispatcher.java:517)[org.apache.felix.framework-5.4.0.jar:]
> at org.apache.felix.framework.Felix.fireBundleEvent(Felix.java:4541)[org.apache.felix.framework-5.4.0.jar:]
> at org.apache.felix.framework.StatefulResolver.fireResolvedEvents(StatefulResolver.java:1244)[org.apache.felix.framework-5.4.0.jar:]
> at org.apache.felix.framework.StatefulResolver.resolve(StatefulResolver.java:465)[org.apache.felix.framework-5.4.0.jar:]
> at org.apache.felix.framework.Felix.resolveBundleRevision(Felix.java:4106)[org.apache.felix.framework-5.4.0.jar:]
> at org.apache.felix.framework.Felix.startBundle(Felix.java:2117)[org.apache.felix.framework-5.4.0.jar:]
> at org.apache.felix.framework.Felix.setActiveStartLevel(Felix.java:1371)[org.apache.felix.framework-5.4.0.jar:]
> at org.apache.felix.framework.FrameworkStartLevelImpl.run(FrameworkStartLevelImpl.java:308)[org.apache.felix.framework-5.4.0.jar:]
> at java.lang.Thread.run(Thread.java:745)[:1.8.0_91]
> 2016-07-04 11:15:16.830 [ERROR] [org.eclipse.equinox.registry ] - FrameworkEvent ERROR - org.eclipse.equinox.registry
> java.lang.NullPointerException
> at org.eclipse.core.internal.registry.osgi.EclipseBundleListener.checkForNLSFiles(EclipseBundleListener.java:217)[66:org.eclipse.equinox.registry:3.6.0.v20150318-1503]
> at org.eclipse.core.internal.registry.osgi.EclipseBundleListener.checkForNLSFragment(EclipseBundleListener.java:198)[66:org.eclipse.equinox.registry:3.6.0.v20150318-1503]
> at org.eclipse.core.internal.registry.osgi.EclipseBundleListener.addBundle(EclipseBundleListener.java:154)[66:org.eclipse.equinox.registry:3.6.0.v20150318-1503]
> at org.eclipse.core.internal.registry.osgi.EclipseBundleListener.bundleChanged(EclipseBundleListener.java:79)[66:org.eclipse.equinox.registry:3.6.0.v20150318-1503]
> at org.apache.felix.framework.util.EventDispatcher.invokeBundleListenerCallback(EventDispatcher.java:916)[org.apache.felix.framework-5.4.0.jar:]
> at org.apache.felix.framework.util.EventDispatcher.fireEventImmediately(EventDispatcher.java:835)[org.apache.felix.framework-5.4.0.jar:]
> at org.apache.felix.framework.util.EventDispatcher.fireBundleEvent(EventDispatcher.java:517)[org.apache.felix.framework-5.4.0.jar:]
> at org.apache.felix.framework.Felix.fireBundleEvent(Felix.java:4541)[org.apache.felix.framework-5.4.0.jar:]
> at org.apache.felix.framework.StatefulResolver.fireResolvedEvents(StatefulResolver.java:1241)[org.apache.felix.framework-5.4.0.jar:]
> at org.apache.felix.framework.StatefulResolver.resolve(StatefulResolver.java:465)[org.apache.felix.framework-5.4.0.jar:]
> at org.apache.felix.framework.Felix.resolveBundleRevision(Felix.java:4106)[org.apache.felix.framework-5.4.0.jar:]
> at org.apache.felix.framework.Felix.startBundle(Felix.java:2117)[org.apache.felix.framework-5.4.0.jar:]
> at org.apache.felix.framework.Felix.setActiveStartLevel(Felix.java:1371)[org.apache.felix.framework-5.4.0.jar:]
> at org.apache.felix.framework.FrameworkStartLevelImpl.run(FrameworkStartLevelImpl.java:308)[org.apache.felix.framework-5.4.0.jar:]
> at java.lang.Thread.run(Thread.java:745)[:1.8.0_91]
> 2016-07-04 11:15:16.838 [INFO ] [arthome.ui.paper.internal.PaperUIApp] - Started Paper UI at /ui
> 2016-07-04 11:15:16.919 [INFO ] [.dashboard.internal.DashboardService] - Started dashboard at /start
> 2016-07-04 11:15:17.026 [DEBUG] [org.openhab.binding.zwave ] - BundleEvent RESOLVED - org.openhab.binding.zwave
> 2016-07-04 11:15:17.028 [DEBUG] [org.openhab.binding.zwave ] - BundleEvent STARTING - org.openhab.binding.zwave
> 2016-07-04 11:15:17.030 [DEBUG] [inding.zwave.internal.ZWaveActivator] - Z-Wave binding started. Version 2.0.0.201607030102
> 2016-07-04 11:15:17.031 [DEBUG] [org.openhab.binding.zwave ] - BundleEvent STARTED - org.openhab.binding.zwave
> 2016-07-04 11:15:17.037 [DEBUG] [org.openhab.binding.zwave ] - ServiceEvent REGISTERED - [org.eclipse.smarthome.config.core.ConfigOptionProvider, org.eclipse.smarthome.config.core.ConfigDescriptionProvider] - org.openhab.binding.zwave
> 2016-07-04 11:15:17.076 [DEBUG] [org.openhab.binding.zwave ] - ServiceEvent REGISTERED - [org.eclipse.smarthome.core.thing.binding.ThingHandlerFactory] - org.openhab.binding.zwave
> 2016-07-04 11:15:17.084 [DEBUG] [org.openhab.binding.zwave ] - ServiceEvent REGISTERED - [org.eclipse.smarthome.core.thing.binding.ThingHandler] - org.openhab.binding.zwave
> 2016-07-04 11:15:17.087 [DEBUG] [org.openhab.binding.zwave ] - ServiceEvent REGISTERED - [org.eclipse.smarthome.config.core.status.ConfigStatusProvider] - org.openhab.binding.zwave
> 2016-07-04 11:15:17.089 [DEBUG] [org.openhab.binding.zwave ] - ServiceEvent REGISTERED - [org.eclipse.smarthome.core.thing.binding.ThingHandler] - org.openhab.binding.zwave
> 2016-07-04 11:15:17.090 [DEBUG] [org.openhab.binding.zwave ] - ServiceEvent REGISTERED - [org.eclipse.smarthome.config.core.status.ConfigStatusProvider] - org.openhab.binding.zwave
> 2016-07-04 11:15:17.094 [DEBUG] [org.openhab.binding.zwave ] - ServiceEvent REGISTERED - [org.eclipse.smarthome.core.thing.binding.ThingHandler] - org.openhab.binding.zwave
> 2016-07-04 11:15:17.648 [INFO ] [assic.internal.servlet.WebAppServlet] - Started Classic UI at /classicui/app
> 2016-07-04 11:15:17.654 [INFO ] [basic.internal.servlet.WebAppServlet] - Started Basic UI at /basicui/app
> 2016-07-04 11:15:17.707 [INFO ] [el.core.internal.ModelRepositoryImpl] - Loading model 'default.sitemap'
> 2016-07-04 11:15:17.771 [INFO ] [el.core.internal.ModelRepositoryImpl] - Loading model 'rrd4j.persist'
> 2016-07-04 11:15:17.810 [INFO ] [el.core.internal.ModelRepositoryImpl] - Loading model 'mysql.persist'
> 2016-07-04 11:15:17.824 [INFO ] [el.core.internal.ModelRepositoryImpl] - Loading model 'test.rules'
> 2016-07-04 11:15:17.987 [INFO ] [el.core.internal.ModelRepositoryImpl] - Loading model 'systeminfo.items'
> 2016-07-04 11:15:18.143 [INFO ] [el.core.internal.ModelRepositoryImpl] - Loading model 'test.items'
> 2016-07-04 11:15:18.155 [DEBUG] [ding.zwave.handler.ZWaveThingHandler] - NODE 0: Command received zwave:device:15573c1286e:node3:sensor_binary --> REFRESH
> 2016-07-04 11:15:18.155 [WARN ] [ding.zwave.handler.ZWaveThingHandler] - Controller handler not found. Cannot handle command without ZWave controller.
> 2016-07-04 11:15:18.156 [DEBUG] [ding.zwave.handler.ZWaveThingHandler] - NODE 0: Command received zwave:device:15573c1286e:node3:sensor_temperature --> REFRESH
> 2016-07-04 11:15:18.156 [WARN ] [ding.zwave.handler.ZWaveThingHandler] - Controller handler not found. Cannot handle command without ZWave controller.
> 2016-07-04 11:15:18.157 [DEBUG] [ding.zwave.handler.ZWaveThingHandler] - NODE 0: Command received zwave:device:15573c1286e:node3:sensor_relhumidity --> REFRESH
> 2016-07-04 11:15:18.158 [WARN ] [ding.zwave.handler.ZWaveThingHandler] - Controller handler not found. Cannot handle command without ZWave controller.
> 2016-07-04 11:15:18.159 [DEBUG] [ding.zwave.handler.ZWaveThingHandler] - NODE 0: Command received zwave:device:15573c1286e:node3:sensor_luminance --> REFRESH
> 2016-07-04 11:15:18.159 [WARN ] [ding.zwave.handler.ZWaveThingHandler] - Controller handler not found. Cannot handle command without ZWave controller.
> 2016-07-04 11:15:18.160 [DEBUG] [ding.zwave.handler.ZWaveThingHandler] - NODE 0: Command received zwave:device:15573c1286e:node3:sensor_ultraviolet --> REFRESH
> 2016-07-04 11:15:18.160 [WARN ] [ding.zwave.handler.ZWaveThingHandler] - Controller handler not found. Cannot handle command without ZWave controller.
> 2016-07-04 11:15:18.161 [DEBUG] [ding.zwave.handler.ZWaveThingHandler] - NODE 0: Command received zwave:device:15573c1286e:node3:battery-level --> REFRESH
> 2016-07-04 11:15:18.161 [WARN ] [ding.zwave.handler.ZWaveThingHandler] - Controller handler not found. Cannot handle command without ZWave controller.
> 2016-07-04 11:15:18.163 [DEBUG] [ding.zwave.handler.ZWaveThingHandler] - NODE 0: Command received zwave:device:15573c1286e:node3:alarm_general --> REFRESH
> 2016-07-04 11:15:18.163 [WARN ] [ding.zwave.handler.ZWaveThingHandler] - Controller handler not found. Cannot handle command without ZWave controller.
> 2016-07-04 11:15:18.164 [DEBUG] [ding.zwave.handler.ZWaveThingHandler] - NODE 0: Command received zwave:device:15573c1286e:node4:sensor_binary --> REFRESH
> 2016-07-04 11:15:18.164 [WARN ] [ding.zwave.handler.ZWaveThingHandler] - Controller handler not found. Cannot handle command without ZWave controller.
> 2016-07-04 11:15:18.165 [DEBUG] [ding.zwave.handler.ZWaveThingHandler] - NODE 0: Command received zwave:device:15573c1286e:node4:sensor_temperature --> REFRESH
> 2016-07-04 11:15:18.165 [WARN ] [ding.zwave.handler.ZWaveThingHandler] - Controller handler not found. Cannot handle command without ZWave controller.
> 2016-07-04 11:15:18.166 [DEBUG] [ding.zwave.handler.ZWaveThingHandler] - NODE 0: Command received zwave:device:15573c1286e:node4:sensor_seismicintensity --> REFRESH
> 2016-07-04 11:15:18.166 [WARN ] [ding.zwave.handler.ZWaveThingHandler] - Controller handler not found. Cannot handle command without ZWave controller.
> 2016-07-04 11:15:18.167 [DEBUG] [ding.zwave.handler.ZWaveThingHandler] - NODE 0: Command received zwave:device:15573c1286e:node4:sensor_luminance --> REFRESH
> 2016-07-04 11:15:18.167 [WARN ] [ding.zwave.handler.ZWaveThingHandler] - Controller handler not found. Cannot handle command without ZWave controller.
> 2016-07-04 11:15:18.168 [DEBUG] [ding.zwave.handler.ZWaveThingHandler] - NODE 0: Command received zwave:device:15573c1286e:node4:battery-level --> REFRESH
> 2016-07-04 11:15:18.168 [WARN ] [ding.zwave.handler.ZWaveThingHandler] - Controller handler not found. Cannot handle command without ZWave controller.
> 2016-07-04 11:15:18.169 [DEBUG] [ding.zwave.handler.ZWaveThingHandler] - NODE 0: Command received zwave:device:15573c1286e:node4:alarm_general --> REFRESH
> 2016-07-04 11:15:18.170 [WARN ] [ding.zwave.handler.ZWaveThingHandler] - Controller handler not found. Cannot handle command without ZWave controller.
> 2016-07-04 11:15:18.171 [DEBUG] [ding.zwave.handler.ZWaveThingHandler] - NODE 0: Command received zwave:device:15573c1286e:node4:alarm_burglar --> REFRESH
> 2016-07-04 11:15:18.171 [WARN ] [ding.zwave.handler.ZWaveThingHandler] - Controller handler not found. Cannot handle command without ZWave controller.
> 2016-07-04 11:15:18.753 [INFO ] [el.core.internal.ModelRepositoryImpl] - Loading model 'ntp.items'
> 2016-07-04 11:15:21.998 [WARN ] [thome.binding.ntp.handler.NtpHandler] - ntp:ntp:local couldn't establish network connection [host '0.ubuntu.pool.ntp.org'] -> returning current sytem time instead.
As an aside, I’m not sure what’s going on with the ntp errors. If I run ntpdate, it seems to be taking >8 seconds to return. I see the NTP binding has a 5 second timeout on the transaction, so that’s probably what’s happening.
I probably should try a complete from-scratch install next.
@chris No luck with last night’s build. Out of about 10 restarts, in 4 of them the binding did not start successfully.
I did see that there’s a new exception occurring in this build. Out of the 10 restarts, I saw this exception on 2 of the restarts. However, in the 2 cases where this exception occurred, the binding started successfully.
I managed to do some testing with the latest OH2 runtime tonight - ZWave starts occasionally, as do the other bindings I’m currently running, but both are starting unreliably .
I’ve seen this occur with the zwave and systeminfo bindings. Others above have reported the behavior with other bindings. I noticed this behavior for the first time in the 6/19 build, although it might’ve been there a little before that and I never noticed it.
I wonder if there were any changes in the mid-June timeframe that might’ve introduced this as a side-effect? It looked like there were a couple commits related to initialization in that timeframe. But, honestly, I don’t know enough about how things work, so take that with a grain of salt.
@mhilbush did you also delete the userdata folder (or at least the mapdb folder) and add back all your things? This also seems to be required (at least by me and another user).
Hi guys, I should get time tomorrow morning (my time) to update to #399. I plan to follow my normal procedure and hope I don’t have to delete the mapdb folder and then reinstall everything. i will report back with my results asap.
So you removed the whole userdata directory, or just mapdb?
On my test system, I just removed the mapdb files from the mapdb directory, along with tmp and cache. On this system I have only a few bindings (zwave, systeminfo, ntp), and a couple zwave nodes, so adding these back was not hard. I’m still seeing the problem, so I guess I’ll do a complete from-scratch install just to rule out anything else.
I initially removed the whole userdata folder. The system then started. I then added back in my persistence folders, habmin data etc, and it still worked. I then renamed the mapdb folder and put the old one back in, and it stopped working - I put the ‘new’ mapdb folder back, and it works again.