OpenLiberty / ci.docker

Eclipse Public License 1.0
42 stars 59 forks source link

Podman Windows failing on image build, exit status 21 features.sh #390

Closed sreich closed 1 year ago

sreich commented 1 year ago

Cloned the repo, ran mvn package, cd'd into finish and I get this exit 21 error on features.sh. Is there a way to get it to show me more information, because the exit status is not super helpful...

It is possible podman on my system is messed up, so please don't rule that out as a cause here, particularly podman desktop does give me warnings about docker socket connections. But I would not think this would be an issue for podman commands run directly, only interop commands

This script doesn't seem to have any useful error output? Shouldn't it be dumping something so we can see what the issue is?

Suggestions?


guide-containerize-podman\finish>podman build -t system:1.0-SNAPSHOT system/.
STEP 1/8: FROM icr.io/appcafe/open-liberty:kernel-slim-java11-openj9-ubi
STEP 2/8: ARG VERSION=1.0
--> Using cache c58be545153eac5a189f29ada850452e46fa25d3545302138cda131c65522673
--> c58be545153
STEP 3/8: ARG REVISION=SNAPSHOT
--> Using cache 73b6406700df00715bf7e5a2069756c28a18ddd21fd09ef1677e1077aa764897
--> 73b6406700d
STEP 4/8: LABEL   org.opencontainers.image.authors="Your Name"   org.opencontainers.image.vendor="Open Liberty"   org.opencontainers.image.url="local"   org.opencontainers.image.source="https://github.com/OpenLiberty/guide-containerize-podman"   org.opencontainers.image.version="$VERSION"   org.opencontainers.i
mage.revision="$REVISION"   vendor="Open Liberty"   name="system"   version="$VERSION-$REVISION"   summary="The system microservice from the Containerizing microservices with Podman guide"   description="This image contains the system microservice running with the Open Liberty runtime."
--> Using cache e83311023e732a7f0af27d83965e6839306d29396bada0c021b694581604e2b7
--> e83311023e7
STEP 5/8: COPY --chown=1001:0 src/main/liberty/config /config/
--> Using cache 6cd656781b5baddb9cd93cc39408f74fde239c73ab52b35fc38dc1e0b9761643
--> 6cd656781b5
STEP 6/8: RUN features.sh
Error: building at STEP "RUN features.sh": while running runtime: exit status 21

podman version 4.4.2, WSL 2, Win10, behind corporate vpn so that could definitely be a factor.

gkwan-ibm commented 1 year ago

I transferred this issue from the guide-containerize-podman repo to the ci.docker repo that owns the features.sh script.

sreich commented 1 year ago

thank you Gilbert

this seems to be a case of: it's trying to fetch something but it should be designed to be able to handle a connect failure, or should dump its output to stdout/stderr (or perhaps i missed a docker flag to log better?)

i.e. where is it pulling from? what if my firewall is blocking their DNS/IP and will it tell me such?

leochr commented 1 year ago

@sreich You can set the VERBOSE build arg true to get additional info.

You have two options: 1) Add it to the build command: podman build --build-arg VERBOSE=true -t system:1.0-SNAPSHOT system/.

Or

2) add the following to the Dockerfile (prior to RUN features.sh)

    ARG VERBOSE=true
sreich commented 1 year ago

excellent, thank you!

sreich commented 1 year ago

Nope that didn't offer much more, still all I receive is exit status 21 from openliberty's script. How do I get more information out of that? What would be failing while behind a corporate proxy?

[2/2] STEP 6/9: RUN features.sh Error: building at STEP "RUN features.sh": while running runtime: exit status 21

leochr commented 1 year ago

@sreich Option 1 above (command line) for some reason doesn't seem to produce verbose logs. Please try adding ARG VERBOSE=true to your Dockerfile (prior to RUN features.sh) - option 2 above

The return code is likely from featureUtility. If so, here is what the documentation states for return code of 21: https://openliberty.io/docs/latest/reference/command/featureUtility-installServerFeatures.html: 21 indicates that a runtime exception occurred because of one or more of the following conditions: - A runtime exception occurred during the installation of the .esa subsystem archive file. - A license is not accepted or acknowledged. - The .esa subsystem archive file did not extract correctly.

License is accepted in features.sh, so that can't be the reason. It must be something else that's causing the error. Have you tried it in another environment?

titou10titou10 commented 1 year ago

I had the same problem, addingARG VERBOSE=truejust beforefeatures.sh, make the utility show that I was using features not in OLP v23.0.0.2 but only in v23.0.0.3 which is currently not yet available (eg Jakarta EE 10 stuff likempMetrics-5.0)

FROM icr.io/appcafe/open-liberty:kernel-slim-java11-openj9-ubi

Will fetch the currently latest image which is 23.0.0.2 (Jakarta EE 9.1)...

leochr commented 1 year ago

23.0.0.3 images are now available, so hopefully that resolved the error, at least for you @titou10titou10.

@sreich Please try with the 23.0.0.3 images. If the errir still occurs, please gather the logs with verbose (option 2 above). Also, try in a different environment. Thanks

sreich commented 1 year ago

Haven't been able to reproduce this anymore

This is no longer an issue for me, feel free to close. Thank you