quarkusio / quarkus

Quarkus: Supersonic Subatomic Java.

Home Page:https://quarkus.io

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Random behavior for QuarkusRestClientBuilder vs Native (Java interface) REST client

fredericBregier opened this issue · comments

Describe the bug

We faced up an issue without understanding the reasons behind.
We used the QuarkusRestClientBuilder to create REST client in order to be able to control Java final API and some functionalities (control the result and behavior...).

We've done QuarkusTest and everything is OK (using client, whatever native (Java interface) or QuarkusRestClientBuilder), but when we deployed, we've got errors.

One of the error we were able to reproduce is:

  • Running in QuarkusTest is OK for all
  • Launching server (java -jar target/quarkus-app/quarkus-run.jar in server module), then launching test using client from a third party (QuarkusTest in client-test module) is OK for all
  • Launching server (java -jar target/quarkus-app/quarkus-run.jar in server module), then launching client main method from a third party (client-test module) is randomly KO for QuarkusRestClientBuilder but OK (sadly most of the times) for native (Java interface client)

As our client was able to "close" the underlying client, we provided 2 clients implementations, one with effective closing, the other one with no close at all. The behaviors are the same.

We cannot find the reason of these random behaviors.

Note also, that we tried 2 ways to POST InputStream, since we've got issues on client side to send InputStream but working fine with byte array (the server being the same, only client is changing), but as we were not yet able to create a reproducer, we decided to at least provide this issue.

Of course, we might have wrongly setup some things or write bad codes, but as long as we understand, this should be ok. So feel free to correct us if we made something wrong.

Expected behavior

The QuarkusRestClientBuilder shall not be different in behavior than Native Java client (Java interface).

Actual behavior

Random error such as:

     2024-06-07 11:14:18,083 ERROR [org.exa.Main] (main) ERROR: org.jboss.resteasy.reactive.ClientWebApplicationException: Received: 'Not Found, status code 404' when invoking: Rest Client method: 'org.example.client.ApiClient#inputStream'
        at org.jboss.resteasy.reactive.client.impl.RestClientRequestContext.unwrapException(RestClientRequestContext.java:195)
        at org.jboss.resteasy.reactive.common.core.AbstractResteasyReactiveContext.handleException(AbstractResteasyReactiveContext.java:329)
        at org.jboss.resteasy.reactive.common.core.AbstractResteasyReactiveContext.run(AbstractResteasyReactiveContext.java:175)
        at io.smallrye.context.impl.wrappers.SlowContextualRunnable.run(SlowContextualRunnable.java:19)
        at org.jboss.resteasy.reactive.client.handlers.ClientSwitchToRequestContextRestHandler$1$1.handle(ClientSwitchToRequestContextRestHandler.java:38)
        at org.jboss.resteasy.reactive.client.handlers.ClientSwitchToRequestContextRestHandler$1$1.handle(ClientSwitchToRequestContextRestHandler.java:35)
        at io.vertx.core.impl.ContextInternal.dispatch(ContextInternal.java:279)
        at io.vertx.core.impl.ContextInternal.dispatch(ContextInternal.java:261)
        at io.vertx.core.impl.ContextInternal.lambda$runOnContext$0(ContextInternal.java:59)
        at io.netty.util.concurrent.AbstractEventExecutor.runTask(AbstractEventExecutor.java:173)
        at io.netty.util.concurrent.AbstractEventExecutor.safeExecute(AbstractEventExecutor.java:166)
        at io.netty.util.concurrent.SingleThreadEventExecutor.runAllTasks(SingleThreadEventExecutor.java:470)
        at io.netty.channel.epoll.EpollEventLoop.run(EpollEventLoop.java:413)
        at io.netty.util.concurrent.SingleThreadEventExecutor$4.run(SingleThreadEventExecutor.java:997)
        at io.netty.util.internal.ThreadExecutorMap$2.run(ThreadExecutorMap.java:74)
        at io.netty.util.concurrent.FastThreadLocalRunnable.run(FastThreadLocalRunnable.java:30)
        at java.base/java.lang.Thread.run(Thread.java:1583)
     Caused by: jakarta.ws.rs.WebApplicationException: Not Found, status code 404
        at io.quarkus.rest.client.reactive.runtime.DefaultMicroprofileRestClientExceptionMapper.toThrowable(DefaultMicroprofileRestClientExceptionMapper.java:19)
        at io.quarkus.rest.client.reactive.runtime.MicroProfileRestClientResponseFilter.filter(MicroProfileRestClientResponseFilter.java:52)
        at org.jboss.resteasy.reactive.client.handlers.ClientResponseFilterRestHandler.handle(ClientResponseFilterRestHandler.java:21)
        at org.jboss.resteasy.reactive.client.handlers.ClientResponseFilterRestHandler.handle(ClientResponseFilterRestHandler.java:10)
        at org.jboss.resteasy.reactive.common.core.AbstractResteasyReactiveContext.invokeHandler(AbstractResteasyReactiveContext.java:231)
        at org.jboss.resteasy.reactive.common.core.AbstractResteasyReactiveContext.run(AbstractResteasyReactiveContext.java:147)
        ... 14 more

