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

Smallrye-Opentracing with Reactive Rest Client no longer working #18806

Closed
antonwiens opened this issue Jul 19, 2021 · 1 comment · Fixed by #18807
Closed

Smallrye-Opentracing with Reactive Rest Client no longer working #18806

antonwiens opened this issue Jul 19, 2021 · 1 comment · Fixed by #18807

Comments

@antonwiens
Copy link

Describe the bug

When using Quarkus-Smallrye-Opentracing together with rest-client-reactive the clients are not usable.

Notice:

I had to add serveral quarkus extensions and enable metrics on them for this to occur. It is kinda strange.

It have the feeling it has something to do with micrometer and rest metrics, just a hunch.

I think the real problem is that a registration like for resteasy-classic, found here:

.produce(new ReflectiveClassBuildItem(true, true, "io.smallrye.opentracing.SmallRyeRestClientListener"));

is not done for rest-client-reactive and smallrye-opentracing.

Stacktrace

2021-07-19 11:44:33,462 ERROR [org.jbo.res.rea.com.cor.AbstractResteasyReactiveContext] (executor-thread-0) Request failed: java.util.ServiceConfigurationError: org.eclipse.microprofile.rest.client.spi.RestClientListener: Provider io.smallrye.opentracing.SmallRyeRestClientListener not found
        at java.util.ServiceLoader.fail(ServiceLoader.java:589)
        at java.util.ServiceLoader$LazyClassPathLookupIterator.nextProviderClass(ServiceLoader.java:1212)
        at java.util.ServiceLoader$LazyClassPathLookupIterator.hasNextService(ServiceLoader.java:105)
        at java.util.ServiceLoader$LazyClassPathLookupIterator.hasNext(ServiceLoader.java:1265)
        at java.util.ServiceLoader$2.hasNext(ServiceLoader.java:1300)
        at java.util.ServiceLoader$3.hasNext(ServiceLoader.java:1385)
        at io.quarkus.rest.client.reactive.runtime.RestClientListeners.get(RestClientListeners.java:19)
        at io.quarkus.rest.client.reactive.runtime.RestClientBuilderImpl.build(RestClientBuilderImpl.java:239)
        at io.quarkus.rest.client.reactive.runtime.RestClientCDIDelegateBuilder.build(RestClientCDIDelegateBuilder.java:76)
        at io.quarkus.rest.client.reactive.runtime.RestClientCDIDelegateBuilder.createDelegate(RestClientCDIDelegateBuilder.java:57)
        at io.quarkus.rest.client.reactive.runtime.RestClientReactiveCDIWrapperBase.<init>(RestClientReactiveCDIWrapperBase.java:16)
        at acme.RestTestClient$$CDIWrapper.<init>(RestTestClient$$CDIWrapper.zig:21)
        at acme.RestTestClient$$CDIWrapper_ClientProxy.<init>(RestTestClient$$CDIWrapper_ClientProxy.zig:24)
        at acme.RestTestClient$$CDIWrapper_Bean.proxy(RestTestClient$$CDIWrapper_Bean.zig:40)
        at acme.RestTestClient$$CDIWrapper_Bean.get(RestTestClient$$CDIWrapper_Bean.zig:243)
        at acme.RestTestClient$$CDIWrapper_Bean.get(RestTestClient$$CDIWrapper_Bean.zig:259)
        at acme.ClientProducer_Bean.create(ClientProducer_Bean.zig:161)
        at acme.ClientProducer_Bean.create(ClientProducer_Bean.zig:183)
        at io.quarkus.arc.impl.AbstractSharedContext.createInstanceHandle(AbstractSharedContext.java:96)
        at io.quarkus.arc.impl.AbstractSharedContext$1.get(AbstractSharedContext.java:29)
        at io.quarkus.arc.impl.AbstractSharedContext$1.get(AbstractSharedContext.java:26)
        at io.quarkus.arc.impl.LazyValue.get(LazyValue.java:26)
        at io.quarkus.arc.impl.ComputingCache.computeIfAbsent(ComputingCache.java:69)
        at io.quarkus.arc.impl.AbstractSharedContext.get(AbstractSharedContext.java:26)
        at io.quarkus.arc.impl.ClientProxies.getApplicationScopedDelegate(ClientProxies.java:17)
        at acme.ClientProducer_ClientProxy.arc$delegate(ClientProducer_ClientProxy.zig:67)
        at acme.ClientProducer_ClientProxy.arc_contextualInstance(ClientProducer_ClientProxy.zig:82)
        at acme.ClientProducer_ProducerMethod_produceIt_df58225e88de635bbf742a7a074c1e67bb9c23c9_Bean.create(ClientProducer_ProducerMethod_produceIt_df58225e88de635bbf742a7a074c1e67bb9c23c9_Bean.zig:163)
        at acme.ClientProducer_ProducerMethod_produceIt_df58225e88de635bbf742a7a074c1e67bb9c23c9_Bean.create(ClientProducer_ProducerMethod_produceIt_df58225e88de635bbf742a7a074c1e67bb9c23c9_Bean.zig:197)
        at io.quarkus.arc.impl.AbstractSharedContext.createInstanceHandle(AbstractSharedContext.java:96)
        at io.quarkus.arc.impl.AbstractSharedContext$1.get(AbstractSharedContext.java:29)
        at io.quarkus.arc.impl.AbstractSharedContext$1.get(AbstractSharedContext.java:26)
        at io.quarkus.arc.impl.LazyValue.get(LazyValue.java:26)
        at io.quarkus.arc.impl.ComputingCache.computeIfAbsent(ComputingCache.java:69)
        at io.quarkus.arc.impl.AbstractSharedContext.get(AbstractSharedContext.java:26)
        at io.quarkus.arc.impl.ClientProxies.getApplicationScopedDelegate(ClientProxies.java:17)
        at acme.ClientProducer_ProducerMethod_produceIt_df58225e88de635bbf742a7a074c1e67bb9c23c9_ClientProxy.arc$delegate(ClientProducer_ProducerMethod_produceIt_df58225e88de635bbf742a7a074c1e67bb9c23c9_ClientProxy.zig:68)
        at acme.ClientProducer_ProducerMethod_produceIt_df58225e88de635bbf742a7a074c1e67bb9c23c9_ClientProxy.getSomething(ClientProducer_ProducerMethod_produceIt_df58225e88de635bbf742a7a074c1e67bb9c23c9_ClientProxy.zig:128)
        at acme.ReactiveGreetingResource.hello(ReactiveGreetingResource.kt:21)
        at acme.ReactiveGreetingResource_ClientProxy.hello(ReactiveGreetingResource_ClientProxy.zig:126)
        at acme.ReactiveGreetingResource$quarkusrestinvoker$hello_e747664148511e1e5212d3e0f4b40d45c56ab8a1.invoke(ReactiveGreetingResource$quarkusrestinvoker$hello_e747664148511e1e5212d3e0f4b40d45c56ab8a1.zig:33)
        at org.jboss.resteasy.reactive.server.handlers.InvocationHandler.handle(InvocationHandler.java:29)
        at org.jboss.resteasy.reactive.server.handlers.InvocationHandler.handle(InvocationHandler.java:7)
        at org.jboss.resteasy.reactive.common.core.AbstractResteasyReactiveContext.run(AbstractResteasyReactiveContext.java:132)
        at io.quarkus.vertx.core.runtime.VertxCoreRecorder$14.runWith(VertxCoreRecorder.java:481)
        at org.jboss.threads.EnhancedQueueExecutor$Task.run(EnhancedQueueExecutor.java:2442)
        at org.jboss.threads.EnhancedQueueExecutor$ThreadBody.run(EnhancedQueueExecutor.java:1476)
        at org.jboss.threads.DelegatingRunnable.run(DelegatingRunnable.java:29)
        at org.jboss.threads.ThreadLocalResettingRunnable.run(ThreadLocalResettingRunnable.java:29)
        at io.netty.util.concurrent.FastThreadLocalRunnable.run(FastThreadLocalRunnable.java:30)
        at java.lang.Thread.run(Thread.java:829)
        at com.oracle.svm.core.thread.JavaThreads.threadStartRoutine(JavaThreads.java:553)
        at com.oracle.svm.core.posix.thread.PosixJavaThreads.pthreadStartRoutine(PosixJavaThreads.java:192)

