Closed mbronk closed 1 week ago
Separately - if the above gets confirmed as an issue with just a single binding (ex.: pollytts
), I'd like to propose considering it (separately) as a potential issue/enhancement for openhab-core
(hopefully not karaf
itself).
That is, a single addon should ideally not have a system-wide impact and cause all bundles to fail installing (and w/o crisp log allowing to identify the origin ).
PS. Apology for double posting. Just consider this note to be (likely) orthogonal to the primary root cause, so wanted it to be standalone to be able to link directly to it in the future.
This issue has been mentioned on openHAB Community. There might be relevant details there:
https://community.openhab.org/t/openhab-4-2-release-discussion/157076/151
Not sure, but this issue might be a better fit into the distro repo @openhab/distro-maintainers, can someone transfer it?
@mbronk I have just uploaded the two Apache libs to our Artifactory at openhab.jfrog.org, from which the online dependencies are loaded. I would assume the issue to be solved by that. Please be so kind and test it!
@kaikreuzer - didn't have much time today, so only made a very rough check. Looks like the # of errors went down (2->1), but httpclient-osgi
v.4.5.13 seems to still be missing.
Don't have full log (hope to be able to re-test in a few days), only this snippet which I think may be relevant:
Error resolving artifact org.apache.httpcomponents:httpclient-osgi:jar:4.5.13: [Could not find artifact org.apache.httpcomponents:httpclient-osgi:jar:4.5.13 in openhab (https://openhab.jfrog.io/openhab/libs-release/)]
Could you please check if both artifacts uploaded in the right place? Looking at https://openhab.jfrog.io/ui/native/libs-release/org/apache/httpcomponents/httpclient-osgi/ I do not see 4.5.13 indeed.
Sorry @mbronk, my mistake. The artifact upload must have failed without me noticing or checking thoroughly. Now the httpclient-osgi is in place as well and I hope that the issue is finally solved - thanks for your patience!
Hi @kaikreuzer - thanks for the note. Appreciate the updates! I can confirm the flow advances further, but there's unfortunately still an error (this time stracktrace attributes it quite vividly to pollytts
). The gist of it (see at the bottom for full log and stacktrace):
Unable to resolve com.amazonaws.aws-java-sdk-core/1.12.626
Checked on both 4.2.0
and 4.2.1
. Same as before, only the online addon download has issues (.kar
addons bundle works just fine and I am successfully using it as a workaround in my setup).
As mentioned before, I'm unsure if this is the same issue or should be filed separately, but I think that outside the immediate cause, there are at some areas where improvements may be considered. For example:
addons.kar
and 2) for online instance access?
addons.kar
bundles all the deps, it would be ideal if its build failed in case the online repo is missing something.pollytts
, none of addons would install (incl. future attempts to install something from the UI), making the whole instance defunct.
Is there a way to insulate/compartmentalize each addon install and/or back off of failed attempts?pollytts
but in the original one (see log file in my top post) there was no trace of the addon causing the aggregate failure and I only got to pollytts via bisect + looking at addons code repo. Can the handling be improved by any chance?Unable to resolve com.amazonaws.aws-java-sdk-core/1.12.626
The same build error is causing the sandbox builds to fail, see:
@wborn The sandbox builds only started failing a week ago - before, the 4.3.0 builds were just fine. @mbronk reports the problem on 4.2.x, though. Do you have any idea, how that fits together?
The AWS SDK in PollyTTS has last been updated 8 months ago and it was correctly published through the OSGify build (https://ci.openhab.org/view/Release%20Jobs/job/openhab-osgiify/32/). It is also still present in artifactory as expected.
What might be the issue here?
I see the sandbox build succeeds again and I can also install Polly TTS with OH 4.2.1. Does it also work for you again @mbronk?
It probably got fixed by redeploying the artifacts because the openhab-osgiify CI task ran to deploy com.hubspot.jinjava.jinjava, see https://github.com/openhab/openhab-osgiify/pull/48.
It should work for 4.2.x and main again. It took me 2 hours last night to figure out, what was the problem: It turned out, that the artifact upload didn't fail, but that I uploaded both as the httpclient library. Which meant that when Karaf installed the httpcore bundle, it ended up installing httpclient instead - and as a result, the httpcore packages were missing.
Thanks for fixing it Kai! 👍 Looking at the actual JAR content was what I wanted to do next if it was still failing. 😉
I see the sandbox build succeeds again and I can also install Polly TTS with OH 4.2.1. Does it also work for you again @mbronk?
I confirm. Both 4.2.0
and 4.2.1
work for me again! Thanks tons for the fix 👏 .
Technically this issue can be closed now as the original symptoms are gone. Unsure if there's anything in https://github.com/openhab/openhab-distro/issues/1679#issuecomment-2310327817 that you would like to consider for improvement, or if there's room for adding E2E test cases to the CI. Personally unsure if brings enough return on investment, but if you feel anything of it is worth following up, I can file these separately - let me know!
That's good news! I've created https://github.com/openhab/openhab-distro/issues/1686 for addressing the root cause.
OH
4.2.0
fails a 🧹 clean installation w/ pre-populatedaddons.cfg
with the following error:Causing none of the addons to install properly. Subsequent install attempts fail as well. Possibly some ordering/dependency issue between addons and core and may be related to
pollytts
❔Full startup log - fresh instance, vanilla state (click to expand)
``` 18:16:34.587 [INFO ] [org.openhab.core.Activator ] - Starting openHAB 4.2.0 (Release Build) [174/12315] 18:16:42.163 [INFO ] [b.core.model.lsp.internal.ModelServer] - Started Language Server Protocol (LSP) service on port 5007 18:16:52.377 [INFO ] [re.automation.internal.RuleEngineImpl] - Rule engine started. org.apache.karaf.features.internal.util.MultiException: Error: Error downloading mvn:org.apache.httpcomponents/httpclient-osgi/4.5.13 Error downloading mvn:org.apache.httpcomponents/httpcore-osgi/4.4.13 at org.apache.karaf.features.internal.download.impl.MavenDownloadManager$MavenDownloader.Isolation
4.2.0
(vsn4.1.3
is confirmed working)addons.kar
downloaded)Dockerfile
below)Possible cause:
Did not perform extensive testing (this may be a false lead❗), but on the surface it looks related to
pollytts
and changes introduced in openhab/openhab-addons#16294. Unsure if pollytts is the component at fault though, or just victim to other changes or dependency mix w/ other addons.To reproduce
Using the
Dockerfile
listed below:docker run --name openhab -p 8080:8080 --rm -it $(docker build -q .)
addons.kar
)docker run --name openhab -p 8080:8080 --rm -it $(docker build -q . --build-arg DOWNLOAD_ADDONS=1)
docker run --name openhab -p 8080:8080 --rm -it $(docker build -q . --build-arg OPENHAB_VERSION=4.1.3)
addons.kar
)docker run --name openhab -p 8080:8080 --rm -it $(docker build -q . --build-arg OPENHAB_VERSION=4.1.3 --build-arg DOWNLOAD_ADDONS=1)
```Dockerfile FROM azul/zulu-openjdk:17-jre-headless-latest RUN apt-get -qq update && \ apt-get -qq -y --no-install-recommends install wget unzip supervisor -y ARG OPENHAB_VERSION="4.2.0" RUN mkdir -p /opt/openhab && \ wget -O /tmp/openhab-download.zip https://github.com/openhab/openhab-distro/releases/download/${OPENHAB_VERSION}/openhab-${OPENHAB_VERSION}.zip && \ unzip /tmp/openhab-download.zip -d/opt/openhab ARG DOWNLOAD_ADDONS=0 RUN /bin/bash -c "if [[ ${DOWNLOAD_ADDONS} -eq 1 ]]; then wget -P /opt/openhab/addons https://github.com/openhab/openhab-distro/releases/download/${OPENHAB_VERSION}/openhab-addons-${OPENHAB_VERSION}.kar; fi" # HACK: Using supervisor just to execute 2 processes (openhab and its console/log tail) in parallel for quick&dirty checks. # This should be replaced by proper orchestration or at least a dedicated entrypoint script (but... since it works...) COPY <
(👆 click to expand...)Dockerfile
reproducing the issue (ref. table above for exact commands used)