[BUG] Java class DnsContextFactory could not be found the DNS on Azure function service.
@shreyas-gopalakrishna is already working on this.
Since Mar 7, 2023.
Assessment
This issue has not been assessed yet.
Description
Repro steps
Provide the steps required to reproduce the problem:
- Call Azure key vault, Service bus, Storage APIs,... by Netty.
- Netty will be resolved DNS by DirContextUtils class to get host IP of the above APIs.
- DirContextUtils is got host name via DnsContextFactory.
Expected behavior
Provide a description of the expected behavior.
- After DirContextUtils is performed, the DNS string is dns://xxxx dns://yyyy
Actual behavior
Provide a description of the actual behavior observed.
- The DNS string is dns:// (empty)
- The Netty will call a fallback function to resolve IPs. The fallback function will be used the Google DNS. I don't want use this DNS for my Azure function.
Related information
Provide any related information
- Programming language used: Java 11
- Links to source: DirContextUtils
- Netty version: 4.1.68 - 4.1.70
- Os: win
Some settings of Azure function:
-
Configuration:
WEBSITE_DNS_SERVER = 168.63.129.16
WEBSITE_CONTENTOVERVNET = 1
WEBSITE_VNET_ROUTE_ALL = 1
FUNCTIONS_EXTENSION_VERSION = ~4 -
Networking:
Vnet: enabled
2021-12-08T06:29:34.017 [Information] DEBUG io.netty.resolver.dns.DirContextUtils: Skipping a malformed nameserver URI: dns://
2021-12-08T06:29:34.018 [Information] java.net.URISyntaxException: Expected authority at index 6: dns://
2021-12-08T06:29:34.018 [Information] at java.base/java.net.URI$Parser.fail(URI.java:2913)
2021-12-08T06:29:34.018 [Information] at java.base/java.net.URI$Parser.failExpecting(URI.java:2919)
2021-12-08T06:29:34.018 [Information] at java.base/java.net.URI$Parser.parseHierarchical(URI.java:3163)
2021-12-08T06:29:34.018 [Information] at java.base/java.net.URI$Parser.parse(URI.java:3114)
2021-12-08T06:29:34.019 [Information] at java.base/java.net.URI.<init>(URI.java:600)
2021-12-08T06:29:34.019 [Information] at io.netty.resolver.dns.DirContextUtils.addNameServers(DirContextUtils.java:56)
2021-12-08T06:29:34.019 [Information] at io.netty.resolver.dns.DefaultDnsServerAddressStreamProvider.<clinit>(DefaultDnsServerAddressStreamProvider.java:53)
2021-12-08T06:29:34.019 [Information] at io.netty.resolver.dns.DnsServerAddressStreamProviders$DefaultProviderHolder$1.provider(DnsServerAddressStreamProviders.java:140)
2021-12-08T06:29:34.019 [Information] at io.netty.resolver.dns.DnsServerAddressStreamProviders$DefaultProviderHolder$1.<init>(DnsServerAddressStreamProviders.java:120)
2021-12-08T06:29:34.019 [Information] at io.netty.resolver.dns.DnsServerAddressStreamProviders$DefaultProviderHolder.<clinit>(DnsServerAddressStreamProviders.java:118)
2021-12-08T06:29:34.019 [Information] at io.netty.resolver.dns.DnsServerAddressStreamProviders.unixDefault(DnsServerAddressStreamProviders.java:107)
2021-12-08T06:29:34.019 [Information] at io.netty.resolver.dns.DnsServerAddressStreamProviders.platformDefault(DnsServerAddressStreamProviders.java:103)
2021-12-08T06:29:34.019 [Information] at io.netty.resolver.dns.DnsNameResolverBuilder.<init>(DnsNameResolverBuilder.java:60)
2021-12-08T06:29:34.019 [Information] at reactor.netty.transport.NameResolverProvider.newNameResolverGroup(NameResolverProvider.java:432)
2021-12-08T06:29:34.019 [Information] at reactor.netty.tcp.TcpResources.getOrCreateDefaultResolver(TcpResources.java:306)
2021-12-08T06:29:34.019 [Information] at reactor.netty.http.HttpResources.getOrCreateDefaultResolver(HttpResources.java:140)
2021-12-08T06:29:34.019 [Information] at reactor.netty.http.client.HttpClientConfig.defaultAddressResolverGroup(HttpClientConfig.java:380)
2021-12-08T06:29:34.019 [Information] at reactor.netty.transport.ClientTransportConfig.resolverInternal(ClientTransportConfig.java:219)
2021-12-08T06:29:34.019 [Information] at reactor.netty.http.client.HttpClientConfig.resolverInternal(HttpClientConfig.java:434)
2021-12-08T06:29:34.019 [Information] at reactor.netty.http.client.HttpClientConnect$MonoHttpConnect.lambda$subscribe$0(HttpClientConnect.java:265)
2021-12-08T06:29:34.019 [Information] at reactor.core.publisher.MonoCreate.subscribe(MonoCreate.java:57)
2021-12-08T06:29:34.019 [Information] at reactor.core.publisher.FluxRetryWhen.subscribe(FluxRetryWhen.java:76)
2021-12-08T06:29:34.019 [Information] at reactor.core.publisher.MonoRetryWhen.subscribeOrReturn(MonoRetryWhen.java:46)
2021-12-08T06:29:34.019 [Information] at reactor.core.publisher.InternalMonoOperator.subscribe(InternalMonoOperator.java:57)
2021-12-08T06:29:34.019 [Information] at reactor.netty.http.client.HttpClientConnect$MonoHttpConnect.subscribe(HttpClientConnect.java:272)
2021-12-08T06:29:34.019 [Information] at reactor.core.publisher.InternalMonoOperator.subscribe(InternalMonoOperator.java:64)
2021-12-08T06:29:34.020 [Information] at reactor.core.publisher.FluxRetryWhen.subscribe(FluxRetryWhen.java:76)
2021-12-08T06:29:34.020 [Information] at reactor.core.publisher.MonoRetryWhen.subscribeOrReturn(MonoRetryWhen.java:46)
2021-12-08T06:29:34.020 [Information] at reactor.core.publisher.InternalMonoOperator.subscribe(InternalMonoOperator.java:57)
2021-12-08T06:29:34.020 [Information] at reactor.core.publisher.MonoDefer.subscribe(MonoDefer.java:52)
2021-12-08T06:29:34.020 [Information] at reactor.core.publisher.InternalMonoOperator.subscribe(InternalMonoOperator.java:64)
2021-12-08T06:29:34.020 [Information] at reactor.core.publisher.MonoDelaySubscription.accept(MonoDelaySubscription.java:52)
2021-12-08T06:29:34.020 [Information] at reactor.core.publisher.MonoDelaySubscription.accept(MonoDelaySubscription.java:33)
2021-12-08T06:29:34.021 [Information] at reactor.core.publisher.FluxDelaySubscription$DelaySubscriptionOtherSubscriber.onNext(FluxDelaySubscription.java:130)
2021-12-08T06:29:34.021 [Information] at reactor.core.publisher.MonoDelay$MonoDelayRunnable.run(MonoDelay.java:119)
2021-12-08T06:29:34.021 [Information] at reactor.core.scheduler.SchedulerTask.call(SchedulerTask.java:68)
2021-12-08T06:29:34.021 [Information] at reactor.core.scheduler.SchedulerTask.call(SchedulerTask.java:28)
2021-12-08T06:29:34.021 [Information] at java.base/java.util.concurrent.FutureTask.run(FutureTask.java:264)
2021-12-08T06:29:34.021 [Information] at java.base/java.util.concurrent.ScheduledThreadPoolExecutor$ScheduledFutureTask.run(ScheduledThreadPoolExecutor.java:304)
2021-12-08T06:29:34.021 [Information] at java.base/java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1128)
2021-12-08T06:29:34.021 [Information] at java.base/java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:628)
2021-12-08T06:29:34.021 [Information] at java.base/java.lang.Thread.run(Thread.java:829)
2021-12-08T06:29:34.021 [Information] WARN io.netty.resolver.dns.DefaultDnsServerAddressStreamProvider: Default DNS servers: [/8.8.8.8:53, /8.8.4.4:53] (Google Public DNS as a fallback)
- Dominant language
- Java
- Stars
- 103
- Forks
- 74
- Avg merge
- 1d 11h
- Merged PRs (30d)
- 3
Contributor guide
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
More from Azure/azure-functions-java-worker
-
Difficulty 4/5 3-5 days Newbie friendliness 50/100
-
Difficulty 4/5 3-5 days Newbie friendliness 48/100
-
Difficulty 4/5 3-5 days Newbie friendliness 48/100
-
mcp-extension
Difficulty 5/5 Over a week Newbie friendliness 25/100
-
mcp-extension
Azure/azure-functions-java-worker#863 · 1 assignee ·
All issues in Azure/azure-functions-java-worker
Similar issues
-
Difficulty 2/5 1-3 hours Newbie friendliness 82/100
infinispan/infinispan#18150 ·
-
area/frontend
Difficulty 2/5 1-3 hours Newbie friendliness 65/100
-
Difficulty 2/5 1-3 hours Newbie friendliness 84/100
-
untriaged
Difficulty 2/5 1-3 hours Newbie friendliness 82/100
opensearch-project/k-NN#3597 ·
-
bug
Difficulty 2/5 1-3 hours Newbie friendliness 88/100