Expected behavior

Client is normally usable

Actual behavior

Client is not usable

How to Reproduce?

reproducer.zip

  1. Extract the reproducer provided above.
  2. Build native executable:
    2.1. ./gradlew clean quarkusBuild -Dquarkus.native.container-build=true -Dquarkus.native.container-runtime=docker -Dquarkus.package.type=native
  3. Build docker image:
    3.1. docker build -f src/main/docker/Dockerfile.native -t quarkus-quickstart/test .
  4. Run docker image:
    4.1. docker run -i --rm -p 8080:8080 docker.io/quarkus-quickstart/test
  5. Call http://localhost:8080/hello

Output of uname -a or ver

No response

Output of java -version

No response

GraalVM version (if different from Java)

No response

Quarkus version or git rev

Quarkus 2.0.2.Final

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

No response

Additional information

No response

@antonwiens antonwiens added the kind/bug Something isn't working label Jul 19, 2021
@quarkus-bot
Copy link

quarkus-bot bot commented Jul 19, 2021

@geoand geoand self-assigned this Jul 19, 2021
geoand added a commit to geoand/quarkus that referenced this issue Jul 19, 2021
geoand added a commit to geoand/quarkus that referenced this issue Jul 19, 2021
geoand added a commit that referenced this issue Jul 19, 2021
Fix integration between Rest Client Reactive and OpenTracing
@quarkus-bot quarkus-bot bot added this to the 2.2 - main milestone Jul 19, 2021
@gsmet gsmet modified the milestones: 2.2 - main, 2.1.0.Final Jul 21, 2021
gsmet pushed a commit to gsmet/quarkus that referenced this issue Jul 21, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging a pull request may close this issue.

3 participants