[ERROR] [org.apache.karaf.log.core ] - FrameworkEvent ERROR - org.apache.karaf.log.core java.lang.IllegalStateException: Configuration Admin service has been unregistered

(Gadget Angel) #1

Why am I getting this error?

i am running openhab 2.5.0 Build 1556
i run on Windows 10
i just reinstalled, the only addon i presently have installed is wemo

how do i register the Admin service?

History:
i had to erase the cache folder and tmp folder because i was getting “The OSGi lifecycle has been violated” in the log file.

After i got this “OSGi lifecycle” violated, i saw it was related to my “wifiled” binding so i uninstalled the wifiled binding and erased the cache and tmp folders.

i then ran start.bat after the folders were erased. Everything in the log file was fine after startup. But when i shutdown i got the following error:

[ERROR] [org.apache.karaf.log.core ] - FrameworkEvent ERROR - org.apache.karaf.log.core
java.lang.IllegalStateException: Configuration Admin service has been unregistered

here is my openhab.log file:
openhab.log (7.5 KB)

Any help will be appreciated

0 Likes

(Rich Koshak) #2

Does anything not work correctly?

0 Likes

(Gadget Angel) #3

ha, ha, No openhab2 runs, i just keep getting errors in the log file and I am trying to clear them out.

What causes this error???:
[ERROR] [g.discovery.internal.PersistentInbox] - The OSGi lifecycle has been violated (storage: null, ttl checker cancelled: false).

i only get this error after i delete the cache and tmp folder from my $OH_USERDATA area, so since i started to get the OSGi lifecycle violation again, I had to delete the cache and tmp folders to clear it out. This time I made sure to delete the following also:
c:/openhab2/userdata/etc/openhab2-wrapper.conf
c:/openhab2/userdata/bin/openhab2-wrapper.exe
c:/openhab2/userdata/bin/openhab2-service.bat
c:/openhab2/userdata/lib/wrapper/wrapper.dll
c:/openhab2/userdata/lib/wrapper/karaf-wrapper.jar

With those 5 files gone, I can rerun the following two commands at the karaf console:

feature:install service-wrapper
wrapper:install --name “openHAB2” --display “openHAB2” --description “openHAB 2 Service”

I update the c:/openhab2/userdata/etc/openhab2-wrapper.conf as stated in the openhab2 windows installation documentation

I think all of that registers the Admin service…but that’s my guess. I will say that i have not gotten the FrameworkEvent ERROR again since i started to do that…

Did I waste my time??

Where do the OSGi lifecycle errors come from??? can i just delete the contents of this folder C:\openhab2\userdata\cache\org.eclipse.osgi\ to clear out this error???

0 Likes

(Rich Koshak) #4

I have no idea but getting errors like that while running a snapshot is not surprising. You can file an issue on the core if it occurs again.

0 Likes

(Gadget Angel) #5

OK, I need some help here:

This is my problem, When i am doing my editing on Openhab2 I always have the console window open with log:tail running so I can see how the system is doing with my edits. But I keep getting the FRAMEWORK ERROR. What is weird is that I can make that error disappear!!

In the openhab.log file I tell you what I do between each boot. If you have question please contact me, but this is definitively an error that needs to be CAUGHT in the code. I can not believe that I would be the only person who keeps a console window open so to look at the log files while editing the openhab2 conf files

HERE is my openhab.log file

openhab.log

2019-03-27 03:27:18.756 [INFO ] [.core.internal.i18n.I18nProviderImpl] - Location set to '35.9530745,-84.10879919999999'.
2019-03-27 03:27:20.240 [WARN ] [.internal.element.HttpContextElement] - Registered http context [null] did not contain a valid http context id
2019-03-27 03:27:24.349 [INFO ] [thome.model.lsp.internal.ModelServer] - Started Language Server Protocol (LSP) service on port 5007
2019-03-27 03:27:24.771 [INFO ] [.dashboard.internal.DashboardService] - Started Dashboard at http://192.168.0.12:8080
2019-03-27 03:27:24.771 [INFO ] [.dashboard.internal.DashboardService] - Started Dashboard at https://192.168.0.12:8443
2019-03-27 03:27:25.193 [INFO ] [openhab.ui.paper.internal.PaperUIApp] - Started Paper UI at /paperui
2019-03-27 03:27:25.318 [INFO ] [ui.habmin.internal.servlet.HABminApp] - Started HABmin servlet at /habmin
2019-03-27 03:27:25.380 [INFO ] [panel.internal.HABPanelDashboardTile] - Started HABPanel at /habpanel
2019-03-27 03:27:44.756 [INFO ] [basic.internal.servlet.WebAppServlet] - Stopped Basic UI
2019-03-27 03:27:50.881 [INFO ] [assic.internal.servlet.WebAppServlet] - Stopped Classic UI
2019-03-27 03:27:50.896 [INFO ] [ui.habmin.internal.servlet.HABminApp] - Stopped HABmin servlet
2019-03-27 03:27:50.959 [INFO ] [panel.internal.HABPanelDashboardTile] - Stopped HABPanel
2019-03-27 03:27:50.959 [INFO ] [openhab.ui.paper.internal.PaperUIApp] - Stopped Paper UI
2019-03-27 03:27:50.959 [INFO ] [.dashboard.internal.DashboardService] - Stopped Dashboard
================================================================================================================================================================
let's cause the error to occur, I will now do the following:
net start openhab2
open kitty access the karaf console
log:tail, did NOT do Cntrl-C and logout, just hit the upper right corner on Kitty to exit the session 
net stop openhab2, what follows is the error

