quarkusio / quarkus

Quarkus: Supersonic Subatomic Java.
https://quarkus.io
Apache License 2.0
13.35k stars 2.56k forks source link

Fast-Jar doesn't work for OpenShift S2I deployment #38439

Open danieloh30 opened 5 months ago

danieloh30 commented 5 months ago

Describe the bug

When the Quarkus app uses the openshift extension for the openshift deployment, the fast-jar (default package format) fails to build the app with the following error:

Receiving source from STDIN as archive ... error: unable to extract binary build input, must be a zip, tar, or gzipped tar, or specified as a file: exit status 1

This happens in only 3.6.8. As a workaround, the legacy-jar format works

Expected behavior

Build success

image

Actual behavior

Build failure

image

How to Reproduce?

  1. Add quarkus-openshift extension to any app
  2. Add the following properties. quarkus.kubernetes.deploy=true quarkus.kubernetes.deployment-target=openshift quarkus.openshift.route.expose=true quarkus.kubernetes-client.trust-certs=true
  3. quarkus build --no-tests

Make sure to log in to the OpenShift cluster

Output of uname -a or ver

Darwin doh-mac 23.2.0 Darwin Kernel Version 23.2.0

Output of java -version

openjdk version "21.0.1" 2023-10-17 LTS

Quarkus version or git rev

3.6.8

Build tool (ie. output of mvnw --version or gradlew --version)

Apache Maven 3.9.6

Additional information

No response

quarkus-bot[bot] commented 5 months ago

/cc @geoand (kubernetes,openshift), @iocanel (kubernetes,openshift)

danieloh30 commented 5 months ago

Found this build logs more.

[ERROR] javax.net.ssl.SSLException: Received fatal alert: bad_record_mac
[ERROR] Failed to upload archive file for the build: kube-native-java
[ERROR] Please check cluster events via `oc get events` to see what could have possibly gone wrong
[WARNING] [io.quarkus.container.image.openshift.deployment.OpenshiftProcessor] An exception: 'Can't instantiate binary build, due to error reading/writing stream. Can be caused if the output stream was closed by the server.See if something's wrong in recent events in Cluster = BuildFailed kube-native-java-10.17ae65287b2f1e25 Build quarkus-kube-native-java/kube-native-java-10 failed
Scheduled kube-native-java-10-build.17ae652746c730d8 Successfully assigned quarkus-kube-native-java/kube-native-java-10-build to worker-cluster-gjzsh-1
AddedInterface kube-native-java-10-build.17ae65275da7dadb Add eth0 [10.134.0.83/23] from ovn-kubernetes
Pulled kube-native-java-10-build.17ae65275f575ca9 Container image "quay.io/openshift-release-dev/ocp-v4.0-art-dev@sha256:7207a02d23e70b9b07f01446e5cf2916b807e43b2169e35c33c668302e0842f9" already present on machine
Created kube-native-java-10-build.17ae652766f72bd2 Created container git-clone
Started kube-native-java-10-build.17ae652767ea8350 Started container git-clone
BuildStarted kube-native-java-10.17ae652773b5c173 Build quarkus-kube-native-java/kube-native-java-10 is now running
BuildFailed kube-native-java-9.17ae650ad0d25bef Build quarkus-kube-native-java/kube-native-java-9 failed
BuildStarted kube-native-java-9.17ae6509c930a7cc Build quarkus-kube-native-java/kube-native-java-9 is now running
Scheduled kube-native-java-9-build.17ae6509872c32ed Successfully assigned quarkus-kube-native-java/kube-native-java-9-build to worker-cluster-gjzsh-1
 ' occurred while instantiating the build, however the build has been started.
danieloh30 commented 5 months ago

If I use the docker build strategy (quarkus.openshift.build-strategy=docker), the build & deployment work. However, if I set "quarkus.package.type=mutable-jar" for the remote dev mode, I hit the same build failure again.

geoand commented 5 months ago

Does the same problem occur if you use 3.7.0?

iocanel commented 5 months ago

I'll try to make time and have a look

danieloh30 commented 5 months ago

Just confirmed that this issue still happens in 3.7.1

danieloh30 commented 4 months ago

I still have the same issue in 3.7.3 regardless of the docker build strategy.

quarkus.kubernetes.deploy=true quarkus.kubernetes.deployment-target=openshift quarkus.kubernetes-client.trust-certs=true

[INFO] [io.quarkus.container.image.openshift.deployment.OpenshiftProcessor] Applied: BuildConfig quarkus-eda-demo [ERROR] javax.net.ssl.SSLException: Received fatal alert: bad_record_mac [ERROR] Failed to upload archive file for the build: quarkus-eda-demo [ERROR] Please check cluster events via oc get events to see what could have possibly gone wrong [WARNING] [io.quarkus.container.image.openshift.deployment.OpenshiftProcessor] An exception: 'Can't instantiate binary build, due to error reading/writing stream. Can be caused if the output stream was closed by the server.See if something's wrong in recent events in Cluster = Scheduled my-cluster-entity-operator-868956ccf5-5ct9j.17b56c25ce7dfe65 Successfully assigned kafka-hpa/my-cluster-entity-operator-868956ccf5-5ct9j to worker-cluster-ssl9t-3

@iocanel