Jetty update, Karaf 4.1.3 upgrade and full LSP support

Tags: #<Tag:0x00007fc90079fbf0> #<Tag:0x00007fc90079fab0> #<Tag:0x00007fc90079f9e8>

I added an issue for the Error executing command: java.io.IOException: Stream Closed

This is the part of my log (only info, not debug) where my #1084 system stopped working several times:

2017-11-20 10:42:37.929 [WARN ] [ore.internal.events.OSGiEventManager] - Dispatching event to subscriber 'org.eclipse.smarthome.io.monitor.internal.EventLogger@a0334a' takes more than 5000ms.
2017-11-20 10:42:37.931 [WARN ] [ore.internal.events.OSGiEventManager] - Dispatching event to subscriber 'org.eclipse.smarthome.io.monitor.internal.EventLogger@a0334a' takes more than 5000ms.
2017-11-20 10:42:37.932 [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=62, service.id=158, service.bundleid=110, service.scope=bundle} | Bundle(org.eclipse.smarthome.core_0.9.0.201711182209 [110])] due to timeout!
2017-11-20 10:42:41.162 [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=62, service.id=158, service.bundleid=110, service.scope=bundle} | Bundle(org.eclipse.smarthome.core_0.9.0.201711182209 [110])] due to timeout!
2017-11-20 10:42:41.174 [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=62, service.id=158, service.bundleid=110, service.scope=bundle} | Bundle(org.eclipse.smarthome.core_0.9.0.201711182209 [110])] due to timeout!
2017-11-20 10:42:41.179 [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=62, service.id=158, service.bundleid=110, service.scope=bundle} | Bundle(org.eclipse.smarthome.core_0.9.0.201711182209 [110])] due to timeout!

Yes, that’s what I mean: These logs do not tell us anything. We need to do some proper tracking within the framework in order to be able to produce better logs in future.

Done! https://github.com/eclipse/smarthome/issues/4601

Seeing all those misplaced quotes makes me wonder if something in the config parser is broken? My /var/lib/openhab2/etc/org.openhab.addons.cfg looks like this:

package = "standard"
ui = "basic,paper,habpanel,habmin"
remote = B"true"
persistence = "influxdb"
misc = "restdocs"
binding = "zwave,astro"

Looking at the samples in /etc/openhab2/services/addons.cfg let me try removing the quotes from the file but that just changed the error messages (no more quotes), the actual errors are still the same.

Is there anything I can try to help fixing this?

