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

Proxy support for apicurio client (VertxHttpClient) #131

Open
sajhak opened this issue Mar 8, 2023 · 1 comment
Open

Proxy support for apicurio client (VertxHttpClient) #131

sajhak opened this issue Mar 8, 2023 · 1 comment
Assignees
Labels
enhancement New feature or request

Comments

@sajhak
Copy link

sajhak commented Mar 8, 2023

I have a quarkus application (2.9.2-Final) running in Kubernetes, trying to connect to an Apicurio Registry configured outside, but connecting via a proxy. As per the error logs apicurio client is not picking up the proxy settings, and gets a time out exception

at io.apicurio.rest.client.util.ConcurrentUtil.get(ConcurrentUtil.java:29)
at io.apicurio.rest.client.util.ConcurrentUtil.get(ConcurrentUtil.java:13)
at io.apicurio.rest.client.util.ConcurrentUtil.result(ConcurrentUtil.java:40)
at io.apicurio.rest.client.VertxHttpClient.sendRequest(VertxHttpClient.java:122)
at io.apicurio.registry.rest.client.impl.RegistryClientImpl.getContentByGlobalId(RegistryClientImpl.java:251)
at io.apicurio.registry.resolver.AbstractSchemaResolver.lambda$resolveSchemaByGlobalId$1(AbstractSchemaResolver.java:166)
at io.apicurio.registry.resolver.ERCache.lambda$getValue$0(ERCache.java:132)
at io.apicurio.registry.resolver.ERCache.retry(ERCache.java:171)
at io.apicurio.registry.resolver.ERCache.getValue(ERCache.java:131)
at io.apicurio.registry.resolver.ERCache.getByGlobalId(ERCache.java:111)
at io.apicurio.registry.resolver.AbstractSchemaResolver.resolveSchemaByGlobalId(AbstractSchemaResolver.java:162)
at io.apicurio.registry.resolver.DefaultSchemaResolver.resolveSchemaByArtifactReference(DefaultSchemaResolver.java:122)
at io.apicurio.registry.serde.AbstractKafkaDeserializer.resolve(AbstractKafkaDeserializer.java:147)
at io.apicurio.registry.serde.AbstractKafkaDeserializer.readData(AbstractKafkaDeserializer.java:136)
at io.apicurio.registry.serde.AbstractKafkaDeserializer.deserialize(AbstractKafkaDeserializer.java:122)
at io.smallrye.reactive.messaging.kafka.fault.DeserializerWrapper.lambda$deserialize$1(DeserializerWrapper.java:74)
at io.smallrye.reactive.messaging.kafka.fault.DeserializerWrapper.wrapDeserialize(DeserializerWrapper.java:106)
at io.smallrye.reactive.messaging.kafka.fault.DeserializerWrapper.deserialize(DeserializerWrapper.java:74)
at org.apache.kafka.clients.consumer.internals.Fetcher.parseRecord(Fetcher.java:1439)
at org.apache.kafka.clients.consumer.internals.Fetcher.access$3400(Fetcher.java:135)
at org.apache.kafka.clients.consumer.internals.Fetcher$CompletedFetch.fetchRecords(Fetcher.java:1671)
at org.apache.kafka.clients.consumer.internals.Fetcher$CompletedFetch.access$1900(Fetcher.java:1507)
at org.apache.kafka.clients.consumer.internals.Fetcher.fetchRecords(Fetcher.java:733)
at org.apache.kafka.clients.consumer.internals.Fetcher.fetchedRecords(Fetcher.java:684)
at org.apache.kafka.clients.consumer.KafkaConsumer.pollForFetches(KafkaConsumer.java:1304)
at org.apache.kafka.clients.consumer.KafkaConsumer.poll(KafkaConsumer.java:1238)
at org.apache.kafka.clients.consumer.KafkaConsumer.poll(KafkaConsumer.java:1211)
at io.smallrye.reactive.messaging.kafka.impl.ReactiveKafkaConsumer.lambda$poll$4(ReactiveKafkaConsumer.java:141)
at io.smallrye.reactive.messaging.kafka.impl.ReactiveKafkaConsumer.lambda$runOnPollingThread$0(ReactiveKafkaConsumer.java:108)
at io.smallrye.context.impl.wrappers.SlowContextualSupplier.get(SlowContextualSupplier.java:21)
at io.smallrye.mutiny.operators.uni.builders.UniCreateFromItemSupplier.subscribe(UniCreateFromItemSupplier.java:28)
at io.smallrye.mutiny.operators.AbstractUni.subscribe(AbstractUni.java:36)
at io.smallrye.mutiny.operators.uni.UniRunSubscribeOn.lambda$subscribe$0(UniRunSubscribeOn.java:27)
at java.base/java.util.concurrent.Executors$RunnableAdapter.call(Unknown Source)
at java.base/java.util.concurrent.FutureTask.run(Unknown Source)
at java.base/java.util.concurrent.ScheduledThreadPoolExecutor$ScheduledFutureTask.run(Unknown Source)
at java.base/java.util.concurrent.ThreadPoolExecutor.runWorker(Unknown Source)
at java.base/java.util.concurrent.ThreadPoolExecutor$Worker.run(Unknown Source)
at java.base/java.lang.Thread.run(Unknown Source)
Caused by: java.util.concurrent.ExecutionException: io.netty.channel.ConnectTimeoutException: connection timed out: abc-test3.aa.bb.com/11.128.81.34:443
at java.base/java.util.concurrent.CompletableFuture.reportGet(Unknown Source)
at java.base/java.util.concurrent.CompletableFuture.get(Unknown Source)
at io.apicurio.rest.client.util.ConcurrentUtil.get(ConcurrentUtil.java:21)
... 38 more
Caused by: io.netty.channel.ConnectTimeoutException: connection timed out: abc-test3.aa.bb.com/11.128.81.34:443
at io.netty.channel.nio.AbstractNioChannel$AbstractNioUnsafe$1.run(AbstractNioChannel.java:261)
at io.netty.util.concurrent.PromiseTask.runTask(PromiseTask.java:98)
at io.netty.util.concurrent.ScheduledFutureTask.run(ScheduledFutureTask.java:170)
at io.netty.util.concurrent.AbstractEventExecutor.safeExecute(AbstractEventExecutor.java:164)
at io.netty.util.concurrent.SingleThreadEventExecutor.runAllTasks(SingleThreadEventExecutor.java:469)
at io.netty.channel.nio.NioEventLoop.run(NioEventLoop.java:503)
at io.netty.util.concurrent.SingleThreadEventExecutor$4.run(SingleThreadEventExecutor.java:986)
at io.netty.util.internal.ThreadExecutorMap$2.run(ThreadExecutorMap.java:74)
at io.netty.util.concurrent.FastThreadLocalRunnable.run(FastThreadLocalRunnable.java:30)

abc-test3.aa.bb.com is the Apicurio Registy URL, so there its trying to connect directly to that url.
I tried with several properties, environment variables, Java system properties but nothing seemed to be working.

    System.setProperty("http.proxyHost",host);
    System.setProperty("http.proxyPort", String.valueOf(port));
    System.setProperty("https.proxyHost",host);
    System.setProperty("https.proxyPort", String.valueOf(port));
    System.setProperty("http.nonProxyHosts",host);

Also I have tried environment variables HTTP_PROXY HTTPS_PROXY etc.. but that doesn't work either

Hope apicurio client supports proxy settings by default. (VertxHttpClient)
Could you tell me what exact parameters I need to set?
Is there any other workaround?

@EricWittmann EricWittmann added the enhancement New feature or request label Mar 8, 2023
@sajhak
Copy link
Author

sajhak commented Mar 28, 2023

Any plans to incorporate this feature?
I think need a solution similar to this confluentinc/schema-registry#1144

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

No branches or pull requests

3 participants