Quarkus OpenShift Deployment On Local Machine

Viewed 322

I have a Quarkus application that I am trying to deploy to OpenShift on my local. The CodeReady Containers VM for OpenShift is already running.
I am new to this type of setup and still learning. After much research and trying out a lot of suggestions, I have hit a wall.

I am running this command

./mvnw clean package -Dquarkus.kubernetes.deploy=true

The application builds, and when it gets to the step about Applied: BuildConfig, I get the following error:

[INFO] [io.quarkus.container.image.s2i.deployment.S2iProcessor] Performing s2i binary build with jar on server: https://api.crc.testing:6443/ in namespace:audit-ms.
[INFO] [io.quarkus.container.image.s2i.deployment.S2iProcessor] Applied: ImageStream audit
[INFO] [io.quarkus.container.image.s2i.deployment.S2iProcessor] Found: ImageStream openjdk-11-rhel7 repository: registry.access.redhat.com/openjdk/openjdk-11-rhel7
[INFO] [io.quarkus.container.image.s2i.deployment.S2iProcessor] Applied: BuildConfig audit
[INFO] ------------------------------------------------------------------------
[INFO] BUILD FAILURE
[INFO] ------------------------------------------------------------------------
[INFO] Total time:  02:30 min
[INFO] Finished at: 2020-09-12T14:51:09+02:00
[INFO] ------------------------------------------------------------------------
[ERROR] Failed to execute goal io.quarkus:quarkus-maven-plugin:1.7.3.Final:build (default) on project audit: Failed to build quarkus application: io.quarkus.builder.BuildException: Build failure: Build failed due to errors
[ERROR]     [error]: Build step io.quarkus.container.image.s2i.deployment.S2iProcessor#s2iBuildFromJar threw an exception: java.lang.RuntimeException: Execution of s2i build failed. See s2i output for more details
[ERROR]     at io.quarkus.container.image.s2i.deployment.S2iProcessor.s2iException(S2iProcessor.java:383)
[ERROR]     at io.quarkus.container.image.s2i.deployment.S2iProcessor.s2iBuild(S2iProcessor.java:327)
[ERROR]     at io.quarkus.container.image.s2i.deployment.S2iProcessor.lambda$s2iBuild$10(S2iProcessor.java:301)
[ERROR]     at java.base/java.util.stream.ForEachOps$ForEachOp$OfRef.accept(ForEachOps.java:183)
[ERROR]     at java.base/java.util.stream.ReferencePipeline$3$1.accept(ReferencePipeline.java:195)
[ERROR]     at java.base/java.util.stream.ReferencePipeline$2$1.accept(ReferencePipeline.java:177)
[ERROR]     at java.base/java.util.ArrayList$ArrayListSpliterator.forEachRemaining(ArrayList.java:1625)
[ERROR]     at java.base/java.util.stream.AbstractPipeline.copyInto(AbstractPipeline.java:484)
[ERROR]     at java.base/java.util.stream.AbstractPipeline.wrapAndCopyInto(AbstractPipeline.java:474)
[ERROR]     at java.base/java.util.stream.ForEachOps$ForEachOp.evaluateSequential(ForEachOps.java:150)
[ERROR]     at java.base/java.util.stream.ForEachOps$ForEachOp$OfRef.evaluateSequential(ForEachOps.java:173)
[ERROR]     at java.base/java.util.stream.AbstractPipeline.evaluate(AbstractPipeline.java:234)
[ERROR]     at java.base/java.util.stream.ReferencePipeline.forEach(ReferencePipeline.java:497)
[ERROR]     at io.quarkus.container.image.s2i.deployment.S2iProcessor.s2iBuild(S2iProcessor.java:301)
[ERROR]     at io.quarkus.container.image.s2i.deployment.S2iProcessor.createContainerImage(S2iProcessor.java:252)
[ERROR]     at io.quarkus.container.image.s2i.deployment.S2iProcessor.s2iBuildFromJar(S2iProcessor.java:183)
[ERROR]     at java.base/jdk.internal.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
[ERROR]     at java.base/jdk.internal.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62)
[ERROR]     at java.base/jdk.internal.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
[ERROR]     at java.base/java.lang.reflect.Method.invoke(Method.java:564)
[ERROR]     at io.quarkus.deployment.ExtensionLoader$2.execute(ExtensionLoader.java:932)
[ERROR]     at io.quarkus.builder.BuildContext.run(BuildContext.java:277)
[ERROR]     at org.jboss.threads.ContextClassLoaderSavingRunnable.run(ContextClassLoaderSavingRunnable.java:35)
[ERROR]     at org.jboss.threads.EnhancedQueueExecutor.safeRun(EnhancedQueueExecutor.java:2046)
[ERROR]     at org.jboss.threads.EnhancedQueueExecutor$ThreadBody.doRunTask(EnhancedQueueExecutor.java:1578)
[ERROR]     at org.jboss.threads.EnhancedQueueExecutor$ThreadBody.run(EnhancedQueueExecutor.java:1452)
[ERROR]     at java.base/java.lang.Thread.run(Thread.java:832)
[ERROR]     at org.jboss.threads.JBossThread.run(JBossThread.java:479)
[ERROR] Caused by: io.dekorate.deps.kubernetes.client.KubernetesClientException: Can't instantiate binary build, due to error reading/writing stream. Can be caused if the output stream was closed by the server.
[ERROR]     at io.dekorate.deps.kubernetes.client.KubernetesClientException.launderThrowable(KubernetesClientException.java:64)
[ERROR]     at io.dekorate.deps.openshift.client.dsl.internal.BuildConfigOperationsImpl$1.writeTo(BuildConfigOperationsImpl.java:237)
[ERROR]     at io.dekorate.deps.okhttp3.internal.http.CallServerInterceptor.intercept(CallServerInterceptor.java:72)
[ERROR]     at io.dekorate.deps.okhttp3.internal.http.RealInterceptorChain.proceed(RealInterceptorChain.java:147)
[ERROR]     at io.dekorate.deps.okhttp3.internal.connection.ConnectInterceptor.intercept(ConnectInterceptor.java:45)
[ERROR]     at io.dekorate.deps.okhttp3.internal.http.RealInterceptorChain.proceed(RealInterceptorChain.java:147)
[ERROR]     at io.dekorate.deps.okhttp3.internal.http.RealInterceptorChain.proceed(RealInterceptorChain.java:121)
[ERROR]     at io.dekorate.deps.okhttp3.internal.cache.CacheInterceptor.intercept(CacheInterceptor.java:93)
[ERROR]     at io.dekorate.deps.okhttp3.internal.http.RealInterceptorChain.proceed(RealInterceptorChain.java:147)
[ERROR]     at io.dekorate.deps.okhttp3.internal.http.RealInterceptorChain.proceed(RealInterceptorChain.java:121)
[ERROR]     at io.dekorate.deps.okhttp3.internal.http.BridgeInterceptor.intercept(BridgeInterceptor.java:93)
[ERROR]     at io.dekorate.deps.okhttp3.internal.http.RealInterceptorChain.proceed(RealInterceptorChain.java:147)
[ERROR]     at io.dekorate.deps.okhttp3.internal.http.RetryAndFollowUpInterceptor.intercept(RetryAndFollowUpInterceptor.java:127)
[ERROR]     at io.dekorate.deps.okhttp3.internal.http.RealInterceptorChain.proceed(RealInterceptorChain.java:147)
[ERROR]     at io.dekorate.deps.okhttp3.internal.http.RealInterceptorChain.proceed(RealInterceptorChain.java:121)
[ERROR]     at io.dekorate.deps.kubernetes.client.utils.BackwardsCompatibilityInterceptor.intercept(BackwardsCompatibilityInterceptor.java:134)
[ERROR]     at io.dekorate.deps.okhttp3.internal.http.RealInterceptorChain.proceed(RealInterceptorChain.java:147)
[ERROR]     at io.dekorate.deps.okhttp3.internal.http.RealInterceptorChain.proceed(RealInterceptorChain.java:121)
[ERROR]     at io.dekorate.deps.kubernetes.client.utils.ImpersonatorInterceptor.intercept(ImpersonatorInterceptor.java:68)
[ERROR]     at io.dekorate.deps.okhttp3.internal.http.RealInterceptorChain.proceed(RealInterceptorChain.java:147)
[ERROR]     at io.dekorate.deps.okhttp3.internal.http.RealInterceptorChain.proceed(RealInterceptorChain.java:121)
[ERROR]     at io.dekorate.deps.openshift.client.internal.OpenShiftOAuthInterceptor.intercept(OpenShiftOAuthInterceptor.java:69)
[ERROR]     at io.dekorate.deps.okhttp3.internal.http.RealInterceptorChain.proceed(RealInterceptorChain.java:147)
[ERROR]     at io.dekorate.deps.okhttp3.internal.http.RealInterceptorChain.proceed(RealInterceptorChain.java:121)
[ERROR]     at io.dekorate.deps.okhttp3.RealCall.getResponseWithInterceptorChain(RealCall.java:257)
[ERROR]     at io.dekorate.deps.okhttp3.RealCall.execute(RealCall.java:93)
[ERROR]     at io.dekorate.deps.kubernetes.client.dsl.base.OperationSupport.handleResponse(OperationSupport.java:469)
[ERROR]     at io.dekorate.deps.kubernetes.client.dsl.base.OperationSupport.handleResponse(OperationSupport.java:448)
[ERROR]     at io.dekorate.deps.openshift.client.dsl.internal.BuildConfigOperationsImpl.fromInputStream(BuildConfigOperationsImpl.java:251)
[ERROR]     at io.dekorate.deps.openshift.client.dsl.internal.BuildConfigOperationsImpl.fromFile(BuildConfigOperationsImpl.java:208)
[ERROR]     at io.dekorate.deps.openshift.client.dsl.internal.BuildConfigOperationsImpl.fromFile(BuildConfigOperationsImpl.java:65)
[ERROR]     at io.quarkus.container.image.s2i.deployment.S2iProcessor.s2iBuild(S2iProcessor.java:319)
[ERROR]     ... 26 more
[ERROR] Caused by: java.net.SocketException: Broken pipe
[ERROR]     at java.base/sun.nio.ch.NioSocketImpl.implWrite(NioSocketImpl.java:420)
[ERROR]     at java.base/sun.nio.ch.NioSocketImpl.write(NioSocketImpl.java:440)
[ERROR]     at java.base/sun.nio.ch.NioSocketImpl$2.write(NioSocketImpl.java:826)
[ERROR]     at java.base/java.net.Socket$SocketOutputStream.write(Socket.java:1052)
[ERROR]     at java.base/sun.security.ssl.SSLSocketOutputRecord.deliver(SSLSocketOutputRecord.java:342)
[ERROR]     at java.base/sun.security.ssl.SSLSocketImpl$AppOutputStream.write(SSLSocketImpl.java:1264)
[ERROR]     at io.dekorate.deps.okio.Okio$1.write(Okio.java:79)
[ERROR]     at io.dekorate.deps.okio.AsyncTimeout$1.write(AsyncTimeout.java:180)
[ERROR]     at io.dekorate.deps.okio.RealBufferedSink.emitCompleteSegments(RealBufferedSink.java:179)
[ERROR]     at io.dekorate.deps.okio.RealBufferedSink.write(RealBufferedSink.java:42)
[ERROR]     at io.dekorate.deps.okhttp3.internal.http1.Http1Codec$FixedLengthSink.write(Http1Codec.java:295)
[ERROR]     at io.dekorate.deps.okio.ForwardingSink.write(ForwardingSink.java:35)
[ERROR]     at io.dekorate.deps.okhttp3.internal.http.CallServerInterceptor$CountingSink.write(CallServerInterceptor.java:149)
[ERROR]     at io.dekorate.deps.okio.RealBufferedSink.emitCompleteSegments(RealBufferedSink.java:179)
[ERROR]     at io.dekorate.deps.okio.RealBufferedSink.writeAll(RealBufferedSink.java:107)
[ERROR]     at io.dekorate.deps.openshift.client.dsl.internal.BuildConfigOperationsImpl$1.writeTo(BuildConfigOperationsImpl.java:235)
[ERROR]     ... 56 more

Please assist in what could be the error on deploying this application. I am probably missing a configuration.

My application.properties file looks like this:

quarkus.log.level= DEBUG
quarkus.mongodb.connection-string=mongodb://localhost:27017/audit
quarkus.mongodb.database=audit
quarkus.kubernetes-client.trust-certs=true
quarkus.s2i.base-jvm-image=registry.access.redhat.com/openjdk/openjdk-11-rhel7
quarkus.openshift.expose=true
0 Answers
Related