2019-03-27 03:33:26.451 [INFO ] [.core.internal.i18n.I18nProviderImpl] - Location set to '35.9530745,-84.10879919999999'.
2019-03-27 03:33:27.920 [WARN ] [.internal.element.HttpContextElement] - Registered http context [null] did not contain a valid http context id
2019-03-27 03:33:32.045 [INFO ] [thome.model.lsp.internal.ModelServer] - Started Language Server Protocol (LSP) service on port 5007
2019-03-27 03:33:32.482 [INFO ] [.dashboard.internal.DashboardService] - Started Dashboard at http://192.168.0.12:8080
2019-03-27 03:33:32.482 [INFO ] [.dashboard.internal.DashboardService] - Started Dashboard at https://192.168.0.12:8443
2019-03-27 03:33:32.889 [INFO ] [openhab.ui.paper.internal.PaperUIApp] - Started Paper UI at /paperui
2019-03-27 03:33:32.982 [INFO ] [ui.habmin.internal.servlet.HABminApp] - Started HABmin servlet at /habmin
2019-03-27 03:33:33.045 [INFO ] [panel.internal.HABPanelDashboardTile] - Started HABPanel at /habpanel
2019-03-27 03:33:47.292 [INFO ] [basic.internal.servlet.WebAppServlet] - Stopped Basic UI
2019-03-27 03:33:53.405 [INFO ] [assic.internal.servlet.WebAppServlet] - Stopped Classic UI
2019-03-27 03:33:53.421 [INFO ] [ui.habmin.internal.servlet.HABminApp] - Stopped HABmin servlet
2019-03-27 03:33:53.483 [INFO ] [panel.internal.HABPanelDashboardTile] - Stopped HABPanel
2019-03-27 03:33:53.499 [INFO ] [openhab.ui.paper.internal.PaperUIApp] - Stopped Paper UI
2019-03-27 03:33:53.499 [INFO ] [.dashboard.internal.DashboardService] - Stopped Dashboard
2019-03-27 03:33:53.592 [ERROR] [org.apache.karaf.log.core           ] - FrameworkEvent ERROR - org.apache.karaf.log.core
java.lang.IllegalStateException: Configuration Admin service has been unregistered
	at org.apache.felix.cm.impl.ConfigurationAdminImpl.getConfigurationManager(ConfigurationAdminImpl.java:325) ~[?:?]
	at org.apache.felix.cm.impl.ConfigurationAdminImpl.getConfiguration(ConfigurationAdminImpl.java:156) ~[?:?]
	at org.apache.karaf.log.core.internal.LogServiceImpl.getConfiguration(LogServiceImpl.java:121) ~[?:?]
	at org.apache.karaf.log.core.internal.LogServiceImpl.setLevel(LogServiceImpl.java:103) ~[?:?]
	at org.apache.karaf.log.command.LogTail$LogServiceTracker.removedService(LogTail.java:103) ~[?:?]
	at org.apache.karaf.log.command.LogTail$LogServiceTracker.removedService(LogTail.java:76) ~[?:?]
	at org.osgi.util.tracker.ServiceTracker$Tracked.customizerRemoved(ServiceTracker.java:967) ~[?:?]
	at org.osgi.util.tracker.ServiceTracker$Tracked.customizerRemoved(ServiceTracker.java:870) ~[?:?]
	at org.osgi.util.tracker.AbstractTracked.untrack(AbstractTracked.java:341) ~[?:?]
	at org.osgi.util.tracker.ServiceTracker$Tracked.serviceChanged(ServiceTracker.java:909) ~[?:?]
	at org.eclipse.osgi.internal.serviceregistry.FilteredServiceListener.serviceChanged(FilteredServiceListener.java:109) ~[?:?]
	at org.eclipse.osgi.internal.framework.BundleContextImpl.dispatchEvent(BundleContextImpl.java:920) ~[?:?]
	at org.eclipse.osgi.framework.eventmgr.EventManager.dispatchEvent(EventManager.java:230) ~[?:?]
	at org.eclipse.osgi.framework.eventmgr.ListenerQueue.dispatchEventSynchronous(ListenerQueue.java:148) ~[?:?]
	at org.eclipse.osgi.internal.serviceregistry.ServiceRegistry.publishServiceEventPrivileged(ServiceRegistry.java:862) ~[?:?]
	at org.eclipse.osgi.internal.serviceregistry.ServiceRegistry.publishServiceEvent(ServiceRegistry.java:801) ~[?:?]
	at org.eclipse.osgi.internal.serviceregistry.ServiceRegistrationImpl.unregister(ServiceRegistrationImpl.java:222) ~[?:?]
	at org.apache.karaf.util.tracker.BaseActivator.doStop(BaseActivator.java:143) ~[?:?]
	at org.apache.karaf.util.tracker.BaseActivator.stop(BaseActivator.java:105) ~[?:?]
	at org.eclipse.osgi.internal.framework.BundleContextImpl$4.run(BundleContextImpl.java:835) ~[?:?]
	at org.eclipse.osgi.internal.framework.BundleContextImpl$4.run(BundleContextImpl.java:1) ~[?:?]
	at java.security.AccessController.doPrivileged(Native Method) ~[?:?]
	at org.eclipse.osgi.internal.framework.BundleContextImpl.stop(BundleContextImpl.java:828) ~[?:?]
	at org.eclipse.osgi.internal.framework.EquinoxBundle.stopWorker0(EquinoxBundle.java:947) ~[?:?]
	at org.eclipse.osgi.internal.framework.EquinoxBundle$EquinoxModule.stopWorker(EquinoxBundle.java:314) ~[?:?]
	at org.eclipse.osgi.container.Module.doStop(Module.java:636) ~[?:?]
	at org.eclipse.osgi.container.Module.stop(Module.java:498) ~[?:?]
	at org.eclipse.osgi.container.ModuleContainer$ContainerStartLevel.decStartLevel(ModuleContainer.java:1675) ~[?:?]
	at org.eclipse.osgi.container.ModuleContainer$ContainerStartLevel.doContainerStartLevel(ModuleContainer.java:1594) ~[?:?]
	at org.eclipse.osgi.container.SystemModule.stopWorker(SystemModule.java:270) ~[?:?]
	at org.eclipse.osgi.internal.framework.EquinoxBundle$SystemBundle$EquinoxSystemModule.stopWorker(EquinoxBundle.java:147) ~[?:?]
	at org.eclipse.osgi.container.Module.doStop(Module.java:636) ~[?:?]
	at org.eclipse.osgi.container.Module.stop(Module.java:498) ~[?:?]
	at org.eclipse.osgi.container.SystemModule.stop(SystemModule.java:202) ~[?:?]
	at org.eclipse.osgi.internal.framework.EquinoxBundle$SystemBundle$EquinoxSystemModule$1.run(EquinoxBundle.java:165) ~[?:?]
	at java.lang.Thread.run(Thread.java:748) ~[?:?]