The quotes are definitely wrong (upgraded to #1088 as well and there are no quotes at all in my addons.cfg)

I think you have to delete cache:

Thanks for reminding me. I already tried that a few times, but it seems I never did it at the same time as removing the quotes. So I always had either a bad config or cached data coming from the bad config. Doing both (clearing cache and removing quotes) now got rid of the error about openhab-package-standard not being installed, but I still have this left:

2017-11-21 19:18:43.016 [INFO ] [el.core.internal.ModelRepositoryImpl] - Loading model 'abwesenheit.rules'
2017-11-21 19:18:44.785 [INFO ] [.dashboard.internal.DashboardService] - Started dashboard at http://192.168.0.22:8080
2017-11-21 19:18:44.802 [INFO ] [.dashboard.internal.DashboardService] - Started dashboard at https://192.168.0.22:8443
2017-11-21 19:18:50.333 [INFO ] [el.core.internal.ModelRepositoryImpl] - Loading model 'influxdb.persist'
2017-11-21 19:18:51.191 [INFO ] [el.core.internal.ModelRepositoryImpl] - Loading model 'test.sitemap'
2017-11-21 19:18:57.012 [INFO ] [el.core.internal.ModelRepositoryImpl] - Loading model 'astro.things'
2017-11-21 19:18:57.191 [INFO ] [thome.model.lsp.internal.ModelServer] - Language Server started on port 5007
2017-11-21 19:19:03.081 [WARN ] [url.mvn.internal.AetherBasedResolver] - Error resolving artifact org.openhab.ui:org.openhab.ui.habmin:jar:2.2.0-SNAPSHOT: [Could not find artifact org.openhab.ui:org.openhab.ui.habmin:jar:2.2.0-SNAPSHOT]
java.io.IOException: Error resolving artifact org.openhab.ui:org.openhab.ui.habmin:jar:2.2.0-SNAPSHOT: [Could not find artifact org.openhab.ui:org.openhab.ui.habmin:jar:2.2.0-SNAPSHOT]
        at org.ops4j.pax.url.mvn.internal.AetherBasedResolver.resolve(AetherBasedResolver.java:720) [4:org.ops4j.pax.url.mvn:2.5.3]
        at org.ops4j.pax.url.mvn.internal.AetherBasedResolver.resolve(AetherBasedResolver.java:659) [4:org.ops4j.pax.url.mvn:2.5.3]
        at org.ops4j.pax.url.mvn.internal.AetherBasedResolver.resolve(AetherBasedResolver.java:600) [4:org.ops4j.pax.url.mvn:2.5.3]
        at org.ops4j.pax.url.mvn.internal.AetherBasedResolver.resolve(AetherBasedResolver.java:567) [4:org.ops4j.pax.url.mvn:2.5.3]
        at org.apache.karaf.features.internal.download.impl.MavenDownloadTask.download(MavenDownloadTask.java:47) [9:org.apache.karaf.features.core:4.1.3]
        at org.apache.karaf.features.internal.download.impl.AbstractRetryableDownloadTask.run(AbstractRetryableDownloadTask.java:60) [9:org.apache.karaf.features.core:4.1.3]
        at java.util.concurrent.Executors$RunnableAdapter.call(Executors.java:511) [?:?]
        at java.util.concurrent.FutureTask.run(FutureTask.java:266) [?:?]
        at java.util.concurrent.ScheduledThreadPoolExecutor$ScheduledFutureTask.access$201(ScheduledThreadPoolExecutor.java:180) [?:?]
        at java.util.concurrent.ScheduledThreadPoolExecutor$ScheduledFutureTask.run(ScheduledThreadPoolExecutor.java:293) [?:?]
        at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1142) [?:?]
        at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:617) [?:?]
        at java.lang.Thread.run(Thread.java:745) [?:?]
        Suppressed: shaded.org.eclipse.aether.transfer.ArtifactNotFoundException: Could not find artifact org.openhab.ui:org.openhab.ui.habmin:jar:2.2.0-SNAPSHOT
                at shaded.org.eclipse.aether.internal.impl.DefaultArtifactResolver.resolve(DefaultArtifactResolver.java:434) [4:org.ops4j.pax.url.mvn:2.5.3]
                at shaded.org.eclipse.aether.internal.impl.DefaultArtifactResolver.resolveArtifacts(DefaultArtifactResolver.java:246) [4:org.ops4j.pax.url.mvn:2.5.3]
                at shaded.org.eclipse.aether.internal.impl.DefaultArtifactResolver.resolveArtifact(DefaultArtifactResolver.java:223) [4:org.ops4j.pax.url.mvn:2.5.3]
                at shaded.org.eclipse.aether.internal.impl.DefaultRepositorySystem.resolveArtifact(DefaultRepositorySystem.java:294) [4:org.ops4j.pax.url.mvn:2.5.3]
                at org.ops4j.pax.url.mvn.internal.AetherBasedResolver.resolve(AetherBasedResolver.java:705) [4:org.ops4j.pax.url.mvn:2.5.3]
                at org.ops4j.pax.url.mvn.internal.AetherBasedResolver.resolve(AetherBasedResolver.java:659) [4:org.ops4j.pax.url.mvn:2.5.3]
                at org.ops4j.pax.url.mvn.internal.AetherBasedResolver.resolve(AetherBasedResolver.java:600) [4:org.ops4j.pax.url.mvn:2.5.3]
                at org.ops4j.pax.url.mvn.internal.AetherBasedResolver.resolve(AetherBasedResolver.java:567) [4:org.ops4j.pax.url.mvn:2.5.3]
                at org.apache.karaf.features.internal.download.impl.MavenDownloadTask.download(MavenDownloadTask.java:47) [9:org.apache.karaf.features.core:4.1.3]
                at org.apache.karaf.features.internal.download.impl.AbstractRetryableDownloadTask.run(AbstractRetryableDownloadTask.java:60) [9:org.apache.karaf.features.core:4.1.3]
                at java.util.concurrent.Executors$RunnableAdapter.call(Executors.java:511) [?:?]
                at java.util.concurrent.FutureTask.run(FutureTask.java:266) [?:?]
                at java.util.concurrent.ScheduledThreadPoolExecutor$ScheduledFutureTask.access$201(ScheduledThreadPoolExecutor.java:180) [?:?]
                at java.util.concurrent.ScheduledThreadPoolExecutor$ScheduledFutureTask.run(ScheduledThreadPoolExecutor.java:293) [?:?]
                at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1142) [?:?]
                at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:617) [?:?]
                at java.lang.Thread.run(Thread.java:745) [?:?]
