Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

deployment-target=knative not working with Quarkus 1.9 #195

Closed
iocanel opened this issue Oct 26, 2020 · 0 comments
Closed

deployment-target=knative not working with Quarkus 1.9 #195

iocanel opened this issue Oct 26, 2020 · 0 comments
Assignees
Labels
7 - Community development upstream/closed The issue has been closed in the upstream repository

Comments

@iocanel
Copy link

iocanel commented Oct 26, 2020

quarkus.kubernetes.deployment-target=knative not working with Quarkus 1.9, works fine with Quarkus 1.8.2.Final / 1.7.5.Final. Running on OpenShift 4.5 with OpenShift Serverless.

The main message I see in log of the final pod is ERROR Neither $JAVA_MAIN_CLASS nor $JAVA_APP_JAR is set and 0 JARs found in /deployments (1 expected)

The problem I see is that with knative /deployments is still looked at while the path should be /deployments/target

When I switch to quarkus.kubernetes.deployment-target=openshift application starts properly from /deployments/target

reproducer:

oc new-project rsvoboda

rm -rf getting-started
mvn io.quarkus:quarkus-maven-plugin:1.9.0.Final:create \
    -DprojectGroupId=org.acme \
    -DprojectArtifactId=getting-started \
    -DclassName="org.acme.getting.started.GreetingResource" \
    -Dpath="/hello" \
    -Dextensions="openshift, smallrye-health"
cd getting-started

cat > src/main/resources/application.properties <<EOF
quarkus.s2i.base-jvm-image=registry.access.redhat.com/openjdk/openjdk-11-rhel7
quarkus.container-image.registry=image-registry.openshift-image-registry.svc:5000
quarkus.container-image.group=rsvoboda
quarkus.kubernetes.deployment-target=knative
quarkus.kubernetes-client.trust-certs=true
EOF

mvn clean package -Dquarkus.kubernetes.deploy=true -Dquarkus-plugin.version=1.8.2.Final -Dquarkus.platform.version=1.8.2.Final

==> application gets available, e.g. http://getting-started-rsvoboda.apps.ocp45.dynamic.quarkus/hello in my case

mvn clean package -Dquarkus.kubernetes.deploy=true

==> application is not available, CrashLoop Error in console

Error from pod:

Starting the Java application using /opt/jboss/container/java/run/run-java.sh ...
�[0;31mERROR Neither $JAVA_MAIN_CLASS nor $JAVA_APP_JAR is set and 0 JARs found in /deployments (1 expected)�[0m
INFO exec  java -javaagent:/opt/jboss/container/jolokia/jolokia.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 execute a class)
  ...

Tried to set quarkus.s2i.jar-directory and quarkus.openshift.jar-directory but it didn't help in my experiments.


quarkusio#12894


$upstream:12894$

@iocanel iocanel self-assigned this Oct 26, 2020
@iocanel iocanel added the upstream/closed The issue has been closed in the upstream repository label Nov 3, 2020
@iocanel iocanel closed this as completed Nov 9, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
7 - Community development upstream/closed The issue has been closed in the upstream repository
Projects
None yet
Development

No branches or pull requests

1 participant