How to Reproduce?

The reproducer is here: https://github.com/fredericBregier/quarkus-build-native-client-test/tree/main

  • Using ./mvnw clean package
    • All tests are OK, whatever clients
  • Launching the server using java -jar server/target/quarkus-app/quarkus-run.jar
    • Launching manually tests on client-test with 2 changes:
      • Removing dependency for server
      • Setting port to 8080 in application.yml in src/test/resources
      • All tests are OK, whatever clients
    • Launching client Main with different scenarios
      • java -jar client-test/target/quarkus-app/quarkus-run.jar ARG with ARG being
        • APIGET, APIPOST, APISTREAM : for native client using java interface
        • GET, POST, STREAM : for Quarkus bulld client and closing client
        • NOCLOSEGET, NOCLOSEPOST, NOCLOSESTREAM : for Quarkus bulld client and not closing client (leaving default implementation handling closing client)
      • Java Interface is relatively stable: but sometimes failed
      • Quarkus build client, whatever closing or not closing, failed randomly with the following error
     2024-06-07 11:14:18,083 ERROR [org.exa.Main] (main) ERROR: org.jboss.resteasy.reactive.ClientWebApplicationException: Received: 'Not Found, status code 404' when invoking: Rest Client method: 'org.example.client.ApiClient#inputStream'
        at org.jboss.resteasy.reactive.client.impl.RestClientRequestContext.unwrapException(RestClientRequestContext.java:195)
        at org.jboss.resteasy.reactive.common.core.AbstractResteasyReactiveContext.handleException(AbstractResteasyReactiveContext.java:329)
        at org.jboss.resteasy.reactive.common.core.AbstractResteasyReactiveContext.run(AbstractResteasyReactiveContext.java:175)
        at io.smallrye.context.impl.wrappers.SlowContextualRunnable.run(SlowContextualRunnable.java:19)
        at org.jboss.resteasy.reactive.client.handlers.ClientSwitchToRequestContextRestHandler$1$1.handle(ClientSwitchToRequestContextRestHandler.java:38)
        at org.jboss.resteasy.reactive.client.handlers.ClientSwitchToRequestContextRestHandler$1$1.handle(ClientSwitchToRequestContextRestHandler.java:35)
        at io.vertx.core.impl.ContextInternal.dispatch(ContextInternal.java:279)
        at io.vertx.core.impl.ContextInternal.dispatch(ContextInternal.java:261)
        at io.vertx.core.impl.ContextInternal.lambda$runOnContext$0(ContextInternal.java:59)
        at io.netty.util.concurrent.AbstractEventExecutor.runTask(AbstractEventExecutor.java:173)
        at io.netty.util.concurrent.AbstractEventExecutor.safeExecute(AbstractEventExecutor.java:166)
        at io.netty.util.concurrent.SingleThreadEventExecutor.runAllTasks(SingleThreadEventExecutor.java:470)
        at io.netty.channel.epoll.EpollEventLoop.run(EpollEventLoop.java:413)
        at io.netty.util.concurrent.SingleThreadEventExecutor$4.run(SingleThreadEventExecutor.java:997)
        at io.netty.util.internal.ThreadExecutorMap$2.run(ThreadExecutorMap.java:74)
        at io.netty.util.concurrent.FastThreadLocalRunnable.run(FastThreadLocalRunnable.java:30)
        at java.base/java.lang.Thread.run(Thread.java:1583)
     Caused by: jakarta.ws.rs.WebApplicationException: Not Found, status code 404
        at io.quarkus.rest.client.reactive.runtime.DefaultMicroprofileRestClientExceptionMapper.toThrowable(DefaultMicroprofileRestClientExceptionMapper.java:19)
        at io.quarkus.rest.client.reactive.runtime.MicroProfileRestClientResponseFilter.filter(MicroProfileRestClientResponseFilter.java:52)
        at org.jboss.resteasy.reactive.client.handlers.ClientResponseFilterRestHandler.handle(ClientResponseFilterRestHandler.java:21)
        at org.jboss.resteasy.reactive.client.handlers.ClientResponseFilterRestHandler.handle(ClientResponseFilterRestHandler.java:10)
        at org.jboss.resteasy.reactive.common.core.AbstractResteasyReactiveContext.invokeHandler(AbstractResteasyReactiveContext.java:231)
        at org.jboss.resteasy.reactive.common.core.AbstractResteasyReactiveContext.run(AbstractResteasyReactiveContext.java:147)
        ... 14 more