Caused by: shaded.org.eclipse.aether.resolution.ArtifactResolutionException: Error resolving artifact org.openhab.ui:org.openhab.ui.habmin:jar:2.2.0-SNAPSHOT
        at shaded.org.eclipse.aether.internal.impl.DefaultArtifactResolver.resolve(DefaultArtifactResolver.java:444) ~[?:?]
        at shaded.org.eclipse.aether.internal.impl.DefaultArtifactResolver.resolveArtifacts(DefaultArtifactResolver.java:246) ~[?:?]
        at shaded.org.eclipse.aether.internal.impl.DefaultArtifactResolver.resolveArtifact(DefaultArtifactResolver.java:223) ~[?:?]
        at shaded.org.eclipse.aether.internal.impl.DefaultRepositorySystem.resolveArtifact(DefaultRepositorySystem.java:294) ~[?:?]
        at org.ops4j.pax.url.mvn.internal.AetherBasedResolver.resolve(AetherBasedResolver.java:705) ~[?:?]
        ... 12 more
2017-11-21 19:19:03.136 [ERROR] [core.karaf.internal.FeatureInstaller] - Failed installing 'openhab-ui-basic, openhab-misc-restdocs, openhab-binding-astro, openhab-ui-habmin, openhab-persistence-influxdb, openhab-ui-habpanel, openhab-ui-paper, openhab-binding-zwave': Error:
        Error downloading mvn:org.openhab.ui/org.openhab.ui.habmin/2.2.0-SNAPSHOT

The config now looks like this:

package = standard
ui = basic,paper,habpanel,habmin
remote = B"true"
persistence = influxdb
misc = restdocs
binding = zwave,astro

Any hint how to proceed? I didn’t write that config myself, openHAB did. So I don’t know how any wrong quotes got in there in the first place.

This doesn’t look right? Typo or is that actually in your file? I have remote = true, not “B” and no quotes.

I don’t know if this is related to your current problem.

Thats really interesting. I have now checked my addon.cfg and recognized that also with an update to #1088 this file is empty. Everything is commented out.
Maybe thats the point where all of those issues coming from?

My installation still hangs with installing UI …

Hooray, that was it! After fixing the bool value I can control my lights and blinds again. :smile:

1 Like

I can now confirm that also fixed all my tons of errors after the upgrade.
I just reinstalled the bindings which i havent all listed within the addons.cfg file.

It is the case that after upgrading this file is not getting migrated but getting completely overwritten. i just activated necessary lines (everything was commented out).

Now everything works again and being on #1088.

Maybe someone can look into it why addons.cfg is not “migrated” properly when doing an upgrade - this saves a lot of time to people :slight_smile:
hooray

