Quarkus: Container build fails with "error: Error -1 running transaction"

Created on 5 Nov 2020  Â·  7Comments  Â·  Source: quarkusio/quarkus

Describe the bug

Running the container build (fast-jar or not) fails

Expected behavior

Build succeeds.

Actual behavior

The build fails with the following error:

~
…
Cleanup: glibc;2.28-72.el8_1.1;x86_64;installed
Installing: (null)
Cleanup: setup;2.12.2-2.el8_1.1;noarch;installed
Installing: (null)
Cleanup: redhat-release;8.1-3.3.el8;x86_64;installed
Installing: (null)
Cleanup: tzdata;2019c-1.el8;noarch;installed
Installing: (null)
Cleanup: libgcc;8.3.1-4.5.el8;x86_64;installed
Installing: (null)
error: Error -1 running transaction
Error: error building at STEP "RUN microdnf install curl ca-certificates ${JAVA_PACKAGE} && microdnf update && microdnf clean all && mkdir /deployments && chown 1001 /deployments && chmod "g+rwX" /deployments && chown 1001:root /deployments && curl https://repo1.maven.org/maven2/io/fabric8/run-java-sh/${RUN_JAVA_VERSION}/run-java-sh-${RUN_JAVA_VERSION}-sh.sh -o /deployments/run-java.sh && chown 1001 /deployments/run-java.sh && chmod 540 /deployments/run-java.sh && echo "securerandom.source=file:/dev/urandom" >> /etc/alternatives/jre/lib/security/java.security": error while running runtime: exit status 1
~

To Reproduce

Link to a small reproducer (preferably a Maven project if the issue is not Gradle-specific).

Or attach an archive containing the reproducer to the issue.

Steps to reproduce the behavior:

  1. Use the quarkus quickstart example
  2. Run docker build -f src/main/docker/Dockerfile.fast-jar -t quarkus/my-project .
  3. See error

Configuration

# Add your application.properties here, if applicable.

Screenshots
(If applicable, add screenshots to help explain your problem.)

Environment (please complete the following information):

  • Output of uname -a or ver:
    ~
    Linux brocken 5.8.16-300.fc33.x86_64 #1 SMP Mon Oct 19 13:18:33 UTC 2020 x86_64 x86_64 x86_64 GNU/Linux
    ~
  • Output of java -version:
    ~
    openjdk version "11.0.9" 2020-10-20
    OpenJDK Runtime Environment 18.9 (build 11.0.9+11)
    OpenJDK 64-Bit Server VM 18.9 (build 11.0.9+11, mixed mode, sharing)
    ~
  • GraalVM version (if different from Java):
  • Quarkus version or git rev: quarkus-maven-plugin:1.9.1.Final
  • Build tool (ie. output of mvnw --version or gradlew --version):
    ~
    Apache Maven 3.6.3 (cecedd343002696d0abb50b32b541b8a6ba2883f)
    Maven home: /home/…/tools/maven/apache-maven-current
    Java version: 11.0.9, vendor: Red Hat, Inc., runtime: /usr/lib/jvm/java-11-openjdk-11.0.9.11-0.fc33.x86_64
    Default locale: en_IE, platform encoding: UTF-8
    OS name: "linux", version: "5.8.16-300.fc33.x86_64", arch: "amd64", family: "unix"
    ~

Additional context
(Add any other context about the problem here.)

kinbug

Most helpful comment

Yes, I can confirm, upgrading to 8.3 also fixed the issue for me. Thanks @tiesebarrell for letting us know!

All 7 comments

@ctron which quickstart should we use? We have plenty of them :).

Whatever is being created by:

~
mvn io.quarkus:quarkus-maven-plugin:1.9.2.Final:create \
-DprojectGroupId=org.acme \
-DprojectArtifactId=getting-started \
-DclassName="org.acme.getting.started.GreetingResource" \
-Dpath="/hello"
cd getting-started
~

I was not able to reproduce this problem

We are experiencing the same problem on a build that used to work just fine. In our case the build works locally (even without Docker cache), but after Bitbucket dropped the Docker cache of this pipeline and every step is performed fresh, it no longer succeeds and crashes with this error. The project was originally created with a quickstart as well, only with Gradle. We're running the standard Dockerfile.jvm that was generated with the project.

Looking at the local build output, it may be related to a message that pops up:

(microdnf:436): librhsm-WARNING **: 20:51:19.249: Found 0 entitlement certificates

It then proceeds to download the certificates and continues. The logging is marked as red, so the output might trick the pipeline (in our case) into thinking there's an error, while in reality there is just a required download that was discovered.

As suggested here, upgrading from ubi-minimal:8.1 (which was used by the quickstarter) to ubi-minimal:8.3 resolved the problem for us.

Thanks for the information.

I'll go ahead and close this as we have already bumbed to 8.3 in https://github.com/quarkusio/quarkus/pull/13177

Yes, I can confirm, upgrading to 8.3 also fixed the issue for me. Thanks @tiesebarrell for letting us know!

Was this page helpful?
0 / 5 - 0 ratings