Output of uname -a or ver

Linux frederic-Creator-M16-B13VE 6.8.0-35-generic #35-Ubuntu SMP PREEMPT_DYNAMIC Mon May 20 15:51:52 UTC 2024 x86_64 x86_64 x86_64 GNU/Linux

Output of java -version

openjdk version "21.0.3" 2024-04-16 OpenJDK Runtime Environment (build 21.0.3+9-Ubuntu-1ubuntu1) OpenJDK 64-Bit Server VM (build 21.0.3+9-Ubuntu-1ubuntu1, mixed mode, sharing)

Quarkus version or git rev

3.11.0

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

Apache Maven 3.9.6 (bc0240f3c744dd6b6ec2920b3cd08dcc295161ae) Maven home: /home/frederic/.m2/wrapper/dists/apache-maven-3.9.6-bin/3311e1d4/apache-maven-3.9.6 Java version: 21.0.3, vendor: Ubuntu, runtime: /usr/lib/jvm/java-21-openjdk-amd64 Default locale: fr_FR, platform encoding: UTF-8 OS name: "linux", version: "6.8.0-35-generic", arch: "amd64", family: "unix"

Additional information

Example of random:

  • Execution almost OK but finally failed:
__  ____  __  _____   ___  __ ____  ______ 
 --/ __ \/ / / / _ | / _ \/ //_/ / / / __/ 
 -/ /_/ / /_/ / __ |/ , _/ ,< / /_/ /\ \   
--\___\_\____/_/ |_/_/|_/_/|_|\____/___/   
2024-06-07 12:49:21,163 INFO  [io.quarkus] (main) client-test 1.0-SNAPSHOT on JVM (powered by Quarkus 3.11.0) started in 1.100s. Listening on: http://0.0.0.0:8080
2024-06-07 12:49:21,178 INFO  [io.quarkus] (main) Profile prod activated. 
2024-06-07 12:49:21,178 INFO  [io.quarkus] (main) Installed features: [cdi, config-yaml, rest, rest-client, rest-client-jackson, rest-jackson, smallrye-context-propagation, vertx]
2024-06-07 12:49:21,263 INFO  [org.exa.Main] (main) Using HTTP Server at: http://localhost:8080
2024-06-07 12:49:21,277 INFO  [org.exa.cli.ClientFactory] (main) URI: http://localhost:8080
2024-06-07 12:49:21,279 INFO  [org.exa.cli.Client] (main) Send InputStream test
2024-06-07 12:49:21,998 INFO  [org.exa.Main] (main) Result INPUTSTREAM Client: UploadResponse[name=test, size=120000]
2024-06-07 12:49:22,007 INFO  [org.exa.cli.Client] (main) Send InputStream test
2024-06-07 12:49:22,038 INFO  [org.exa.Main] (main) Result INPUTSTREAM Client: UploadResponse[name=test, size=120000]
2024-06-07 12:49:22,039 INFO  [org.exa.cli.Client] (main) Send InputStream test
2024-06-07 12:49:22,070 INFO  [org.exa.Main] (main) Result INPUTSTREAM Client: UploadResponse[name=test, size=120000]
2024-06-07 12:49:22,071 INFO  [org.exa.cli.Client] (main) Send InputStream test
2024-06-07 12:49:22,094 INFO  [org.exa.Main] (main) Result INPUTSTREAM Client: UploadResponse[name=test, size=120000]
2024-06-07 12:49:22,094 INFO  [org.exa.cli.Client] (main) Send InputStream test
2024-06-07 12:49:22,116 INFO  [org.exa.Main] (main) Result INPUTSTREAM Client: UploadResponse[name=test, size=120000]
2024-06-07 12:49:22,117 INFO  [org.exa.cli.Client] (main) Send InputStream test
2024-06-07 12:49:22,158 INFO  [org.exa.Main] (main) Result INPUTSTREAM Client: UploadResponse[name=test, size=120000]
2024-06-07 12:49:22,159 INFO  [org.exa.cli.Client] (main) Send InputStream test
2024-06-07 12:49:22,244 INFO  [org.exa.Main] (main) Result INPUTSTREAM Client: UploadResponse[name=test, size=120000]
2024-06-07 12:49:22,245 INFO  [org.exa.cli.Client] (main) Send InputStream test
2024-06-07 12:49:22,309 INFO  [org.exa.Main] (main) Result INPUTSTREAM Client: UploadResponse[name=test, size=120000]
2024-06-07 12:49:22,310 INFO  [org.exa.cli.Client] (main) Send InputStream test
2024-06-07 12:49:22,369 INFO  [org.exa.Main] (main) Result INPUTSTREAM Client: UploadResponse[name=test, size=120000]
2024-06-07 12:49:22,371 INFO  [org.exa.cli.Client] (main) Send InputStream test
2024-06-07 12:49:22,427 INFO  [org.exa.Main] (main) Result INPUTSTREAM Client: UploadResponse[name=test, size=120000]
2024-06-07 12:49:22,429 INFO  [org.exa.cli.Client] (main) PSEUDO CLOSING
2024-06-07 12:49:22,429 INFO  [org.exa.cli.ClientFactory] (main) URI: http://localhost:8080
2024-06-07 12:49:22,433 INFO  [org.exa.cli.Client] (main) Send InputStream test
2024-06-07 12:49:22,497 INFO  [org.exa.Main] (main) Result INPUTSTREAM CLOSED Client: UploadResponse[name=test, size=120000]
2024-06-07 12:49:22,499 INFO  [org.exa.cli.Client] (main) PSEUDO CLOSING
2024-06-07 12:49:22,499 INFO  [org.exa.cli.ClientFactory] (main) URI: http://localhost:8080
2024-06-07 12:49:22,503 INFO  [org.exa.cli.Client] (main) Send InputStream test
2024-06-07 12:49:22,558 INFO  [org.exa.Main] (main) Result INPUTSTREAM CLOSED Client: UploadResponse[name=test, size=120000]
2024-06-07 12:49:22,558 INFO  [org.exa.cli.Client] (main) PSEUDO CLOSING
2024-06-07 12:49:22,559 INFO  [org.exa.cli.ClientFactory] (main) URI: http://localhost:8080
2024-06-07 12:49:22,561 INFO  [org.exa.cli.Client] (main) Send InputStream test
2024-06-07 12:49:22,644 INFO  [org.exa.cli.Client] (main) PSEUDO CLOSING
2024-06-07 12:49:22,646 ERROR [org.exa.Main] (main) ERROR: org.jboss.resteasy.reactive.ClientWebApplicationException: Received: 'Not Found, status code 404' when invoking: Rest Client method: 'org.example.clientnoclose.ApiClient#inputStream'
	at org.jboss.resteasy.reactive.client.impl.RestClientRequestContext.unwrapException(RestClientRequestContext.java:195)
	at org.jboss.resteasy.reactive.common.core.AbstractResteasyReactiveContext.handleException(AbstractResteasyReactiveContext.java:329)
	at org.jboss.resteasy.reactive.common.core.AbstractResteasyReactiveContext.run(AbstractResteasyReactiveContext.java:175)
	at io.smallrye.context.impl.wrappers.SlowContextualRunnable.run(SlowContextualRunnable.java:19)
	at org.jboss.resteasy.reactive.client.handlers.ClientSwitchToRequestContextRestHandler$1$1.handle(ClientSwitchToRequestContextRestHandler.java:38)
	at org.jboss.resteasy.reactive.client.handlers.ClientSwitchToRequestContextRestHandler$1$1.handle(ClientSwitchToRequestContextRestHandler.java:35)
	at io.vertx.core.impl.ContextInternal.dispatch(ContextInternal.java:279)
	at io.vertx.core.impl.ContextInternal.dispatch(ContextInternal.java:261)
	at io.vertx.core.impl.ContextInternal.lambda$runOnContext$0(ContextInternal.java:59)
	at io.netty.util.concurrent.AbstractEventExecutor.runTask(AbstractEventExecutor.java:173)
	at io.netty.util.concurrent.AbstractEventExecutor.safeExecute(AbstractEventExecutor.java:166)
	at io.netty.util.concurrent.SingleThreadEventExecutor.runAllTasks(SingleThreadEventExecutor.java:470)
	at io.netty.channel.epoll.EpollEventLoop.run(EpollEventLoop.java:413)
	at io.netty.util.concurrent.SingleThreadEventExecutor$4.run(SingleThreadEventExecutor.java:997)
	at io.netty.util.internal.ThreadExecutorMap$2.run(ThreadExecutorMap.java:74)
	at io.netty.util.concurrent.FastThreadLocalRunnable.run(FastThreadLocalRunnable.java:30)
	at java.base/java.lang.Thread.run(Thread.java:1583)
Caused by: jakarta.ws.rs.WebApplicationException: Not Found, status code 404
	at io.quarkus.rest.client.reactive.runtime.DefaultMicroprofileRestClientExceptionMapper.toThrowable(DefaultMicroprofileRestClientExceptionMapper.java:19)
	at io.quarkus.rest.client.reactive.runtime.MicroProfileRestClientResponseFilter.filter(MicroProfileRestClientResponseFilter.java:52)
	at org.jboss.resteasy.reactive.client.handlers.ClientResponseFilterRestHandler.handle(ClientResponseFilterRestHandler.java:21)
	at org.jboss.resteasy.reactive.client.handlers.ClientResponseFilterRestHandler.handle(ClientResponseFilterRestHandler.java:10)
	at org.jboss.resteasy.reactive.common.core.AbstractResteasyReactiveContext.invokeHandler(AbstractResteasyReactiveContext.java:231)
	at org.jboss.resteasy.reactive.common.core.AbstractResteasyReactiveContext.run(AbstractResteasyReactiveContext.java:147)
	... 14 more

  • Execution failed early:
__  ____  __  _____   ___  __ ____  ______ 
 --/ __ \/ / / / _ | / _ \/ //_/ / / / __/ 
 -/ /_/ / /_/ / __ |/ , _/ ,< / /_/ /\ \   
--\___\_\____/_/ |_/_/|_/_/|_|\____/___/   
2024-06-07 12:52:51,663 INFO  [io.quarkus] (main) client-test 1.0-SNAPSHOT on JVM (powered by Quarkus 3.11.0) started in 0.914s. Listening on: http://0.0.0.0:8080
2024-06-07 12:52:51,689 INFO  [io.quarkus] (main) Profile prod activated. 
2024-06-07 12:52:51,690 INFO  [io.quarkus] (main) Installed features: [cdi, config-yaml, rest, rest-client, rest-client-jackson, rest-jackson, smallrye-context-propagation, vertx]
2024-06-07 12:52:51,775 INFO  [org.exa.Main] (main) Using HTTP Server at: http://localhost:8080
2024-06-07 12:52:51,782 INFO  [org.exa.cli.ClientFactory] (main) URI: http://localhost:8080
2024-06-07 12:52:51,784 INFO  [org.exa.cli.Client] (main) Send InputStream test
2024-06-07 12:52:52,012 ERROR [org.exa.Main] (main) ERROR: org.jboss.resteasy.reactive.ClientWebApplicationException: Received: 'Not Found, status code 404' when invoking: Rest Client method: 'org.example.clientnoclose.ApiClient#inputStream'
	at org.jboss.resteasy.reactive.client.impl.RestClientRequestContext.unwrapException(RestClientRequestContext.java:195)
	at org.jboss.resteasy.reactive.common.core.AbstractResteasyReactiveContext.handleException(AbstractResteasyReactiveContext.java:329)
	at org.jboss.resteasy.reactive.common.core.AbstractResteasyReactiveContext.run(AbstractResteasyReactiveContext.java:175)
	at io.smallrye.context.impl.wrappers.SlowContextualRunnable.run(SlowContextualRunnable.java:19)
	at org.jboss.resteasy.reactive.client.handlers.ClientSwitchToRequestContextRestHandler$1$1.handle(ClientSwitchToRequestContextRestHandler.java:38)
	at org.jboss.resteasy.reactive.client.handlers.ClientSwitchToRequestContextRestHandler$1$1.handle(ClientSwitchToRequestContextRestHandler.java:35)
	at io.vertx.core.impl.ContextInternal.dispatch(ContextInternal.java:279)
	at io.vertx.core.impl.ContextInternal.dispatch(ContextInternal.java:261)
	at io.vertx.core.impl.ContextInternal.lambda$runOnContext$0(ContextInternal.java:59)
	at io.netty.util.concurrent.AbstractEventExecutor.runTask(AbstractEventExecutor.java:173)
	at io.netty.util.concurrent.AbstractEventExecutor.safeExecute(AbstractEventExecutor.java:166)
	at io.netty.util.concurrent.SingleThreadEventExecutor.runAllTasks(SingleThreadEventExecutor.java:470)
	at io.netty.channel.epoll.EpollEventLoop.run(EpollEventLoop.java:413)
	at io.netty.util.concurrent.SingleThreadEventExecutor$4.run(SingleThreadEventExecutor.java:997)
	at io.netty.util.internal.ThreadExecutorMap$2.run(ThreadExecutorMap.java:74)
	at io.netty.util.concurrent.FastThreadLocalRunnable.run(FastThreadLocalRunnable.java:30)
	at java.base/java.lang.Thread.run(Thread.java:1583)
Caused by: jakarta.ws.rs.WebApplicationException: Not Found, status code 404
	at io.quarkus.rest.client.reactive.runtime.DefaultMicroprofileRestClientExceptionMapper.toThrowable(DefaultMicroprofileRestClientExceptionMapper.java:19)
	at io.quarkus.rest.client.reactive.runtime.MicroProfileRestClientResponseFilter.filter(MicroProfileRestClientResponseFilter.java:52)
	at org.jboss.resteasy.reactive.client.handlers.ClientResponseFilterRestHandler.handle(ClientResponseFilterRestHandler.java:21)
	at org.jboss.resteasy.reactive.client.handlers.ClientResponseFilterRestHandler.handle(ClientResponseFilterRestHandler.java:10)
	at org.jboss.resteasy.reactive.common.core.AbstractResteasyReactiveContext.invokeHandler(AbstractResteasyReactiveContext.java:231)
	at org.jboss.resteasy.reactive.common.core.AbstractResteasyReactiveContext.run(AbstractResteasyReactiveContext.java:147)
	... 14 more

