You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
When running the Azure example provided in example folder, I get the below exception.
It seems base URL is not properly recognized.
Exception in thread "main" java.io.UncheckedIOException: java.net.UnknownHostException: www.example.com
at com.azure.core.http.netty.NettyAsyncHttpClient.sendSync(NettyAsyncHttpClient.java:201)
at com.azure.core.http.HttpPipelineNextSyncPolicy.processSync(HttpPipelineNextSyncPolicy.java:51)
at com.azure.core.http.policy.BearerTokenAuthenticationPolicy.processSync(BearerTokenAuthenticationPolicy.java:175)
at com.azure.core.http.HttpPipelineNextSyncPolicy.processSync(HttpPipelineNextSyncPolicy.java:53)
at com.azure.core.http.HttpPipeline.sendSync(HttpPipeline.java:138)
at com.azure.identity.AuthenticationUtil.lambda$getBearerTokenSupplier$0(AuthenticationUtil.java:56)
at com.openai.credential.BearerTokenCredential.token(BearerTokenCredential.kt:35)
at com.openai.core.ClientOptions$Builder.build(ClientOptions.kt:295)
at com.openai.client.okhttp.OpenAIOkHttpClient$Builder.build(OpenAIOkHttpClient.kt:196)
at test.AzureEntraIdExample.main(AzureEntraIdExample.java:29)
Caused by: java.net.UnknownHostException: www.example.com
at java.net.Inet6AddressImpl.lookupAllHostAddr(Native Method)
at java.net.InetAddress$2.lookupAllHostAddr(InetAddress.java:929)
at java.net.InetAddress.getAddressesFromNameService(InetAddress.java:1335)
at java.net.InetAddress.getAllByName0(InetAddress.java:1288)
at java.net.InetAddress.getAllByName(InetAddress.java:1203)
at java.net.InetAddress.getAllByName(InetAddress.java:1127)
at io.netty.util.internal.SocketUtils$9.run(SocketUtils.java:169)
at io.netty.util.internal.SocketUtils$9.run(SocketUtils.java:166)
at java.security.AccessController.doPrivileged(Native Method)
at io.netty.util.internal.SocketUtils.allAddressesByName(SocketUtils.java:166)
at io.netty.resolver.DefaultNameResolver.doResolveAll(DefaultNameResolver.java:50)
at io.netty.resolver.SimpleNameResolver.resolveAll(SimpleNameResolver.java:79)
at io.netty.resolver.SimpleNameResolver.resolveAll(SimpleNameResolver.java:71)
at io.netty.resolver.InetSocketAddressResolver.doResolveAll(InetSocketAddressResolver.java:73)
at io.netty.resolver.InetSocketAddressResolver.doResolveAll(InetSocketAddressResolver.java:31)
at io.netty.resolver.AbstractAddressResolver.resolveAll(AbstractAddressResolver.java:158)
at reactor.netty.transport.TransportConnector.doResolveAndConnect(TransportConnector.java:329)
at reactor.netty.transport.TransportConnector.lambda$connect$6(TransportConnector.java:165)
at reactor.core.publisher.MonoFlatMap$FlatMapMain.onNext(MonoFlatMap.java:125)
at reactor.netty.transport.TransportConnector$MonoChannelPromise._subscribe(TransportConnector.java:631)
at reactor.netty.transport.TransportConnector$MonoChannelPromise.lambda$subscribe$0(TransportConnector.java:543)
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:472)
at io.netty.channel.nio.NioEventLoop.run(NioEventLoop.java:569)
at io.netty.util.concurrent.SingleThreadEventExecutor$4.run(SingleThreadEventExecutor.java:998)
at io.netty.util.internal.ThreadExecutorMap$2.run(ThreadExecutorMap.java:74)
at io.netty.util.concurrent.FastThreadLocalRunnable.run(FastThreadLocalRunnable.java:30)
at java.lang.Thread.run(Thread.java:750)
I have provided both AZURE_OPENAI_KEY and OPENAI_BASE_URL in my environment and I am testing they are read correctly by my app, I get the same error even if I specify the endpoint using:
I see it says Caused by: java.net.UnknownHostException: www.example.com in your exception. Are you trying to set www.example.com as your base URL via your env? That seems odd.
I see it says Caused by: java.net.UnknownHostException: www.example.com in your exception. Are you trying to set www.example.com as your base URL via your env? That seems odd.
Hi, no, that's exactly my point. Seems the client is using that URL which is typically used when no URL is set for OkhttpClient (I believe), hence my comment that OpenAIClient is not reading/passing/setting the URL properly.
When running the Azure example provided in example folder, I get the below exception.
It seems base URL is not properly recognized.
I have provided both AZURE_OPENAI_KEY and OPENAI_BASE_URL in my environment and I am testing they are read correctly by my app, I get the same error even if I specify the endpoint using:
If it helps, my POM file is below:
The text was updated successfully, but these errors were encountered: