Never saw this big stack trace. ;/ make sure you have:

```
        <dependency>
          <groupId>io.netty</groupId>
          <artifactId>netty-resolver-dns-native-macos</artifactId>
          <version>XXX</version>
          <classifier>osx-x86_64</classifier>
        </dependency>
```

in your class path on OS X faced with the same problem in Redisson yesterday,
thanx @vietj, your answer was so in time > make sure you have:
> 
> ```
>         <dependency>
>           <groupId>io.netty</groupId>
>           <artifactId>netty-resolver-dns-native-macos</artifactId>
>           <version>XXX</version>
>           <classifier>osx-x86_64</classifier>
>         </dependency>
> ```
> 
> in your class path on OS X

Doesn't fix the issue anymore. For Gradle (with Kotlin syntax) it is:
```
runtimeOnly("io.netty:netty-resolver-dns-native-macos:XXX:osx-x86_64")
```

Where `XXX` is version of [netty-resolver-dns-native-macos](https://mvnrepository.com/artifact/io.netty/netty-resolver-dns-native-macos) I still get this issue on an Apple M1. I guess there needs to be a DnsServer provider that supports the M1? @philsmart we currently not support M1. OK, thanks for the update. @normanmaurer do you have any workaround or any idea when M1 will be supported? @normanmaurer still no update 3 months later ? Sorry missed this one. We added supported in the last release (4.1.68.Final). > Sorry missed this one. We added supported in the last release (4.1.68.Final).

I still have the same issue.

`2021-09-19 12:11:56.115 ERROR 4560 --- [undedElastic-11] i.n.r.d.DnsServerAddressStreamProviders  : Unable to load io.netty.resolver.dns.macos.MacOSDnsServerAddressStreamProvider, fallback to system defaults. This may result in incorrect DNS resolutions on MacOS.

java.lang.reflect.InvocationTargetException: null
	at java.base/jdk.internal.reflect.NativeConstructorAccessorImpl.newInstance0(Native Method) ~[na:na]
	at java.base/jdk.internal.reflect.NativeConstructorAccessorImpl.newInstance(NativeConstructorAccessorImpl.java:78) ~[na:na]
	at java.base/jdk.internal.reflect.DelegatingConstructorAccessorImpl.newInstance(DelegatingConstructorAccessorImpl.java:45) ~[na:na]
	at java.base/java.lang.reflect.Constructor.newInstanceWithCaller(Constructor.java:499) ~[na:na]
	at java.base/java.lang.reflect.Constructor.newInstance(Constructor.java:480) ~[na:na]
	at io.netty.resolver.dns.DnsServerAddressStreamProviders.<clinit>(DnsServerAddressStreamProviders.java:64) ~[netty-resolver-dns-4.1.68.Final.jar:4.1.68.Final]
	at io.netty.resolver.dns.DnsNameResolverBuilder.<init>(DnsNameResolverBuilder.java:60) ~[netty-resolver-dns-4.1.68.Final.jar:4.1.68.Final]
	at reactor.netty.transport.NameResolverProvider.newNameResolverGroup(NameResolverProvider.java:432) ~[reactor-netty-core-1.0.11.jar:1.0.11]
	at reactor.netty.tcp.TcpResources.getOrCreateDefaultResolver(TcpResources.java:305) ~[reactor-netty-core-1.0.11.jar:1.0.11]
	at reactor.netty.http.HttpResources.getOrCreateDefaultResolver(HttpResources.java:139) ~[reactor-netty-http-1.0.11.jar:1.0.11]
	at reactor.netty.http.client.HttpClientConfig.defaultAddressResolverGroup(HttpClientConfig.java:382) ~[reactor-netty-http-1.0.11.jar:1.0.11]
	at reactor.netty.transport.ClientTransportConfig.resolverInternal(ClientTransportConfig.java:223) ~[reactor-netty-core-1.0.11.jar:1.0.11]
	at reactor.netty.http.client.HttpClientConfig.resolverInternal(HttpClientConfig.java:436) ~[reactor-netty-http-1.0.11.jar:1.0.11]
	at reactor.netty.http.client.HttpClientConnect$MonoHttpConnect.lambda$subscribe$0(HttpClientConnect.java:264) ~[reactor-netty-http-1.0.11.jar:1.0.11]
	at reactor.core.publisher.MonoCreate.subscribe(MonoCreate.java:57) ~[reactor-core-3.4.10.jar:3.4.10]
	at reactor.core.publisher.FluxRetryWhen.subscribe(FluxRetryWhen.java:77) ~[reactor-core-3.4.10.jar:3.4.10]
	at reactor.core.publisher.MonoRetryWhen.subscribeOrReturn(MonoRetryWhen.java:46) ~[reactor-core-3.4.10.jar:3.4.10]
	at reactor.core.publisher.InternalMonoOperator.subscribe(InternalMonoOperator.java:57) ~[reactor-core-3.4.10.jar:3.4.10]
	at reactor.netty.http.client.HttpClientConnect$MonoHttpConnect.subscribe(HttpClientConnect.java:271) ~[reactor-netty-http-1.0.11.jar:1.0.11]
	at reactor.core.publisher.Flux.subscribe(Flux.java:8468) ~[reactor-core-3.4.10.jar:3.4.10]
	at reactor.core.publisher.MonoIgnoreThen$ThenIgnoreMain.subscribeNext(MonoIgnoreThen.java:255) ~[reactor-core-3.4.10.jar:3.4.10]
	at reactor.core.publisher.MonoIgnoreThen.subscribe(MonoIgnoreThen.java:51) ~[reactor-core-3.4.10.jar:3.4.10]
	at reactor.core.publisher.MonoDefer.subscribe(MonoDefer.java:52) ~[reactor-core-3.4.10.jar:3.4.10]
	at reactor.core.publisher.MonoDefer.subscribe(MonoDefer.java:52) ~[reactor-core-3.4.10.jar:3.4.10]
	at reactor.core.publisher.MonoIgnoreThen$ThenIgnoreMain.subscribeNext(MonoIgnoreThen.java:236) ~[reactor-core-3.4.10.jar:3.4.10]
	at reactor.core.publisher.MonoIgnoreThen$ThenIgnoreMain.onComplete(MonoIgnoreThen.java:203) ~[reactor-core-3.4.10.jar:3.4.10]
	at reactor.core.publisher.FluxPeek$PeekSubscriber.onComplete(FluxPeek.java:260) ~[reactor-core-3.4.10.jar:3.4.10]
	at reactor.core.publisher.FluxMap$MapSubscriber.onComplete(FluxMap.java:142) ~[reactor-core-3.4.10.jar:3.4.10]
	at reactor.core.publisher.MonoNext$NextSubscriber.onComplete(MonoNext.java:102) ~[reactor-core-3.4.10.jar:3.4.10]
	at reactor.core.publisher.MonoNext$NextSubscriber.onNext(MonoNext.java:83) ~[reactor-core-3.4.10.jar:3.4.10]
	at reactor.core.publisher.FluxDematerialize$DematerializeSubscriber.onNext(FluxDematerialize.java:98) ~[reactor-core-3.4.10.jar:3.4.10]
	at reactor.core.publisher.FluxDematerialize$DematerializeSubscriber.onNext(FluxDematerialize.java:44) ~[reactor-core-3.4.10.jar:3.4.10]
	at reactor.core.publisher.FluxFlattenIterable$FlattenIterableSubscriber.drainAsync(FluxFlattenIterable.java:421) ~[reactor-core-3.4.10.jar:3.4.10]
	at reactor.core.publisher.FluxFlattenIterable$FlattenIterableSubscriber.drain(FluxFlattenIterable.java:686) ~[reactor-core-3.4.10.jar:3.4.10]
	at reactor.core.publisher.FluxFlattenIterable$FlattenIterableSubscriber.onNext(FluxFlattenIterable.java:250) ~[reactor-core-3.4.10.jar:3.4.10]
	at reactor.core.publisher.FluxSwitchIfEmpty$SwitchIfEmptySubscriber.onNext(FluxSwitchIfEmpty.java:74) ~[reactor-core-3.4.10.jar:3.4.10]
	at reactor.core.publisher.Operators$MonoSubscriber.complete(Operators.java:1816) ~[reactor-core-3.4.10.jar:3.4.10]
	at reactor.core.publisher.MonoFlatMap$FlatMapInner.onNext(MonoFlatMap.java:249) ~[reactor-core-3.4.10.jar:3.4.10]
	at reactor.core.publisher.MonoIgnoreThen$ThenIgnoreMain.complete(MonoIgnoreThen.java:284) ~[reactor-core-3.4.10.jar:3.4.10]
	at reactor.core.publisher.MonoIgnoreThen$ThenIgnoreMain.onNext(MonoIgnoreThen.java:187) ~[reactor-core-3.4.10.jar:3.4.10]
	at reactor.core.publisher.MonoIgnoreThen$ThenIgnoreMain.subscribeNext(MonoIgnoreThen.java:232) ~[reactor-core-3.4.10.jar:3.4.10]
	at reactor.core.publisher.MonoIgnoreThen$ThenIgnoreMain.onComplete(MonoIgnoreThen.java:203) ~[reactor-core-3.4.10.jar:3.4.10]
	at reactor.core.publisher.MonoIgnoreElements$IgnoreElementsSubscriber.onComplete(MonoIgnoreElements.java:89) ~[reactor-core-3.4.10.jar:3.4.10]
	at reactor.core.publisher.FluxPeek$PeekSubscriber.onComplete(FluxPeek.java:260) ~[reactor-core-3.4.10.jar:3.4.10]
	at reactor.core.publisher.FluxDematerialize$DematerializeSubscriber.onComplete(FluxDematerialize.java:121) ~[reactor-core-3.4.10.jar:3.4.10]
	at reactor.core.publisher.FluxDematerialize$DematerializeSubscriber.onNext(FluxDematerialize.java:91) ~[reactor-core-3.4.10.jar:3.4.10]
	at reactor.core.publisher.FluxDematerialize$DematerializeSubscriber.onNext(FluxDematerialize.java:44) ~[reactor-core-3.4.10.jar:3.4.10]
	at reactor.core.publisher.FluxIterable$IterableSubscription.fastPath(FluxIterable.java:340) ~[reactor-core-3.4.10.jar:3.4.10]
	at reactor.core.publisher.FluxIterable$IterableSubscription.request(FluxIterable.java:227) ~[reactor-core-3.4.10.jar:3.4.10]
	at reactor.core.publisher.FluxDematerialize$DematerializeSubscriber.request(FluxDematerialize.java:127) ~[reactor-core-3.4.10.jar:3.4.10]
	at reactor.core.publisher.FluxPeek$PeekSubscriber.request(FluxPeek.java:138) ~[reactor-core-3.4.10.jar:3.4.10]
	at reactor.core.publisher.MonoIgnoreElements$IgnoreElementsSubscriber.onSubscribe(MonoIgnoreElements.java:72) ~[reactor-core-3.4.10.jar:3.4.10]
	at reactor.core.publisher.FluxPeek$PeekSubscriber.onSubscribe(FluxPeek.java:171) ~[reactor-core-3.4.10.jar:3.4.10]
	at reactor.core.publisher.FluxDematerialize$DematerializeSubscriber.onSubscribe(FluxDematerialize.java:77) ~[reactor-core-3.4.10.jar:3.4.10]
	at reactor.core.publisher.FluxIterable.subscribe(FluxIterable.java:165) ~[reactor-core-3.4.10.jar:3.4.10]
	at reactor.core.publisher.FluxIterable.subscribe(FluxIterable.java:87) ~[reactor-core-3.4.10.jar:3.4.10]
	at reactor.core.publisher.Mono.subscribe(Mono.java:4361) ~[reactor-core-3.4.10.jar:3.4.10]
	at reactor.core.publisher.MonoIgnoreThen$ThenIgnoreMain.subscribeNext(MonoIgnoreThen.java:255) ~[reactor-core-3.4.10.jar:3.4.10]
	at reactor.core.publisher.MonoIgnoreThen.subscribe(MonoIgnoreThen.java:51) ~[reactor-core-3.4.10.jar:3.4.10]
	at reactor.core.publisher.MonoFlatMap$FlatMapMain.onNext(MonoFlatMap.java:157) ~[reactor-core-3.4.10.jar:3.4.10]
	at reactor.core.publisher.Operators$MonoSubscriber.complete(Operators.java:1816) ~[reactor-core-3.4.10.jar:3.4.10]
	at reactor.core.publisher.MonoCollectList$MonoCollectListSubscriber.onComplete(MonoCollectList.java:128) ~[reactor-core-3.4.10.jar:3.4.10]
	at reactor.core.publisher.DrainUtils.postCompleteDrain(DrainUtils.java:132) ~[reactor-core-3.4.10.jar:3.4.10]
	at reactor.core.publisher.DrainUtils.postComplete(DrainUtils.java:187) ~[reactor-core-3.4.10.jar:3.4.10]
	at reactor.core.publisher.FluxMaterialize$MaterializeSubscriber.onComplete(FluxMaterialize.java:141) ~[reactor-core-3.4.10.jar:3.4.10]
	at reactor.core.publisher.FluxTake$TakeSubscriber.onComplete(FluxTake.java:153) ~[reactor-core-3.4.10.jar:3.4.10]
	at reactor.core.publisher.FluxTake$TakeSubscriber.onNext(FluxTake.java:133) ~[reactor-core-3.4.10.jar:3.4.10]
	at reactor.core.publisher.FluxOnErrorResume$ResumeSubscriber.onNext(FluxOnErrorResume.java:79) ~[reactor-core-3.4.10.jar:3.4.10]
	at reactor.core.publisher.SerializedSubscriber.onNext(SerializedSubscriber.java:99) ~[reactor-core-3.4.10.jar:3.4.10]
	at reactor.core.publisher.FluxTimeout$TimeoutMainSubscriber.onNext(FluxTimeout.java:180) ~[reactor-core-3.4.10.jar:3.4.10]
	at reactor.core.publisher.Operators$MonoSubscriber.complete(Operators.java:1816) ~[reactor-core-3.4.10.jar:3.4.10]
	at reactor.core.publisher.MonoCollectList$MonoCollectListSubscriber.onComplete(MonoCollectList.java:128) ~[reactor-core-3.4.10.jar:3.4.10]
	at org.springframework.cloud.commons.publisher.FluxFirstNonEmptyEmitting$FirstNonEmptyEmittingSubscriber.onComplete(FluxFirstNonEmptyEmitting.java:325) ~[spring-cloud-commons-3.1.0-SNAPSHOT.jar:3.1.0-SNAPSHOT]
	at reactor.core.publisher.FluxSubscribeOn$SubscribeOnSubscriber.onComplete(FluxSubscribeOn.java:166) ~[reactor-core-3.4.10.jar:3.4.10]
	at reactor.core.publisher.Operators$MultiSubscriptionSubscriber.onComplete(Operators.java:2058) ~[reactor-core-3.4.10.jar:3.4.10]
	at reactor.core.publisher.FluxIterable$IterableSubscription.fastPath(FluxIterable.java:362) ~[reactor-core-3.4.10.jar:3.4.10]
	at reactor.core.publisher.FluxIterable$IterableSubscription.request(FluxIterable.java:227) ~[reactor-core-3.4.10.jar:3.4.10]
	at reactor.core.publisher.Operators$MultiSubscriptionSubscriber.set(Operators.java:2194) ~[reactor-core-3.4.10.jar:3.4.10]
	at reactor.core.publisher.FluxOnErrorResume$ResumeSubscriber.onSubscribe(FluxOnErrorResume.java:74) ~[reactor-core-3.4.10.jar:3.4.10]
	at reactor.core.publisher.FluxIterable.subscribe(FluxIterable.java:165) ~[reactor-core-3.4.10.jar:3.4.10]
	at reactor.core.publisher.FluxIterable.subscribe(FluxIterable.java:87) ~[reactor-core-3.4.10.jar:3.4.10]
	at reactor.core.publisher.FluxDefer.subscribe(FluxDefer.java:54) ~[reactor-core-3.4.10.jar:3.4.10]
	at reactor.core.publisher.InternalFluxOperator.subscribe(InternalFluxOperator.java:62) ~[reactor-core-3.4.10.jar:3.4.10]
	at reactor.core.publisher.FluxSubscribeOn$SubscribeOnSubscriber.run(FluxSubscribeOn.java:194) ~[reactor-core-3.4.10.jar:3.4.10]
	at reactor.core.scheduler.WorkerTask.call(WorkerTask.java:84) ~[reactor-core-3.4.10.jar:3.4.10]
	at reactor.core.scheduler.WorkerTask.call(WorkerTask.java:37) ~[reactor-core-3.4.10.jar:3.4.10]
	at java.base/java.util.concurrent.FutureTask.run(FutureTask.java:264) ~[na:na]
	at java.base/java.util.concurrent.ScheduledThreadPoolExecutor$ScheduledFutureTask.run(ScheduledThreadPoolExecutor.java:304) ~[na:na]
	at java.base/java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1130) ~[na:na]
	at java.base/java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:630) ~[na:na]
	at java.base/java.lang.Thread.run(Thread.java:831) ~[na:na]
Caused by: java.lang.UnsatisfiedLinkError: 'io.netty.resolver.dns.macos.DnsResolver[] io.netty.resolver.dns.macos.MacOSDnsServerAddressStreamProvider.resolvers()'
	at io.netty.resolver.dns.macos.MacOSDnsServerAddressStreamProvider.resolvers(Native Method) ~[netty-resolver-dns-native-macos-4.1.68.Final.jar:4.1.68.Final]
	at io.netty.resolver.dns.macos.MacOSDnsServerAddressStreamProvider.retrieveCurrentMappings(MacOSDnsServerAddressStreamProvider.java:127) ~[netty-resolver-dns-native-macos-4.1.68.Final.jar:4.1.68.Final]
	at io.netty.resolver.dns.macos.MacOSDnsServerAddressStreamProvider.<init>(MacOSDnsServerAddressStreamProvider.java:123) ~[netty-resolver-dns-native-macos-4.1.68.Final.jar:4.1.68.Final]
	... 91 common frames omitted

` > @normanmaurer do you have any workaround or any idea when M1 will be supported?

I use implementation(group = "io.netty",name = "netty-resolver-dns-native-macos", version = "4.1.70.Final", classifier = "osx-aarch_64") Same problem with M1 macbook.  Tried this but didn't help: 

```
<dependency>
                <groupId>io.netty</groupId>
                <artifactId>netty-resolver-dns-native-macos</artifactId>
                <version>4.1.72.Final</version>
                <classifier>osx-aarch_64</classifier>
</dependency>
``` > Same problem with M1 macbook. Tried this but didn't help:
> 
> ```
> <dependency>
>                 <groupId>io.netty</groupId>
>                 <artifactId>netty-resolver-dns-native-macos</artifactId>
>                 <version>4.1.72.Final</version>
>                 <classifier>osx-aarch_64</classifier>
> </dependency>
> ```

works fine for me on spring boot 2.5.3 You could also use the following code to fix an error

```
<dependency>
    <groupId>io.netty</groupId>
    <artifactId>netty-all</artifactId>
</dependency>
```

https://stackoverflow.com/a/65976398/3001953 I have this problem on M1 MacOS with latest Spring Boot I have this problem on M1 MacOS with Spring boot 2.5.5 use below dependency for M1 based mac, it works for me.
implementation 'io.netty:netty-resolver-dns-native-macos:4.1.72.Final:osx-aarch_64'
 > use below dependency for M1 based mac, it works for me.
> implementation 'io.netty:netty-resolver-dns-native-macos:4.1.72.Final:osx-aarch_64'

I test on M1 Mac and deploy to a Docker image that runs on x86. Sorry for my stupid question: How can I include above dependency during development and exclude it from my production Docker image? @ksilz there is no need to exclude as it will just not use it on linux if you use linux.  If you run on Mac x86 on prod you will need to use the correct classifier when deploying.  Adding this resolved my issue with M1. This <classifier>osx-x86_64</classifier> did not work until i switched to below.
```

  <dependency>
      <groupId>io.netty</groupId>
      <artifactId>netty-resolver-dns-native-macos</artifactId>
      <version>4.1.73.Final</version>
      <classifier>osx-aarch_64</classifier>
  </dependency>
``` > use below dependency for M1 based mac, it works for me. implementation 'io.netty:netty-resolver-dns-native-macos:4.1.72.Final:osx-aarch_64'

It works for me


<dependency>
    <groupId>io.netty</groupId>
    <artifactId>netty-resolver-dns-native-macos</artifactId>
    <version>4.1.73.Final</version>
    <classifier>osx-aarch_64</classifier>
</dependency> io.netty netty-resolver-dns-native-macos 4.1.73.Final osx-aarch_64 doesnt work on my M1 pro machine with Spring Boot 2.6.1. Are there any updates planned?  

**Update:** io.netty:netty-all:4.1.73.Final works on my M1 pro with Spring Boot 2.6.1 I'm using OSX on Intel and I'm having the same problem when I try to run Spring Boot above 2.6.1. Spring Boot 2.6.1 works though. Adding the above mentioned package did not solve the issue for me. M1 mac os:
1. exclude netty-resolver-dns-native-macos
2. add  classifier of osx-aarch_64.
 `<dependency>
            <groupId>io.projectreactor.netty</groupId>
            <artifactId>reactor-netty-core</artifactId>
            <exclusions>
                <exclusion>
                    <groupId>io.netty</groupId>
                    <artifactId>netty-resolver-dns-native-macos</artifactId>
                </exclusion>
            </exclusions>
        </dependency>
        <dependency>
            <groupId>io.netty</groupId>
            <artifactId>netty-resolver-dns-native-macos</artifactId>
            <version>4.1.72.Final</version>
            <classifier>osx-aarch_64</classifier>
        </dependency>` I am using on a MacBook Pro (x86_64) with Spring Boot 2.5.9, and spring-boot-starter-webflux 2.5.9 already pull in the native macos jar, but my running system cannot load it.  I tried excluding the one from webflux and adding it directly, but it still doesn't work.  Are there any other suggestions? To ensure a more timely response, please reply to this email with your POM file.I will resolve this question for you soon.发自我的iPhone------------------ Original ------------------From: Bryan Pugh  ***@***.***>Date: Fri, Feb 18, 2022 8:26 AMTo: netty/netty ***@***.***>Cc: wanglianglike ***@***.***>, Comment ***@***.***>Subject: Re: [netty/netty] Unable to loadio.netty.resolver.dns.macos.MacOSDnsServerAddressStreamProvider (#11020)
I am using on a MacBook Pro (x86_64) with Spring Book 2.5.9, and spring-boot-starter-webflux 2.5.9 already pull in the native macos jar, but my running system cannot load it.  I tried excluding the one from webflux and adding it directly, but it still doesn't work.  Are there any other suggestions?

—Reply to this email directly, view it on GitHub, or unsubscribe.Triage notifications on the go with GitHub Mobile for iOS or Android.
You are receiving this because you commented.Message ID: ***@***.***>
[
{
***@***.***": "http://schema.org",
***@***.***": "EmailMessage",
"potentialAction": {
***@***.***": "ViewAction",
"target": "https://github.com/netty/netty/issues/11020#issuecomment-1043672377",
"url": "https://github.com/netty/netty/issues/11020#issuecomment-1043672377",
"name": "View Issue"
},
"description": "View this Issue on GitHub",
"publisher": {
***@***.***": "Organization",
"name": "GitHub",
"url": "https://github.com"
}
}
] I fixed the problem by upgrading from JDK 11.0.4 to 11.0.11. > I fixed the problem by upgrading from JDK 11.0.4 to 11.0.11.

I can reproduce this problem on openjdk 17.0.2. > > I fixed the problem by upgrading from JDK 11.0.4 to 11.0.11.
> 
> I can reproduce this problem on openjdk 17.0.2.

I am using openjdk version "17.0.2", spring boot '3.0.0-SNAPSHOT' and still getting this exception on M1. Also tried with above fix but not working for me. > 

this work for me, thank you > You could also use the following code to fix an error
> 
> ```
> <dependency>
>     <groupId>io.netty</groupId>
>     <artifactId>netty-all</artifactId>
> </dependency>
> ```
> 
> https://stackoverflow.com/a/65976398/3001953
This fixed the issue on my MacBook Pro M1
 > Same problem with M1 macbook. Tried this but didn't help:
> 
> ```
> <dependency>
>                 <groupId>io.netty</groupId>
>                 <artifactId>netty-resolver-dns-native-macos</artifactId>
>                 <version>4.1.72.Final</version>
>                 <classifier>osx-aarch_64</classifier>
> </dependency>
> ```

this worked for me The dependency has only runtime scope:

`runtimeOnly "io.netty:netty-resolver-dns-native-macos:4.1.76.Final:osx-aarch_64"`

How can we make this dependency platform agnostic?
We don't really want to have a platform dependency in our java builds. I added `runtimeOnly("io.netty:netty-resolver-dns-native-macos:4.1.77.Final:osx-aarch_64")` to my dependencies and still facing the issue. I played a little bit around with different versions of both netty and SpringBoot but nothing helps so far. I have an M1 chip on a MB Pro 2020. Any ideas on that? I have this problem on M1 MacOS with Spring boot 2.6.7 Even when adding the correct version maven or gradle in the end might resolve to another version.
To validate the version you need to look into the resulting dependency tree.

```
mvn dependency:tree
gradle dependencies
```
 > I have this problem on M1 MacOS with Spring boot 2.6.7

Same issue with spring boot 2.7.0 too I got it to work on my M1 Pro but none of the solutions above worked for me. The switch to Spring Boot 2.6.7 triggered the DNS resolver issue. I've had to override the dependency with the version below to get it to work locally (Spring Boot 2.6.7 provides 1.0.18):
`        <dependency>
            <groupId>io.projectreactor.netty</groupId>
            <artifactId>reactor-netty</artifactId>
            <version>0.9.20.RELEASE</version>
        </dependency>`

Going for an older version doesn't seem ideal though... workaround

```kotlin
// build.gradle.ktx

dependencies {
  
  // ...

  // mac silicon only
  // https://github.com/apache/commons-lang/blob/master/src/main/java/org/apache/commons/lang3/SystemUtils.java#L1173
  val isMacOS: Boolean = System.getProperty("os.name").startsWith("Mac OS X")
  val architecture = System.getProperty("os.arch").toLowerCase()
  if (isMacOS && architecture == "aarch64") {
    developmentOnly("io.netty:netty-resolver-dns-native-macos:4.1.68.Final:osx-aarch_64")
  }

  // ...

}
``` this works for me
`implementation 'io.netty:netty-all'`
`implementation(group: "io.netty", name: "netty-resolver-dns-native-macos", version: "4.1.72.Final", classifier: "osx-aarch_64")` It looks like this is an issue in [io.projectreactor.netty:reactor-netty-http:1.0.22](https://search.maven.org/artifact/io.projectreactor.netty/reactor-netty-http/1.0.22/jar), because that has a hardcoded dependency on `io.netty:netty-resolver-dns-native-macos` with classifier `osx-x86_64`. For Maven the workaround looks like following:
`
<dependency>
            <groupId>org.springframework.boot</groupId>
            <artifactId>spring-boot-starter-webflux</artifactId>
            <exclusions>
                <exclusion>
                    <groupId>io.netty</groupId>
                    <artifactId>netty-resolver-dns-native-macos</artifactId>
                </exclusion>
            </exclusions>
        </dependency>
        <dependency>
            <groupId>io.netty</groupId>
            <artifactId>netty-resolver-dns-native-macos</artifactId>
            <version>4.1.73.Final</version>
            <classifier>osx-aarch_64</classifier>
        </dependency>
`
First exclude the referenced library. And then add it explicit with the classifier. Worked on M2 chip MacBook Pro 2022. If you don't want to include native support properly (arm & intel) you should scope the dependency not as "implementation" but rather as "compileOnly" - (talking gradle slang :-) and document which dependencies can be included optionally. In Gradle, you can use [osdetector-gradle-plugin](https://github.com/google/osdetector-gradle-plugin) to fetch dependencies for specific platforms:

```kotlin
// build.gradle.kts

plugins {
    id("com.google.osdetector") version "1.7.1"
}

dependencies {
    if (osdetector.classifier == "osx-aarch_64") {
        runtimeOnly("io.netty:netty-resolver-dns-native-macos:4.1.77.Final:${osdetector.classifier}")
    }
}
``` > I still get this issue on an Apple M1. I guess there needs to be a DnsServer provider that supports the M1?
me too M1 ,   i use this pom solve this problem. 

artifactId like this 
        <dependency>
            <groupId>io.netty</groupId>
            <artifactId>netty-all</artifactId>
            <version>4.1.84.Final</version>
        </dependency> > <dependency> <groupId>org.springframework.boot</groupId> <artifactId>spring-boot-starter-webflux</artifactId> <exclusions> <exclusion> <groupId>io.netty</groupId> <artifactId>netty-resolver-dns-native-macos</artifactId> </exclusion> </exclusions> </dependency> <dependency> <groupId>io.netty</groupId> <artifactId>netty-resolver-dns-native-macos</artifactId> <version>4.1.73.Final</version> <classifier>osx-aarch_64</classifier> </dependency>

This has worked for me - M1 Pro 2022 > In Gradle, you can use [osdetector-gradle-plugin](https://github.com/google/osdetector-gradle-plugin) to fetch dependencies for specific platforms:
> 
> ```kotlin
> // build.gradle.kts
> 
> plugins {
>     id("com.google.osdetector") version "1.7.1"
> }
> 
> dependencies {
>     if (osdetector.classifier == "osx-aarch_64") {
>         runtimeOnly("io.netty:netty-resolver-dns-native-macos:4.1.77.Final:${osdetector.classifier}")
>     }
> }
> ```

Note that if you deploy on a different OS/arch than the one you build on, this doesn't really solve the issue. This resolver is a runtime component, so the OS/arch of the build machine is not necessarily the same.

However, I don't believe it's a problem to just include resolvers for multiple architectures in your application. The one to use will be resolved at runtime. **PROBLEM with null**

We have issues with Webflux and get null as a response (both in the console in our react native project and in Postman). 

We have macos M1 and run the application with Spring boot version 3.0.0. We have added below mentioned dependency and it removed the bug with failed build. 
<dependency>
            <groupId>io.netty</groupId>
            <artifactId>netty-resolver-dns-native-macos</artifactId>
            <version>4.1.86.Final</version>
            <classifier>osx-aarch_64</classifier>
</dependency>

We have used Webflux before and it worked like a charm with above mentioned dependency, but that project was run with Spring boot version 2.7.5. 

I have no idea if this matters at all, but I should also mention that we use Jakarta to serialize our entity objects. 

Our friend that uses PC has no problems with the serialization.

Any ideas on what we might have done wrong? We get no error messages so, unfortunately, there is nothing to show.
Thanks in advance for any suggestions on how to move forward! I have this error today without knowing why, I tried every step here and nothing worked. I had trouble with an API key to google, which was an underlying problem. And when that was fixed, I used this and made it work: 
        <dependency>
            <groupId>io.netty</groupId>
            <artifactId>netty-resolver-dns-native-macos</artifactId>
            <version>4.1.76.Final</version>
            <classifier>osx-aarch_64</classifier>
        </dependency>

Hope it works out for you AlexLombry! For maven and a project where this is only needed for local development on machines running mac M1 you can use a profile activated based on the OS:
```
        <profile>
            <id>macos-m1</id>
            <activation>
                <os>
                    <family>mac</family>
                    <arch>aarch64</arch>
                </os>
            </activation>
            <dependencies>
                <dependency>
                    <groupId>io.netty</groupId>
                    <artifactId>netty-resolver-dns-native-macos</artifactId>
                    <classifier>osx-aarch_64</classifier>
                </dependency>
            </dependencies>
        </profile>
``` mac M1 with build.gradle.kts

```kts
    testImplementation(
        group = "io.netty",
        name = "netty-resolver-dns-native-macos",
        classifier = "osx-aarch_64"
    )
``` > mac M1 with build.gradle.kts
> 
> ```kotlin
>     testImplementation(
>         group = "io.netty",
>         name = "netty-resolver-dns-native-macos",
>         classifier = "osx-aarch_64"
>     )
> ```

Thanks!  This worked for me.  I also locked mine to Mac M1 machines only since we use different kinds of machines here at work:
```groovy
	def isMacOS = System.getProperty('os.name').startsWith('Mac OS X')
	def architecture = System.getProperty('os.arch').toLowerCase()
	if (isMacOS && architecture == 'aarch64') {
		testImplementation('io.netty:netty-resolver-dns-native-macos:4.1.90.Final:osx-aarch_64')
	}
``` > For maven and a project where this is only needed for local development on machines running mac M1 you can use a profile activated based on the OS:
> 
> ```
>         <profile>
>             <id>macos-m1</id>
>             <activation>
>                 <os>
>                     <family>mac</family>
>                     <arch>aarch64</arch>
>                 </os>
>             </activation>
>             <dependencies>
>                 <dependency>
>                     <groupId>io.netty</groupId>
>                     <artifactId>netty-resolver-dns-native-macos</artifactId>
>                     <classifier>osx-aarch_64</classifier>
>                 </dependency>
>             </dependencies>
>         </profile>
> ```

~~FYI: Maven doesn't allow to declare dependencies in this place. Unfortunately the single solution is to declare this dependency with classifier `osx-aarch_64` per project or in some parent POM.~~

Wrong, see below. According to https://maven.apache.org/guides/introduction/introduction-to-profiles.html#Profiles_in_POMs Maven profiles can modify `<dependencies>`. > According to https://maven.apache.org/guides/introduction/introduction-to-profiles.html#Profiles_in_POMs Maven profiles can modify `<dependencies>`.

Hmmm, you're right. Seems that it works **only** when used in some of the project's POMs, but doesn't work outside the project e.g. in the user's `settings.xml` 🤔 Yeah, this method worked for me when used in the project's POM. Fellows,

I've stumbled upon this in my project recently. My two cents: while I do develop things on my M1 Mac, and this is an annoying issue, I never intend to run a production environment on my laptop 😂. With that been said, how do I make sure that the problem won't bite me when I deploy my code to a cloud provider?  

Any reflection on the 👆🏻 is greatly appreciated! 


  @singulart As far as I can see the code will only be loaded on an ARM Mac and it's also a pretty small library, so it should be harmless to add the dependency by default. Or, assuming your CI hardware is not ARM Mac, you can add the dependency only when building on ARM Macs using an auto-activating Maven profile like this:

```
<profile>
  <id>netty-resolver-dns-native-macos-aarch64</id>
  <activation>
    <os>
      <family>mac</family>
      <arch>aarch64</arch>
    </os>
  </activation>
  <dependencies>
    <dependency>
      <groupId>io.netty</groupId>
      <artifactId>netty-resolver-dns-native-macos</artifactId>
      <classifier>osx-aarch_64</classifier>
    </dependency>
  </dependencies>
</profile>
```     implementation('io.netty:netty-resolver-dns-native-macos')
This worked for me today > io.netty netty-resolver-dns-native-macos 4.1.73.Final osx-aarch_64 doesnt work on my M1 pro machine with Spring Boot 2.6.1. Are there any updates planned?
> 
> **Update:** io.netty:netty-all:4.1.73.Final works on my M1 pro with Spring Boot 2.6.1

This worked for me... thanks! 
 ERROR 2481 --- [API-GATEWAY] [ender@6e0b642c}] [                                                 ] i.n.r.d.DnsServerAddressStreamProviders  : Unable to load io.netty.resolver.dns.macos.MacOSDnsServerAddressStreamProvider, fallback to system defaults. This may result in incorrect DNS resolutions on MacOS. Check whether you have a dependency on 'io.netty:netty-resolver-dns-native-macos'. Use DEBUG level to see the full stack: java.lang.UnsatisfiedLinkError: failed to load the required native library 

Getting the above error when i am using Spring Reactive Web dependancy on my spring boot microservice to create API-GATEWAY. I am using it on Macbook air M1 laptop. tried adding the following dependancy and other possible solutions like creating profile but it is not fixing my issue.  
<dependency>
  <groupId>io.netty</groupId>
  <artifactId>netty-resolver-dns-native-macos</artifactId>
  <classifier>osx-aarch_64</classifier>
</dependency> 

Please suggest me ,  how i can resolve this issue.  # following setup works. 

Apple M1/Sonama 14.4.1 
Java : 17-Temurin 
Spring Boot: 3.2.4 
Azure, Postgresql 

works fine. latest versions are not working. fyi. 

```xml
           <dependency>
                <groupId>io.projectreactor.netty</groupId>
                <artifactId>reactor-netty-http</artifactId>
                <version>1.0.39</version>
            </dependency>
            <dependency>
                <groupId>io.projectreactor.netty</groupId>
                <artifactId>reactor-netty-core</artifactId>
                <version>1.0.39</version>
            </dependency>
        <dependency>
            <groupId>io.netty</groupId>
            <artifactId>netty-resolver-dns-native-macos</artifactId>
            <classifier>osx-aarch_64</classifier>
        </dependency>
``` ~~Mac M3 this is work for me~~

```
<dependency>
      <groupId>io.netty</groupId>
      <artifactId>netty-resolver-dns-native-macos</artifactId>
      <classifier>${os.detected.classifier}</classifier>
    </dependency>

<build>
    <extensions>
        <extension>
          <groupId>kr.motd.maven</groupId>
          <artifactId>os-maven-plugin</artifactId>
          <version>1.7.1</version>
        </extension>
    </extensions>
  </build>
```

:cry: It look like  os.detected.classifier can not used in dependency tag.... 

try https://github.com/netty/netty/issues/11020#issuecomment-1570501849

 > Mac M3 this is work for me
> 
> ```
>     <dependency>
>       <groupId>io.netty</groupId>
>       <artifactId>netty-resolver-dns-native-macos</artifactId>
>       <classifier>${os.detected.classifier}</classifier>
>     </dependency>
>   </dependencies>
> 
>   <build>
>     <extensions>
>         <extension>
>           <groupId>kr.motd.maven</groupId>
>           <artifactId>os-maven-plugin</artifactId>
>           <version>1.7.1</version>
>         </extension>
>     </extensions>
>   </build>
> ```

@shalk You're making the `classifier` dynamic based on OS but `artifactId` contains a static `macos` part 😬 

Moreover you're adding an additional Maven extension which currently has "just" 293 starts...

@breun 's solution with a Maven profile and `activation` block is more robust and thought out, at least in my opinion. > Moreover you're adding an additional Maven plugin which currently has "just" 293 starts...

The extension is maintained by @trustin, and we use it in Netty.
```suggestion
                        + "incorrect DNS resolutions on MacOS. Check whether you have a dependency on "
``` ```suggestion
                        + "incorrect DNS resolutions on MacOS. Check whether you have a dependency on "
``` thanks thanks
Unable to load io.netty.resolver.dns.macos.MacOSDnsServerAddressStreamProvider
### Expected behavior
Spring Cloud Gateway microservice (api-gateway) should route to appropriate microservice (web) using Eureka Discovery Server microservice (discovery) and return "Hello World".

### Actual behavior
```
2021-02-12 15:31:29.621  INFO 8598 --- [           main] com.example.demo.ApiGatewayApplication   : Started ApiGatewayApplication in 3.165 seconds (JVM running for 3.989)
Available Services:
web
2021-02-12 15:31:49.069  WARN 8598 --- [ctor-http-nio-2] i.n.r.d.DnsServerAddressStreamProviders  : Unable to load io.netty.resolver.dns.macos.MacOSDnsServerAddressStreamProvider, fallback to system defaults. This may result in incorrect DNS resolutions on MacOS.

java.lang.reflect.InvocationTargetException: null
	at java.base/jdk.internal.reflect.NativeConstructorAccessorImpl.newInstance0(Native Method) ~[na:na]
	at java.base/jdk.internal.reflect.NativeConstructorAccessorImpl.newInstance(NativeConstructorAccessorImpl.java:64) ~[na:na]
	at java.base/jdk.internal.reflect.DelegatingConstructorAccessorImpl.newInstance(DelegatingConstructorAccessorImpl.java:45) ~[na:na]
	at java.base/java.lang.reflect.Constructor.newInstanceWithCaller(Constructor.java:500) ~[na:na]
	at java.base/java.lang.reflect.Constructor.newInstance(Constructor.java:481) ~[na:na]
	at io.netty.resolver.dns.DnsServerAddressStreamProviders.<clinit>(DnsServerAddressStreamProviders.java:64) ~[netty-resolver-dns-4.1.58.Final.jar:4.1.58.Final]
	at io.netty.resolver.dns.DnsNameResolverBuilder.<init>(DnsNameResolverBuilder.java:58) ~[netty-resolver-dns-4.1.58.Final.jar:4.1.58.Final]
	at reactor.netty.transport.NameResolverProvider.newNameResolverGroup(NameResolverProvider.java:405) ~[reactor-netty-core-1.0.3.jar:1.0.3]
	at reactor.netty.transport.ClientTransportConfig.getOrCreateDefaultResolver(ClientTransportConfig.java:230) ~[reactor-netty-core-1.0.3.jar:1.0.3]
	at reactor.netty.transport.ClientTransportConfig.resolverInternal(ClientTransportConfig.java:216) ~[reactor-netty-core-1.0.3.jar:1.0.3]
	at reactor.netty.http.client.HttpClientConfig.resolverInternal(HttpClientConfig.java:420) ~[reactor-netty-http-1.0.3.jar:1.0.3]
	at reactor.netty.http.client.HttpClientConnect$MonoHttpConnect.lambda$subscribe$0(HttpClientConnect.java:262) ~[reactor-netty-http-1.0.3.jar:1.0.3]
	at reactor.netty.http.client.HttpClientConnect$MonoHttpConnect$$Lambda$880/0x0000000058616148.accept(Unknown Source) ~[na:na]
	at reactor.core.publisher.MonoCreate.subscribe(MonoCreate.java:57) ~[reactor-core-3.4.2.jar:3.4.2]
	at reactor.core.publisher.FluxRetryWhen.subscribe(FluxRetryWhen.java:76) ~[reactor-core-3.4.2.jar:3.4.2]
	at reactor.core.publisher.MonoRetryWhen.subscribeOrReturn(MonoRetryWhen.java:46) ~[reactor-core-3.4.2.jar:3.4.2]
	at reactor.core.publisher.InternalMonoOperator.subscribe(InternalMonoOperator.java:57) ~[reactor-core-3.4.2.jar:3.4.2]
	at reactor.netty.http.client.HttpClientConnect$MonoHttpConnect.subscribe(HttpClientConnect.java:269) ~[reactor-netty-http-1.0.3.jar:1.0.3]
	at reactor.core.publisher.Flux.subscribe(Flux.java:8147) ~[reactor-core-3.4.2.jar:3.4.2]
	at reactor.core.publisher.MonoIgnoreThen$ThenIgnoreMain.drain(MonoIgnoreThen.java:173) ~[reactor-core-3.4.2.jar:3.4.2]
	at reactor.core.publisher.MonoIgnoreThen.subscribe(MonoIgnoreThen.java:56) ~[reactor-core-3.4.2.jar:3.4.2]
	at reactor.core.publisher.MonoDefer.subscribe(MonoDefer.java:52) ~[reactor-core-3.4.2.jar:3.4.2]
	at reactor.core.publisher.MonoDefer.subscribe(MonoDefer.java:52) ~[reactor-core-3.4.2.jar:3.4.2]
	at reactor.core.publisher.MonoIgnoreThen$ThenIgnoreMain.drain(MonoIgnoreThen.java:154) ~[reactor-core-3.4.2.jar:3.4.2]
	at reactor.core.publisher.MonoIgnoreThen.subscribe(MonoIgnoreThen.java:56) ~[reactor-core-3.4.2.jar:3.4.2]
	at reactor.core.publisher.InternalMonoOperator.subscribe(InternalMonoOperator.java:64) ~[reactor-core-3.4.2.jar:3.4.2]
	at reactor.core.publisher.MonoDefer.subscribe(MonoDefer.java:52) ~[reactor-core-3.4.2.jar:3.4.2]
	at reactor.core.publisher.MonoDefer.subscribe(MonoDefer.java:52) ~[reactor-core-3.4.2.jar:3.4.2]
	at reactor.core.publisher.MonoDefer.subscribe(MonoDefer.java:52) ~[reactor-core-3.4.2.jar:3.4.2]
	at reactor.core.publisher.Mono.subscribe(Mono.java:4046) ~[reactor-core-3.4.2.jar:3.4.2]
	at reactor.core.publisher.MonoIgnoreThen$ThenIgnoreMain.drain(MonoIgnoreThen.java:173) ~[reactor-core-3.4.2.jar:3.4.2]
	at reactor.core.publisher.MonoIgnoreThen.subscribe(MonoIgnoreThen.java:56) ~[reactor-core-3.4.2.jar:3.4.2]
	at reactor.core.publisher.InternalMonoOperator.subscribe(InternalMonoOperator.java:64) ~[reactor-core-3.4.2.jar:3.4.2]
	at reactor.core.publisher.MonoDefer.subscribe(MonoDefer.java:52) ~[reactor-core-3.4.2.jar:3.4.2]
	at reactor.core.publisher.MonoDefer.subscribe(MonoDefer.java:52) ~[reactor-core-3.4.2.jar:3.4.2]
	at reactor.core.publisher.InternalMonoOperator.subscribe(InternalMonoOperator.java:64) ~[reactor-core-3.4.2.jar:3.4.2]
	at reactor.core.publisher.MonoDefer.subscribe(MonoDefer.java:52) ~[reactor-core-3.4.2.jar:3.4.2]
	at reactor.core.publisher.Mono.subscribe(Mono.java:4046) ~[reactor-core-3.4.2.jar:3.4.2]
	at reactor.core.publisher.MonoIgnoreThen$ThenIgnoreMain.drain(MonoIgnoreThen.java:173) ~[reactor-core-3.4.2.jar:3.4.2]
	at reactor.core.publisher.MonoIgnoreThen.subscribe(MonoIgnoreThen.java:56) ~[reactor-core-3.4.2.jar:3.4.2]
	at reactor.core.publisher.MonoFlatMap$FlatMapMain.onNext(MonoFlatMap.java:157) ~[reactor-core-3.4.2.jar:3.4.2]
	at reactor.core.publisher.FluxSwitchIfEmpty$SwitchIfEmptySubscriber.onNext(FluxSwitchIfEmpty.java:73) ~[reactor-core-3.4.2.jar:3.4.2]
	at reactor.core.publisher.MonoNext$NextSubscriber.onNext(MonoNext.java:82) ~[reactor-core-3.4.2.jar:3.4.2]
	at reactor.core.publisher.FluxConcatMap$ConcatMapImmediate.innerNext(FluxConcatMap.java:281) ~[reactor-core-3.4.2.jar:3.4.2]
	at reactor.core.publisher.FluxConcatMap$ConcatMapInner.onNext(FluxConcatMap.java:860) ~[reactor-core-3.4.2.jar:3.4.2]
	at reactor.core.publisher.FluxMap$MapSubscriber.onNext(FluxMap.java:120) ~[reactor-core-3.4.2.jar:3.4.2]
	at reactor.core.publisher.FluxSwitchIfEmpty$SwitchIfEmptySubscriber.onNext(FluxSwitchIfEmpty.java:73) ~[reactor-core-3.4.2.jar:3.4.2]
	at reactor.core.publisher.Operators$MonoSubscriber.complete(Operators.java:1789) ~[reactor-core-3.4.2.jar:3.4.2]
	at reactor.core.publisher.MonoFlatMap$FlatMapMain.onNext(MonoFlatMap.java:151) ~[reactor-core-3.4.2.jar:3.4.2]
	at reactor.core.publisher.FluxMap$MapSubscriber.onNext(FluxMap.java:120) ~[reactor-core-3.4.2.jar:3.4.2]
	at reactor.core.publisher.MonoNext$NextSubscriber.onNext(MonoNext.java:82) ~[reactor-core-3.4.2.jar:3.4.2]
	at reactor.core.publisher.FluxConcatMap$ConcatMapImmediate.innerNext(FluxConcatMap.java:281) ~[reactor-core-3.4.2.jar:3.4.2]
	at reactor.core.publisher.FluxConcatMap$ConcatMapInner.onNext(FluxConcatMap.java:860) ~[reactor-core-3.4.2.jar:3.4.2]
	at reactor.core.publisher.FluxOnErrorResume$ResumeSubscriber.onNext(FluxOnErrorResume.java:79) ~[reactor-core-3.4.2.jar:3.4.2]
	at reactor.core.publisher.MonoPeekTerminal$MonoTerminalPeekSubscriber.onNext(MonoPeekTerminal.java:180) ~[reactor-core-3.4.2.jar:3.4.2]
	at reactor.core.publisher.Operators$MonoSubscriber.complete(Operators.java:1789) ~[reactor-core-3.4.2.jar:3.4.2]
	at reactor.core.publisher.MonoFilterWhen$MonoFilterWhenMain.onNext(MonoFilterWhen.java:149) ~[reactor-core-3.4.2.jar:3.4.2]
	at reactor.core.publisher.Operators$ScalarSubscription.request(Operators.java:2359) ~[reactor-core-3.4.2.jar:3.4.2]
	at reactor.core.publisher.MonoFilterWhen$MonoFilterWhenMain.onSubscribe(MonoFilterWhen.java:112) ~[reactor-core-3.4.2.jar:3.4.2]
	at reactor.core.publisher.MonoJust.subscribe(MonoJust.java:54) ~[reactor-core-3.4.2.jar:3.4.2]
	at reactor.core.publisher.Mono.subscribe(Mono.java:4046) ~[reactor-core-3.4.2.jar:3.4.2]
	at reactor.core.publisher.FluxConcatMap$ConcatMapImmediate.drain(FluxConcatMap.java:448) ~[reactor-core-3.4.2.jar:3.4.2]
	at reactor.core.publisher.FluxConcatMap$ConcatMapImmediate.onNext(FluxConcatMap.java:250) ~[reactor-core-3.4.2.jar:3.4.2]
	at reactor.core.publisher.FluxDematerialize$DematerializeSubscriber.onNext(FluxDematerialize.java:98) ~[reactor-core-3.4.2.jar:3.4.2]
	at reactor.core.publisher.FluxDematerialize$DematerializeSubscriber.onNext(FluxDematerialize.java:44) ~[reactor-core-3.4.2.jar:3.4.2]
	at reactor.core.publisher.FluxIterable$IterableSubscription.slowPath(FluxIterable.java:270) ~[reactor-core-3.4.2.jar:3.4.2]
	at reactor.core.publisher.FluxIterable$IterableSubscription.request(FluxIterable.java:228) ~[reactor-core-3.4.2.jar:3.4.2]
	at reactor.core.publisher.FluxDematerialize$DematerializeSubscriber.request(FluxDematerialize.java:127) ~[reactor-core-3.4.2.jar:3.4.2]
	at reactor.core.publisher.FluxConcatMap$ConcatMapImmediate.onSubscribe(FluxConcatMap.java:235) ~[reactor-core-3.4.2.jar:3.4.2]
	at reactor.core.publisher.FluxDematerialize$DematerializeSubscriber.onSubscribe(FluxDematerialize.java:77) ~[reactor-core-3.4.2.jar:3.4.2]
	at reactor.core.publisher.FluxIterable.subscribe(FluxIterable.java:164) ~[reactor-core-3.4.2.jar:3.4.2]
	at reactor.core.publisher.FluxIterable.subscribe(FluxIterable.java:86) ~[reactor-core-3.4.2.jar:3.4.2]
	at reactor.core.publisher.InternalFluxOperator.subscribe(InternalFluxOperator.java:62) ~[reactor-core-3.4.2.jar:3.4.2]
	at reactor.core.publisher.FluxDefer.subscribe(FluxDefer.java:54) ~[reactor-core-3.4.2.jar:3.4.2]
	at reactor.core.publisher.Mono.subscribe(Mono.java:4046) ~[reactor-core-3.4.2.jar:3.4.2]
	at reactor.core.publisher.FluxConcatMap$ConcatMapImmediate.drain(FluxConcatMap.java:448) ~[reactor-core-3.4.2.jar:3.4.2]
	at reactor.core.publisher.FluxConcatMap$ConcatMapImmediate.onSubscribe(FluxConcatMap.java:218) ~[reactor-core-3.4.2.jar:3.4.2]
	at reactor.core.publisher.FluxIterable.subscribe(FluxIterable.java:164) ~[reactor-core-3.4.2.jar:3.4.2]
	at reactor.core.publisher.FluxIterable.subscribe(FluxIterable.java:86) ~[reactor-core-3.4.2.jar:3.4.2]
	at reactor.core.publisher.InternalMonoOperator.subscribe(InternalMonoOperator.java:64) ~[reactor-core-3.4.2.jar:3.4.2]
	at reactor.core.publisher.MonoDefer.subscribe(MonoDefer.java:52) ~[reactor-core-3.4.2.jar:3.4.2]
	at reactor.core.publisher.InternalMonoOperator.subscribe(InternalMonoOperator.java:64) ~[reactor-core-3.4.2.jar:3.4.2]
	at reactor.core.publisher.MonoDefer.subscribe(MonoDefer.java:52) ~[reactor-core-3.4.2.jar:3.4.2]
	at reactor.core.publisher.Mono.subscribe(Mono.java:4046) ~[reactor-core-3.4.2.jar:3.4.2]
	at reactor.core.publisher.MonoIgnoreThen$ThenIgnoreMain.drain(MonoIgnoreThen.java:173) ~[reactor-core-3.4.2.jar:3.4.2]
	at reactor.core.publisher.MonoIgnoreThen.subscribe(MonoIgnoreThen.java:56) ~[reactor-core-3.4.2.jar:3.4.2]
	at reactor.core.publisher.InternalMonoOperator.subscribe(InternalMonoOperator.java:64) ~[reactor-core-3.4.2.jar:3.4.2]
	at reactor.netty.http.server.HttpServer$HttpServerHandle.onStateChange(HttpServer.java:860) ~[reactor-netty-http-1.0.3.jar:1.0.3]
	at reactor.netty.ReactorNetty$CompositeConnectionObserver.onStateChange(ReactorNetty.java:638) ~[reactor-netty-core-1.0.3.jar:1.0.3]
	at reactor.netty.transport.ServerTransport$ChildObserver.onStateChange(ServerTransport.java:475) ~[reactor-netty-core-1.0.3.jar:1.0.3]
	at reactor.netty.http.server.HttpServerOperations.onInboundNext(HttpServerOperations.java:525) ~[reactor-netty-http-1.0.3.jar:1.0.3]
	at reactor.netty.channel.ChannelOperationsHandler.channelRead(ChannelOperationsHandler.java:94) ~[reactor-netty-core-1.0.3.jar:1.0.3]
	at io.netty.channel.AbstractChannelHandlerContext.invokeChannelRead(AbstractChannelHandlerContext.java:379) ~[netty-transport-4.1.58.Final.jar:4.1.58.Final]
	at io.netty.channel.AbstractChannelHandlerContext.invokeChannelRead(AbstractChannelHandlerContext.java:365) ~[netty-transport-4.1.58.Final.jar:4.1.58.Final]
	at io.netty.channel.AbstractChannelHandlerContext.fireChannelRead(AbstractChannelHandlerContext.java:357) ~[netty-transport-4.1.58.Final.jar:4.1.58.Final]
	at reactor.netty.http.server.HttpTrafficHandler.channelRead(HttpTrafficHandler.java:209) ~[reactor-netty-http-1.0.3.jar:1.0.3]
	at io.netty.channel.AbstractChannelHandlerContext.invokeChannelRead(AbstractChannelHandlerContext.java:379) ~[netty-transport-4.1.58.Final.jar:4.1.58.Final]
	at io.netty.channel.AbstractChannelHandlerContext.invokeChannelRead(AbstractChannelHandlerContext.java:365) ~[netty-transport-4.1.58.Final.jar:4.1.58.Final]
	at io.netty.channel.AbstractChannelHandlerContext.fireChannelRead(AbstractChannelHandlerContext.java:357) ~[netty-transport-4.1.58.Final.jar:4.1.58.Final]
	at io.netty.channel.CombinedChannelDuplexHandler$DelegatingChannelHandlerContext.fireChannelRead(CombinedChannelDuplexHandler.java:436) ~[netty-transport-4.1.58.Final.jar:4.1.58.Final]
	at io.netty.handler.codec.ByteToMessageDecoder.fireChannelRead(ByteToMessageDecoder.java:324) ~[netty-codec-4.1.58.Final.jar:4.1.58.Final]
	at io.netty.handler.codec.ByteToMessageDecoder.channelRead(ByteToMessageDecoder.java:296) ~[netty-codec-4.1.58.Final.jar:4.1.58.Final]
	at io.netty.channel.CombinedChannelDuplexHandler.channelRead(CombinedChannelDuplexHandler.java:251) ~[netty-transport-4.1.58.Final.jar:4.1.58.Final]
	at io.netty.channel.AbstractChannelHandlerContext.invokeChannelRead(AbstractChannelHandlerContext.java:379) ~[netty-transport-4.1.58.Final.jar:4.1.58.Final]
	at io.netty.channel.AbstractChannelHandlerContext.invokeChannelRead(AbstractChannelHandlerContext.java:365) ~[netty-transport-4.1.58.Final.jar:4.1.58.Final]
	at io.netty.channel.AbstractChannelHandlerContext.fireChannelRead(AbstractChannelHandlerContext.java:357) ~[netty-transport-4.1.58.Final.jar:4.1.58.Final]
	at io.netty.channel.DefaultChannelPipeline$HeadContext.channelRead(DefaultChannelPipeline.java:1410) ~[netty-transport-4.1.58.Final.jar:4.1.58.Final]
	at io.netty.channel.AbstractChannelHandlerContext.invokeChannelRead(AbstractChannelHandlerContext.java:379) ~[netty-transport-4.1.58.Final.jar:4.1.58.Final]
	at io.netty.channel.AbstractChannelHandlerContext.invokeChannelRead(AbstractChannelHandlerContext.java:365) ~[netty-transport-4.1.58.Final.jar:4.1.58.Final]
	at io.netty.channel.DefaultChannelPipeline.fireChannelRead(DefaultChannelPipeline.java:919) ~[netty-transport-4.1.58.Final.jar:4.1.58.Final]
	at io.netty.channel.nio.AbstractNioByteChannel$NioByteUnsafe.read(AbstractNioByteChannel.java:166) ~[netty-transport-4.1.58.Final.jar:4.1.58.Final]
	at io.netty.channel.nio.NioEventLoop.processSelectedKey(NioEventLoop.java:719) ~[netty-transport-4.1.58.Final.jar:4.1.58.Final]
	at io.netty.channel.nio.NioEventLoop.processSelectedKeysOptimized(NioEventLoop.java:655) ~[netty-transport-4.1.58.Final.jar:4.1.58.Final]
	at io.netty.channel.nio.NioEventLoop.processSelectedKeys(NioEventLoop.java:581) ~[netty-transport-4.1.58.Final.jar:4.1.58.Final]
	at io.netty.channel.nio.NioEventLoop.run(NioEventLoop.java:493) ~[netty-transport-4.1.58.Final.jar:4.1.58.Final]
	at io.netty.util.concurrent.SingleThreadEventExecutor$4.run(SingleThreadEventExecutor.java:989) ~[netty-common-4.1.58.Final.jar:4.1.58.Final]
	at io.netty.util.internal.ThreadExecutorMap$2.run(ThreadExecutorMap.java:74) ~[netty-common-4.1.58.Final.jar:4.1.58.Final]
	at io.netty.util.concurrent.FastThreadLocalRunnable.run(FastThreadLocalRunnable.java:30) ~[netty-common-4.1.58.Final.jar:4.1.58.Final]
	at java.base/java.lang.Thread.run(Thread.java:845) ~[na:na]
Caused by: java.lang.UnsatisfiedLinkError: io/netty/resolver/dns/macos/MacOSDnsServerAddressStreamProvider.resolvers()[Lio/netty/resolver/dns/macos/DnsResolver;
	at io.netty.resolver.dns.macos.MacOSDnsServerAddressStreamProvider.retrieveCurrentMappings(MacOSDnsServerAddressStreamProvider.java:107) ~[netty-resolver-dns-native-macos-4.1.58.Final-osx-x86_64.jar:4.1.58.Final]
	at io.netty.resolver.dns.macos.MacOSDnsServerAddressStreamProvider.<init>(MacOSDnsServerAddressStreamProvider.java:103) ~[netty-resolver-dns-native-macos-4.1.58.Final-osx-x86_64.jar:4.1.58.Final]
	... 119 common frames omitted

2021-02-12 15:31:54.213 ERROR 8598 --- [ctor-http-nio-4] a.w.r.e.AbstractErrorWebExceptionHandler : [884707ab-1]  500 Server Error for HTTP GET "/api/v1/test"

java.net.UnknownHostException: failed to resolve '192-168-1-107.tpgi.com.au' after 2 queries 
	at io.netty.resolver.dns.DnsResolveContext.finishResolve(DnsResolveContext.java:1013) ~[netty-resolver-dns-4.1.58.Final.jar:4.1.58.Final]
	Suppressed: reactor.core.publisher.FluxOnAssembly$OnAssemblyException: 
Error has been observed at the following site(s):
	|_ checkpoint ⇢ org.springframework.cloud.gateway.filter.WeightCalculatorWebFilter [DefaultWebFilterChain]
	|_ checkpoint ⇢ HTTP GET "/api/v1/test" [ExceptionHandlingWebHandler]
Stack trace:
		at io.netty.resolver.dns.DnsResolveContext.finishResolve(DnsResolveContext.java:1013) ~[netty-resolver-dns-4.1.58.Final.jar:4.1.58.Final]
		at io.netty.resolver.dns.DnsResolveContext.tryToFinishResolve(DnsResolveContext.java:966) ~[netty-resolver-dns-4.1.58.Final.jar:4.1.58.Final]
		at io.netty.resolver.dns.DnsResolveContext.query(DnsResolveContext.java:414) ~[netty-resolver-dns-4.1.58.Final.jar:4.1.58.Final]
		at io.netty.resolver.dns.DnsResolveContext.access$600(DnsResolveContext.java:63) ~[netty-resolver-dns-4.1.58.Final.jar:4.1.58.Final]
		at io.netty.resolver.dns.DnsResolveContext$2.operationComplete(DnsResolveContext.java:463) ~[netty-resolver-dns-4.1.58.Final.jar:4.1.58.Final]
		at io.netty.util.concurrent.DefaultPromise.notifyListener0(DefaultPromise.java:578) ~[netty-common-4.1.58.Final.jar:4.1.58.Final]
		at io.netty.util.concurrent.DefaultPromise.notifyListeners0(DefaultPromise.java:571) ~[netty-common-4.1.58.Final.jar:4.1.58.Final]
		at io.netty.util.concurrent.DefaultPromise.notifyListenersNow(DefaultPromise.java:550) ~[netty-common-4.1.58.Final.jar:4.1.58.Final]
		at io.netty.util.concurrent.DefaultPromise.notifyListeners(DefaultPromise.java:491) ~[netty-common-4.1.58.Final.jar:4.1.58.Final]
		at io.netty.util.concurrent.DefaultPromise.setValue0(DefaultPromise.java:616) ~[netty-common-4.1.58.Final.jar:4.1.58.Final]
		at io.netty.util.concurrent.DefaultPromise.setFailure0(DefaultPromise.java:609) ~[netty-common-4.1.58.Final.jar:4.1.58.Final]
		at io.netty.util.concurrent.DefaultPromise.tryFailure(DefaultPromise.java:117) ~[netty-common-4.1.58.Final.jar:4.1.58.Final]
		at io.netty.resolver.dns.DnsQueryContext.tryFailure(DnsQueryContext.java:225) ~[netty-resolver-dns-4.1.58.Final.jar:4.1.58.Final]
		at io.netty.resolver.dns.DnsQueryContext$4.run(DnsQueryContext.java:177) ~[netty-resolver-dns-4.1.58.Final.jar:4.1.58.Final]
		at io.netty.util.concurrent.PromiseTask.runTask(PromiseTask.java:98) ~[netty-common-4.1.58.Final.jar:4.1.58.Final]
		at io.netty.util.concurrent.ScheduledFutureTask.run(ScheduledFutureTask.java:170) ~[netty-common-4.1.58.Final.jar:4.1.58.Final]
		at io.netty.util.concurrent.AbstractEventExecutor.safeExecute$$$capture(AbstractEventExecutor.java:164) ~[netty-common-4.1.58.Final.jar:4.1.58.Final]
		at io.netty.util.concurrent.AbstractEventExecutor.safeExecute(AbstractEventExecutor.java) ~[netty-common-4.1.58.Final.jar:4.1.58.Final]
		at io.netty.util.concurrent.SingleThreadEventExecutor.runAllTasks(SingleThreadEventExecutor.java:472) ~[netty-common-4.1.58.Final.jar:4.1.58.Final]
		at io.netty.channel.nio.NioEventLoop.run(NioEventLoop.java:500) ~[netty-transport-4.1.58.Final.jar:4.1.58.Final]
		at io.netty.util.concurrent.SingleThreadEventExecutor$4.run(SingleThreadEventExecutor.java:989) ~[netty-common-4.1.58.Final.jar:4.1.58.Final]
		at io.netty.util.internal.ThreadExecutorMap$2.run(ThreadExecutorMap.java:74) ~[netty-common-4.1.58.Final.jar:4.1.58.Final]
		at io.netty.util.concurrent.FastThreadLocalRunnable.run(FastThreadLocalRunnable.java:30) ~[netty-common-4.1.58.Final.jar:4.1.58.Final]
		at java.base/java.lang.Thread.run(Thread.java:845) ~[na:na]
Caused by: io.netty.resolver.dns.DnsNameResolverTimeoutException: [/0.0.0.0:53] query via UDP timed out after 5000 milliseconds (no stack trace available)
```

### Steps to reproduce
1. Build multi-module maven project: spring-cloud-dns-issue
./mvnw clean package
2. Run all microservices
./mvnw -pl discovery spring-boot:run
./mvnw -pl web spring-boot:run
./mvnw -pl api-gateway spring-boot:run
3. curl http://localhost:8080/api/v1/test

### Minimal yet complete reproducer code (or URL to code)
https://github.com/rodmccutcheon/spring-cloud-dns-issue

### Netty version
netty-resolver-dns-4.1.58.Final.jar

### JVM version (e.g. `java -version`)
java --version
openjdk 15.0.1 2020-10-20
OpenJDK Runtime Environment AdoptOpenJDK (build 15.0.1+9)
Eclipse OpenJ9 VM AdoptOpenJDK (build openj9-0.23.0, JRE 15 Mac OS X amd64-64-Bit Compressed References 20201022_78 (JIT enabled, AOT enabled)
OpenJ9   - 0394ef754
OMR      - 582366ae5
JCL      - ad583de3b5 based on jdk-15.0.1+9)

### OS version (e.g. `uname -a`)
uname -a
Darwin 192-168-1-107.tpgi.com.au 19.6.0 Darwin Kernel Version 19.6.0: Thu Oct 29 22:56:45 PDT 2020; root:xnu-6153.141.2.2~1/RELEASE_X86_64 x86_64
resolver-dns/src/main/java/io/netty/resolver/dns/DnsServerAddressStreamProviders.java
resolver-dns/src/main/java/io/netty/resolver/dns/DnsServerAddressStreamProviders.java
diff --git a/resolver-dns/src/main/java/io/netty/resolver/dns/DnsServerAddressStreamProviders.java b/resolver-dns/src/main/java/io/netty/resolver/dns/DnsServerAddressStreamProviders.java
index 8ba95777b87..b9668dd3f5c 100644
--- a/resolver-dns/src/main/java/io/netty/resolver/dns/DnsServerAddressStreamProviders.java
+++ b/resolver-dns/src/main/java/io/netty/resolver/dns/DnsServerAddressStreamProviders.java
@@ -68,10 +68,12 @@ public Object run() {
                 }
             } catch (ClassNotFoundException cause) {
                 LOGGER.warn("Can not find {} in the classpath, fallback to system defaults. This may result in "
-                        + "incorrect DNS resolutions on MacOS.", MACOS_PROVIDER_CLASS_NAME);
+                        + "incorrect DNS resolutions on MacOS. Check whether you have a dependency on "
+                        + "'io.netty:netty-resolver-dns-native-macos'", MACOS_PROVIDER_CLASS_NAME);
             } catch (Throwable cause) {
                 LOGGER.error("Unable to load {}, fallback to system defaults. This may result in "
-                        + "incorrect DNS resolutions on MacOS.", MACOS_PROVIDER_CLASS_NAME, cause);
+                        + "incorrect DNS resolutions on MacOS. Check whether you have a dependency on "
+                        + "'io.netty:netty-resolver-dns-native-macos'", MACOS_PROVIDER_CLASS_NAME, cause);
                 constructor = null;
             }
         }