2024-06-07 12:52:52,015 INFO  [org.exa.cli.Client] (main) PSEUDO CLOSING
2024-06-07 12:52:52,016 INFO  [org.exa.cli.ClientFactory] (main) URI: http://localhost:8080
2024-06-07 12:52:52,019 INFO  [org.exa.cli.Client] (main) Send InputStream test
2024-06-07 12:52:52,373 INFO  [org.exa.Main] (main) Result INPUTSTREAM CLOSED Client: UploadResponse[name=test, size=120000]
2024-06-07 12:52:52,382 INFO  [org.exa.cli.Client] (main) PSEUDO CLOSING
2024-06-07 12:52:52,383 INFO  [org.exa.cli.ClientFactory] (main) URI: http://localhost:8080
2024-06-07 12:52:52,384 INFO  [org.exa.cli.Client] (main) Send InputStream test
2024-06-07 12:52:52,398 INFO  [org.exa.cli.Client] (main) PSEUDO CLOSING
2024-06-07 12:52:52,399 ERROR [org.exa.Main] (main) ERROR: org.jboss.resteasy.reactive.ClientWebApplicationException: Received: 'Not Found, status code 404' when invoking: Rest Client method: 'org.example.clientnoclose.ApiClient#inputStream'
	at org.jboss.resteasy.reactive.client.impl.RestClientRequestContext.unwrapException(RestClientRequestContext.java:195)
	at org.jboss.resteasy.reactive.common.core.AbstractResteasyReactiveContext.handleException(AbstractResteasyReactiveContext.java:329)
	at org.jboss.resteasy.reactive.common.core.AbstractResteasyReactiveContext.run(AbstractResteasyReactiveContext.java:175)
	at io.smallrye.context.impl.wrappers.SlowContextualRunnable.run(SlowContextualRunnable.java:19)
	at org.jboss.resteasy.reactive.client.handlers.ClientSwitchToRequestContextRestHandler$1$1.handle(ClientSwitchToRequestContextRestHandler.java:38)
	at org.jboss.resteasy.reactive.client.handlers.ClientSwitchToRequestContextRestHandler$1$1.handle(ClientSwitchToRequestContextRestHandler.java:35)
	at io.vertx.core.impl.ContextInternal.dispatch(ContextInternal.java:279)
	at io.vertx.core.impl.ContextInternal.dispatch(ContextInternal.java:261)
	at io.vertx.core.impl.ContextInternal.lambda$runOnContext$0(ContextInternal.java:59)
	at io.netty.util.concurrent.AbstractEventExecutor.runTask(AbstractEventExecutor.java:173)
	at io.netty.util.concurrent.AbstractEventExecutor.safeExecute(AbstractEventExecutor.java:166)
	at io.netty.util.concurrent.SingleThreadEventExecutor.runAllTasks(SingleThreadEventExecutor.java:470)
	at io.netty.channel.epoll.EpollEventLoop.run(EpollEventLoop.java:413)
	at io.netty.util.concurrent.SingleThreadEventExecutor$4.run(SingleThreadEventExecutor.java:997)
	at io.netty.util.internal.ThreadExecutorMap$2.run(ThreadExecutorMap.java:74)
	at io.netty.util.concurrent.FastThreadLocalRunnable.run(FastThreadLocalRunnable.java:30)
	at java.base/java.lang.Thread.run(Thread.java:1583)
Caused by: jakarta.ws.rs.WebApplicationException: Not Found, status code 404
	at io.quarkus.rest.client.reactive.runtime.DefaultMicroprofileRestClientExceptionMapper.toThrowable(DefaultMicroprofileRestClientExceptionMapper.java:19)
	at io.quarkus.rest.client.reactive.runtime.MicroProfileRestClientResponseFilter.filter(MicroProfileRestClientResponseFilter.java:52)
	at org.jboss.resteasy.reactive.client.handlers.ClientResponseFilterRestHandler.handle(ClientResponseFilterRestHandler.java:21)
	at org.jboss.resteasy.reactive.client.handlers.ClientResponseFilterRestHandler.handle(ClientResponseFilterRestHandler.java:10)
	at org.jboss.resteasy.reactive.common.core.AbstractResteasyReactiveContext.invokeHandler(AbstractResteasyReactiveContext.java:231)
	at org.jboss.resteasy.reactive.common.core.AbstractResteasyReactiveContext.run(AbstractResteasyReactiveContext.java:147)
	... 14 more

/cc @cescoffier (rest-client), @geoand (rest-client), @zakkak (native-image)

Was just bad port settings:

  • Client opened 8080 too locally for self server, not the real one)
  • Setting server to 8082 and let the client using this port to access the server works fine for ALL cases

Closing this issue

Thanks for the update as I was just about to look into it :)

I just update the test in order that it works now (in case).

But I'm not able then to reproduce the other failure:

  • When using client sending InputStream (with filter to add headers), the client stops and do not send anything to the server, while the connexion is opened
    • The only trace we've got is the client is going into the header filter, but then wait for something until timeout without sending anything to the server
  • When using client sending byte array (same filter, same server), the client sends correctly the byte array and the server gets it through an inputStream

If you have any idea ?

But my example works, so I'm lost... For the moment we have a fix (using byte array), but not that fun...

Thank you however to start to check this issue ! Even if wrongly opened on our side...

Thank

Please open a new issue about the InputStream plus headers issue

OK, see #41058
But I do not have any reproducer yet (except our code but closed code)

Thanks. If you are able to come up with a reproducer, please update that issue.