openHAB version: 3.3.0.M4
I have several java errors in log after update to 3.3.0.M4, referring to missing modules:
grep ‘Could not resolve’ openhab.log
org.osgi.framework.BundleException: Could not resolve module: org.openhab.core.addon.marketplace [149]
org.osgi.framework.BundleException: Could not resolve module: org.openhab.core.addon.marketplace.karaf [150]
org.osgi.framework.BundleException: Could not resolve module: org.openhab.core.automation.module.media [155]
org.osgi.framework.BundleException: Could not resolve module: org.openhab.core.automation.module.script [156]
org.osgi.framework.BundleException: Could not resolve module: org.openhab.core.automation.module.script.rulesupport [157]
org.osgi.framework.BundleException: Could not resolve module: org.openhab.core.automation.rest [158]
org.osgi.framework.BundleException: Could not resolve module: org.openhab.core.io.monitor [172]
org.osgi.framework.BundleException: Could not resolve module: org.openhab.core.model.lsp [191]
org.osgi.framework.BundleException: Could not resolve module: org.openhab.core.model.rule [195]
org.osgi.framework.BundleException: Could not resolve module: org.openhab.core.model.rule.ide [196]
org.osgi.framework.BundleException: Could not resolve module: org.openhab.core.model.rule.runtime [197]
org.osgi.framework.BundleException: Could not resolve module: org.openhab.core.model.script.ide [199]
org.osgi.framework.BundleException: Could not resolve module: org.openhab.core.model.script.runtime [200]
org.osgi.framework.BundleException: Could not resolve module: org.openhab.io.openhabcloud [275]
In console I have all the budles installed but some are waiting:
openhab> bundle:list | grep -i waiting
283 │ Waiting │ 80 │ 3.3.0.M4 │ openHAB Core :: Bundles :: Automation
284 │ Waiting │ 80 │ 3.3.0.M4 │ openHAB Core :: Bundles :: Ephemeris
285 │ Waiting │ 80 │ 3.3.0.M4 │ openHAB Core :: Bundles :: Model Script
I tried to uninstall them, clean cache and restart, but still same errors
Do you have a ephemeris.cfg in conf/services? If so, please show that. Do you have a file userdata/config/org/openhab/ephemeris.config? If so, please show that.
I believe conf is /etc/openhab and userdata is /var/lib/openhab on openHABian, but I’m not 100% sure.
No, I have no ephemeris.conf, and I do not remember to have done it.
All my config is done via text files under /etc/openhab and I know quite well what I diid in the past.
EDIT: Downgraded to 3.3.0M3, I have the same errors. Maybe some of my files are corrupted? I tried to backup/restore the whole OH3 and cleared cache, but nothing changed.
Further investigations bring me to think that some of these errors are related to the use of android app when out of local network. When I connect from my smartphone with OH client, after less than a minute I have this error:
2022-05-05 12:29:31.500 [WARN ] [ache.cxf.phase.PhaseInterceptorChain] - Interceptor for {http://internal.karaf.core.openhab.org/}LoggerResource has thrown exception, unwinding now
org.apache.cxf.interceptor.Fault: Could not send Message.
at org.apache.cxf.interceptor.MessageSenderInterceptor$MessageSenderEndingInterceptor.handleMessage(MessageSenderInterceptor.java:67) ~[bundleFile:3.4.5]
at org.apache.cxf.phase.PhaseInterceptorChain.doIntercept(PhaseInterceptorChain.java:308) ~[bundleFile:3.4.5]
at org.apache.cxf.interceptor.OutgoingChainInterceptor.handleMessage(OutgoingChainInterceptor.java:90) ~[bundleFile:3.4.5]
at org.apache.cxf.phase.PhaseInterceptorChain.doIntercept(PhaseInterceptorChain.java:308) ~[bundleFile:3.4.5]
at org.apache.cxf.transport.ChainInitiationObserver.onMessage(ChainInitiationObserver.java:121) ~[bundleFile:3.4.5]
at org.apache.cxf.transport.http.AbstractHTTPDestination.invoke(AbstractHTTPDestination.java:265) ~[bundleFile:3.4.5]
at org.apache.cxf.transport.servlet.ServletController.invokeDestination(ServletController.java:234) ~[bundleFile:3.4.5]
at org.apache.cxf.transport.servlet.ServletController.invoke(ServletController.java:208) ~[bundleFile:3.4.5]
at org.apache.cxf.transport.servlet.ServletController.invoke(ServletController.java:160) ~[bundleFile:3.4.5]
at org.apache.cxf.transport.servlet.CXFNonSpringServlet.invoke(CXFNonSpringServlet.java:225) ~[bundleFile:3.4.5]
at org.apache.cxf.transport.servlet.AbstractHTTPServlet.handleRequest(AbstractHTTPServlet.java:298) ~[bundleFile:3.4.5]
at org.apache.cxf.transport.servlet.AbstractHTTPServlet.doGet(AbstractHTTPServlet.java:222) ~[bundleFile:3.4.5]
at javax.servlet.http.HttpServlet.service(HttpServlet.java:687) ~[bundleFile:3.1.0]
at org.apache.cxf.transport.servlet.AbstractHTTPServlet.service(AbstractHTTPServlet.java:273) ~[bundleFile:3.4.5]
at org.eclipse.jetty.servlet.ServletHolder.handle(ServletHolder.java:799) ~[bundleFile:9.4.43.v20210629]
at org.eclipse.jetty.servlet.ServletHandler.doHandle(ServletHandler.java:550) ~[bundleFile:9.4.43.v20210629]
at org.ops4j.pax.web.service.jetty.internal.HttpServiceServletHandler.doHandle(HttpServiceServletHandler.java:71) ~[bundleFile:?]
at org.eclipse.jetty.server.handler.ScopedHandler.handle(ScopedHandler.java:143) ~[bundleFile:9.4.43.v20210629]
at org.eclipse.jetty.security.SecurityHandler.handle(SecurityHandler.java:602) ~[bundleFile:9.4.43.v20210629]
at org.eclipse.jetty.server.handler.HandlerWrapper.handle(HandlerWrapper.java:127) ~[bundleFile:9.4.43.v20210629]
at org.eclipse.jetty.server.handler.ScopedHandler.nextHandle(ScopedHandler.java:235) ~[bundleFile:9.4.43.v20210629]
at org.eclipse.jetty.server.session.SessionHandler.doHandle(SessionHandler.java:1624) ~[bundleFile:9.4.43.v20210629]
at org.eclipse.jetty.server.handler.ScopedHandler.nextHandle(ScopedHandler.java:233) ~[bundleFile:9.4.43.v20210629]
at org.eclipse.jetty.server.handler.ContextHandler.doHandle(ContextHandler.java:1434) ~[bundleFile:9.4.43.v20210629]
at org.ops4j.pax.web.service.jetty.internal.HttpServiceContext.doHandle(HttpServiceContext.java:294) ~[bundleFile:?]
at org.eclipse.jetty.server.handler.ScopedHandler.nextScope(ScopedHandler.java:188) ~[bundleFile:9.4.43.v20210629]
at org.eclipse.jetty.servlet.ServletHandler.doScope(ServletHandler.java:501) ~[bundleFile:9.4.43.v20210629]
at org.eclipse.jetty.server.session.SessionHandler.doScope(SessionHandler.java:1594) ~[bundleFile:9.4.43.v20210629]
at org.eclipse.jetty.server.handler.ScopedHandler.nextScope(ScopedHandler.java:186) ~[bundleFile:9.4.43.v20210629]
at org.eclipse.jetty.server.handler.ContextHandler.doScope(ContextHandler.java:1349) ~[bundleFile:9.4.43.v20210629]
at org.eclipse.jetty.server.handler.ScopedHandler.handle(ScopedHandler.java:141) ~[bundleFile:9.4.43.v20210629]
at org.ops4j.pax.web.service.jetty.internal.JettyServerHandlerCollection.handle(JettyServerHandlerCollection.java:82) ~[bundleFile:?]
at org.eclipse.jetty.server.handler.HandlerWrapper.handle(HandlerWrapper.java:127) ~[bundleFile:9.4.43.v20210629]
at org.eclipse.jetty.server.Server.handle(Server.java:516) ~[bundleFile:9.4.43.v20210629]
at org.eclipse.jetty.server.HttpChannel.lambda$handle$1(HttpChannel.java:388) ~[bundleFile:9.4.43.v20210629]
at org.eclipse.jetty.server.HttpChannel.dispatch(HttpChannel.java:633) [bundleFile:9.4.43.v20210629]
at org.eclipse.jetty.server.HttpChannel.handle(HttpChannel.java:380) [bundleFile:9.4.43.v20210629]
at org.eclipse.jetty.server.HttpConnection.onFillable(HttpConnection.java:277) [bundleFile:9.4.43.v20210629]
at org.eclipse.jetty.io.AbstractConnection$ReadCallback.succeeded(AbstractConnection.java:311) [bundleFile:9.4.43.v20210629]
at org.eclipse.jetty.io.FillInterest.fillable(FillInterest.java:105) [bundleFile:9.4.43.v20210629]
at org.eclipse.jetty.io.ChannelEndPoint$1.run(ChannelEndPoint.java:104) [bundleFile:9.4.43.v20210629]
at org.eclipse.jetty.util.thread.strategy.EatWhatYouKill.runTask(EatWhatYouKill.java:338) [bundleFile:9.4.43.v20210629]
at org.eclipse.jetty.util.thread.strategy.EatWhatYouKill.doProduce(EatWhatYouKill.java:315) [bundleFile:9.4.43.v20210629]
at org.eclipse.jetty.util.thread.strategy.EatWhatYouKill.tryProduce(EatWhatYouKill.java:173) [bundleFile:9.4.43.v20210629]
I would suggest you stop openHAB, change the configuration like my example (i.e. remove the double quotes, remove the service.bundleLocation entry, increase the revision and start openHAB again.
I’ll provide a fix that prevents invalid configurations to prevent other services from starting.
Stopped OH, edited /var/lib/openhab/config/org/openhab/ephemeris.config.
Then updated to 3.3.0.M4 , restarted, same error, and the config is again wrong as before of editing.
It is reinstalled in wrong format after restarting OH. I see it has the time of restarting, while after my editing it has the current time of editing.
The wrong file comes from the statement
felix.fileinstall.filename=“file:/var/lib/openhab/etc/org.openhab.ephemeris.cfg”
I edited /var/lib/openhab/etc/org.openhab.ephemeris.cfg this way:
dayset-weekend = (
“( “SATURDAY”, “SUNDAY”, )”,
)
Then in UI deleted my city and country from ephemeris configuration, restarted OH and all is fine for first restart!
Then the files is corrupted again:
:org.apache.felix.configadmin.revision:=L"262"
country="“it”"
dayset-weekend="(\ “SATURDAY,\ SUNDAY”,\ )"
felix.fileinstall.filename=“file:/var/lib/openhab/etc/org.openhab.ephemeris.cfg”
service.pid=“org.openhab.ephemeris”
I been looking at this issue once again (I was hit by it in 2015 and 2022), turns out that there is a nasty bug in processing of configuration inputs. The .config file read as an array - using syntax dayset-weekend=[ "SATURDAY", "SUNDAY" ] is written back as a collection dayset-weekend=( "SATURDAY", "SUNDAY" ) which breaks processing of .config file due to a bug in Felix Utils (1.11.2) which are used by Felix Fileinstall. There are new releases of felix utils, but fileinstall got stuck for few years with old utils and still does not process properly updated file. See https://issues.apache.org/jira/browse/FELIX-6687
Another point - ConfigMapper (in 3.x) and ConfigParser (in 4.x) does not handle arrays. The line:
covers only part of cases - either value can be an array or type could be an array. It can be determined through Class.isArray and managed through java.lang.reflect.Array.
I know that issue is solved on OH end now, but wanted to share my findings just in case if someone runs again into troubles with ephemeris configuration using arrays/collections.