question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

When packaging using Openshift extension and s2i, created image run not find quarkus application on start.

See original GitHub issue

Describe the bug When packaging an Quarkus application using the s2i Openshift extension. The build docker image, can not find the quarkus application in docker image /deployment folder and thus cannot start the application

Expected behavior When running the built docker image with following command: docker run namespace/openshift-s2i-issue:1.0.0 It is expected that the Quarkus application starts.

Actual behavior We get an error saying that the java (Quarkus) application cannot be found in /deployments folder: /usr/local/s2i/run: line 15: /opt/jboss/container/maven/default//scl-enable-maven: No such file or directory Starting the Java application using /opt/jboss/container/java/run/run-java.sh … ERROR Neither $JAVA_MAIN_CLASS nor $JAVA_APP_JAR is set and 0 JARs found in /deployments (1 expected) INFO exec java -javaagent:/usr/share/java/jolokia-jvm-agent/jolokia-jvm.jar=config=/opt/jboss/container/jolokia/etc/jolokia.properties -XX:+UseParallelOldGC -XX:MinHeapFreeRatio=10 -XX:MaxHeapFreeRatio=20 -XX:GCTimeRatio=4 -XX:AdaptiveSizePolicyWeight=90 -XX:MaxMetaspaceSize=100m -XX:+ExitOnOutOfMemoryError -cp “.” -jar Error: -jar requires jar file specification Usage: java [options] <mainclass> [args…] . . .

To Reproduce Link to reproducer project

Steps to reproduce the behavior:

  1. oc login …
  2. ./mvnw -Dquarkus.container-image.build=true -Dquarkus.container-image.tag=1.0.0 -Dproject.version=1.0.0 -Dquarkus.kubernetes-client.trust-certs=true -Dquarkus.profile=prod -Dquarkus.package.type=fast-jar clean package
  3. docker run <URL for registry>/<project/namespace>/openshift-s2i-issue:1.0.0

Configuration

# NA

Screenshots NA

Environment (please complete the following information):

  • CentOS 7 and Fedora 32
  • Redhat OpenJDK 11.0.9.1+11
  • Quarkus version : 1.10.5
  • Maven version 3.6.3
  • base s2i image: registry.access.redhat.com/ubi8/openjdk-11

Additional context The README.md also describes the issue, in a little more detail.

Issue Analytics

  • State:closed
  • Created 3 years ago
  • Comments:5 (3 by maintainers)

github_iconTop GitHub Comments

1reaction
bslaterdkcommented, Feb 26, 2021

Is this still a problem with Quarkus 1.11.3.Final?

Hi Georgios

I finally got around testing it again. And I have now tested will all three package types. And so far it seems to works as intended.

0reactions
Sgitariocommented, Sep 29, 2022

I’m closing as it worked with Quarkus 1.11.3.Final

Read more comments on GitHub >

github_iconTop Results From Across the Web

Deploying on OpenShift - Quarkus
This command will build your application locally, then trigger a container image build and finally apply the generated OpenShift resources automatically. The ...
Read more >
Deploying your Quarkus applications to OpenShift
Information is provided to help you to deploy your Quarkus applications running on Java 17 to OpenShift by using the Source-to-Image (S2I) ...
Read more >
Deploying on OpenShift with S2I - Quarkus
The solution is located in the getting-started directory. Deploying the application as GraalVM native executable in OpenShift. In this section, we are going...
Read more >
Troubleshooting the Source-to-Image process | Support
Use Source-to-Image (S2I) to build reproducible, Docker-formatted container images. You can create ready-to-run images by injecting application source code ...
Read more >
Quarkus Openshift s2i build, app in wrong deployment folder
Log into Openshift using oc: oc login .... · Run mvn quarkus byuilkd using s2i: mvn -Dquarkus.container-image.build=true -Dquarkus.container- ...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found