==========================================================================================================================================
YEP, that's a confirmative, HUSTON WE HAVE A PROBLEM, at least on Windows machines

let's NOT cause the error to occur, I will now do the following:
net start openhab2
open kitty access the karaf console
log:tail, Cntrl-C and logout
net stop openhab2, what follows is the error disappears!!

2019-03-27 03:35:43.956 [INFO ] [.core.internal.i18n.I18nProviderImpl] - Location set to '35.9530745,-84.10879919999999'.
2019-03-27 03:35:45.456 [WARN ] [.internal.element.HttpContextElement] - Registered http context [null] did not contain a valid http context id
2019-03-27 03:35:49.394 [INFO ] [thome.model.lsp.internal.ModelServer] - Started Language Server Protocol (LSP) service on port 5007
2019-03-27 03:35:49.925 [INFO ] [.dashboard.internal.DashboardService] - Started Dashboard at http://192.168.0.12:8080
2019-03-27 03:35:49.925 [INFO ] [.dashboard.internal.DashboardService] - Started Dashboard at https://192.168.0.12:8443
2019-03-27 03:35:50.347 [INFO ] [openhab.ui.paper.internal.PaperUIApp] - Started Paper UI at /paperui
2019-03-27 03:35:50.456 [INFO ] [ui.habmin.internal.servlet.HABminApp] - Started HABmin servlet at /habmin
2019-03-27 03:35:50.644 [INFO ] [panel.internal.HABPanelDashboardTile] - Started HABPanel at /habpanel
2019-03-27 03:36:07.209 [INFO ] [basic.internal.servlet.WebAppServlet] - Stopped Basic UI
2019-03-27 03:36:13.333 [INFO ] [assic.internal.servlet.WebAppServlet] - Stopped Classic UI
2019-03-27 03:36:13.349 [INFO ] [ui.habmin.internal.servlet.HABminApp] - Stopped HABmin servlet
2019-03-27 03:36:13.411 [INFO ] [panel.internal.HABPanelDashboardTile] - Stopped HABPanel
2019-03-27 03:36:13.411 [INFO ] [openhab.ui.paper.internal.PaperUIApp] - Stopped Paper UI
2019-03-27 03:36:13.411 [INFO ] [.dashboard.internal.DashboardService] - Stopped Dashboard
============================================================================================================================================
let's see what this does:
net start openhab2
open kitty access the karaf console
log:tail, Cntrl-C, DO NOT type logout just hit the upper right corner to exit the session 
net stop openhab2, does the error return?
2019-03-27 03:38:22.803 [INFO ] [.core.internal.i18n.I18nProviderImpl] - Location set to '35.9530745,-84.10879919999999'.
2019-03-27 03:38:24.303 [WARN ] [.internal.element.HttpContextElement] - Registered http context [null] did not contain a valid http context id
2019-03-27 03:38:28.271 [INFO ] [thome.model.lsp.internal.ModelServer] - Started Language Server Protocol (LSP) service on port 5007
2019-03-27 03:38:28.725 [INFO ] [.dashboard.internal.DashboardService] - Started Dashboard at http://192.168.0.12:8080
2019-03-27 03:38:28.725 [INFO ] [.dashboard.internal.DashboardService] - Started Dashboard at https://192.168.0.12:8443
2019-03-27 03:38:29.146 [INFO ] [openhab.ui.paper.internal.PaperUIApp] - Started Paper UI at /paperui
2019-03-27 03:38:29.271 [INFO ] [ui.habmin.internal.servlet.HABminApp] - Started HABmin servlet at /habmin
2019-03-27 03:38:29.334 [INFO ] [panel.internal.HABPanelDashboardTile] - Started HABPanel at /habpanel
2019-03-27 03:38:46.513 [INFO ] [basic.internal.servlet.WebAppServlet] - Stopped Basic UI
2019-03-27 03:38:52.654 [INFO ] [assic.internal.servlet.WebAppServlet] - Stopped Classic UI
2019-03-27 03:38:52.669 [INFO ] [ui.habmin.internal.servlet.HABminApp] - Stopped HABmin servlet
2019-03-27 03:38:52.747 [INFO ] [panel.internal.HABPanelDashboardTile] - Stopped HABPanel
2019-03-27 03:38:52.747 [INFO ] [openhab.ui.paper.internal.PaperUIApp] - Stopped Paper UI
2019-03-27 03:38:52.763 [INFO ] [.dashboard.internal.DashboardService] - Stopped Dashboard
NO Error, good to know, so we only get the error if we do not hit Cntrl-C before exiting the kitty session
================================================================================================================================================

So if the user does not hit CNTRL-C on the console window before shutting down the openhab2 server or if they accessed the console at all and did not hit Cntrl-C before exiting the console they will get this FRAMEWORK ERROR when the openhab2 serer does a shutdown.

Is there a way to catch this error? or Why doesn’t Kitty software cause a logout of the console when I exit the Kitty session by pressing the X in the upper right corner??

0 Likes

(Rich Koshak) #6

I think you have enough information here to file an issue on the openhab-core repo. See How to file an Issue if you need details.

If there is it will be in code. Though the fact that you are getting that log statement means that the exception is being caught and reported.

You’d have to ask on a Kitty forum. Though I suspect that by design when you hit the X it just terminates the connection. Otherwise there would be an unacceptable delay after hitting the X while it logs out of the terminals. And if there is a problem with the terminal, you’d have to wait for the network timeout before it could close the window.

0 Likes

(Gadget Angel) #7

I figured out that the ssh connection was timing out. So I configured the keep alive option in kitty and now Kitty will NOT just disconnect. I have to hit Cntrol-C and logout for it to disconnect. So I think I solved my problem with this work around.

Do you think I should still report the issue. I am not that experienced with ssh so I had no idea that it did not do the “keep alive” option on it’s own. The option was set to 0, i have it set to every 4 minutes.

0 Likes

(Rich Koshak) #8

I don’t think so. If the root cause is ssh then I’m not sure they could fix it in OH anyway.

0 Likes