I don’t know if this is helping, but I just checked my /var/lib/openhab2/etc/org.openhab.addons.cfg and it looks exactly like @houz one, I’ve also got the B"true". I’m running build 1073 (didn’t dare upgrading last few days because of the known problems) and everything is working like a charm here.

Pasting the entire file below:

package = "standard"
ui = "basic,paper,habmin"
remote = B"true"
binding = "tellstick,expire1,exec,sonos"
persistence = "jdbc-mysql"
action = "mail"
transformation = "regex"
voice = "voicerss"

i’ve read the whole thread and have been following all the leads, but still nothing works. Here the first error message:

2017-11-21 21:45:00.709 [ERROR] [org.openhab.binding.pilight         ] - FrameworkEvent ERROR - org.openhab.binding.pilight
org.osgi.framework.BundleException: Could not resolve module: org.openhab.binding.pilight [11]
  Unresolved requirement: Import-Package: org.openhab.core.binding

After some more exceptions it results in the following error:

2017-11-21 21:45:03.827 [ERROR] [core.karaf.internal.FeatureInstaller] - Failed installing 'openhab-binding-exec, openhab-binding-enocean1, openhab-persistence-"mysql, openhab-binding-"avmfritz, openhab-binding-caldav-command1, openhab-ui-habpanel, openhab-transformation-"map, openhab-transformation-regex, openhab-ui-"classic, openhab-binding-lgtv1", openhab-persistence-rrd4j", openhab-ui-basic, openhab-binding-caldav-personal1, openhab-ui-habmin", openhab-transformation-xslt, openhab-transformation-exec, openhab-transformation-jsonpath", openhab-ui-paper, openhab-misc-"restdocs", openhab-binding-onkyo': Error:
	Error downloading mvn:org.openhab.binding/org.openhab.binding.caldav-personal/1.11.0-SNAPSHOT

after all it still hangs with “please stand by while UIs are being installed. This can take several minutes.”

I’ve upgraded from Build #1082 to Build #1088 running ‘runtime/bin/update’, platform is a raspberry pi 3, openhab is installed in /opt/openhab2 as described here.

@benjy, you work a lot with the upgrade scripts and such, do you have any ideas? To summarize, people are upgrading to recent builds and their addons.cfg are becoming corrupted. See Daniel’s posting for an example.

Woah this is odd. I doubt it has anything to do with the upgrade scripts, in both apt and the manual script org.openhab.addons.cfg is untouched.

@Schorsch would you be able to post the contents of your /opt/openhab2/userdata/etc/org.openhab.addons.cfg?

I suspect that the first launch of a rogue snapshot is trying to configure it this way. But would like to compare the file on different instalation methods first.

For how long have they been untouched? I mean, this might very well have been in my config for a while, I seldom check the contents of that file. And everything seems to work fine anyway until OH is upgrading to 1083+.

In the meantime i made a reinstallation of OH2 and restored the backup (without tmp and cache). Now it works like a charm and better than ever bevor. The /opt/openhab2/userdata/etc/org.openhab.addons.cfg file is now “clean”, without “B” and and quotiation marks. I don’t know what the problem was, but it doesn’t matter. Best OH2 till now.

with backup I assume you just pasted the config files from /etc/openhab2/* ?

It is definitely not related to the upgrade scripts. My assumption is that this is due to an changed behavior of Felix FileInstall which has been updated to a more recent version in Karaf 4.1.3.
FileInstall writes such files as well, if configs are edited through Config Admin (e.g. by the Paper UI).
I’ll try to figure out what causes the file to be written by FileInstall here in the first place and also what goes wrong when parsing such a file. I have entered an issue for it.

1 Like

yes. Bevor reinstalling OH i’ve modified the /opt/openhab2/userdata/etc/org.openhab.addons.cfg, since it was also wrong formatted as described here in this thread. Unfortunately i’ve not checked, how the file looks like directly after unpacking the new version.

1 Like