Skip to content

ubi8-openjdk-11 S2I Image not working with Quarkus in Openshift #264

@zg-riband

Description

@zg-riband
  • Given a repo with a basic untouched Quarkus app got from code.quarkus.io and committed for an example here:

https://github.com/zg-riband/testubi8jdk11s2iquarkus

(I added only .s2i directory with environment file)

  • When I create a new app from oc CLI with ubi8/openjdk-11 image like this:

oc import-image ubi8-openjdk-11 --from=registry.access.redhat.com/ubi8/openjdk-11 --confirm
oc new-app ubi8-openjdk-11 https://github.com/zg-riband/testubi8jdk11s2iquarkus.git --name=ubi8-openjdk-11-app

  • Than I got this error:
    INFO Performing Maven build in /tmp/src
    INFO Using MAVEN_OPTS -Xms32m -Xmx128m -XX:+UseParallelGC -XX:MinHeapFreeRatio=10 -XX:MaxHeapFreeRatio=20 -XX:GCTimeRatio=4 -XX:AdaptiveSizePolicyWeight=90 -XX:+ExitOnOutOfMemoryError
    ls: cannot access '/usr/bin/mvn': Operation not permitted
    Error: Could not find or load main class org.codehaus.plexus.classworlds.launcher.Launcher
    Caused by: java.lang.ClassNotFoundException: org.codehaus.plexus.classworlds.launcher.Launcher
    INFO Using
    INFO Running 'mvn -e -Popenshift -DskipTests -Dcom.redhat.xpaas.repo.redhatga -Dfabric8.skip=true -Djkube.skip=true --batch-mode -Djava.net.preferIPv4Stack=true -s /tmp/artifacts/configuration/settings.xml -Dmaven.repo.local=/tmp/artifacts/m2 package'
    ls: cannot access '/usr/bin/mvn': Operation not permitted
    Error: Could not find or load main class org.codehaus.plexus.classworlds.launcher.Launcher
    Caused by: java.lang.ClassNotFoundException: org.codehaus.plexus.classworlds.launcher.Launcher
    error: build error: non-zero (13) exit code from registry.access.redhat.com/ubi8/openjdk-11@sha256:e851770fd181ef49193111f7afcdbf872ad23f3a8234e0e07a742c4ca2882c3d

  • But when I create a new app from oc CLI with openjdk/openjdk-11-rhel7 image like this:

oc import-image openjdk-openjdk-11-rhel7 --from=registry.access.redhat.com/openjdk/openjdk-11-rhel7 --confirm
oc new-app openjdk-11-rhel7 https://github.com/zg-riband/testubi8jdk11s2iquarkus.git --name=openjdk-openjdk-11-rhel7-app

  • everything is ok and the app is created succesfully.

  • The problem also occurs with ubi8-openjdk-17, which is the real reason why I write, since there is no openjdk17rhel8 yet and I intend to use my quarkus app with java 17.

Waiting for your kind reply, thank you.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions