Is there a solution to this problem?

2022-02-25 17:22:43.931 ERROR 40390 --- [           main] 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:77) ~[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.73.Final.jar:4.1.73.Final]
    at io.netty.resolver.dns.DnsNameResolverBuilder.<init>(DnsNameResolverBuilder.java:60) ~[netty-resolver-dns-4.1.73.Final.jar:4.1.73.Final]
    at io.lettuce.core.resource.AddressResolverGroupProvider$DefaultDnsAddressResolverGroupWrapper.<clinit>(AddressResolverGroupProvider.java:56) ~[lettuce-core-6.1.6.RELEASE.jar:6.1.6.RELEASE]
    at io.lettuce.core.resource.AddressResolverGroupProvider.<clinit>(AddressResolverGroupProvider.java:35) ~[lettuce-core-6.1.6.RELEASE.jar:6.1.6.RELEASE]
    at io.lettuce.core.resource.DefaultClientResources.<clinit>(DefaultClientResources.java:112) ~[lettuce-core-6.1.6.RELEASE.jar:6.1.6.RELEASE]
    at org.springframework.boot.autoconfigure.data.redis.LettuceConnectionConfiguration.lettuceClientResources(LettuceConnectionConfiguration.java:71) ~[spring-boot-autoconfigure-3.0.0-M1.jar:3.0.0-M1]
    at java.base/jdk.internal.reflect.NativeMethodAccessorImpl.invoke0(Native Method) ~[na:na]
    at java.base/jdk.internal.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:77) ~[na:na]
    at java.base/jdk.internal.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43) ~[na:na]
    at java.base/java.lang.reflect.Method.invoke(Method.java:568) ~[na:na]
    at org.springframework.beans.factory.support.SimpleInstantiationStrategy.instantiate(SimpleInstantiationStrategy.java:130) ~[spring-beans-6.0.0-M2.jar:6.0.0-M2]
    at org.springframework.beans.factory.support.ConstructorResolver.instantiate(ConstructorResolver.java:630) ~[spring-beans-6.0.0-M2.jar:6.0.0-M2]
    at org.springframework.beans.factory.support.ConstructorResolver.instantiateUsingFactoryMethod(ConstructorResolver.java:622) ~[spring-beans-6.0.0-M2.jar:6.0.0-M2]
    at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.instantiateUsingFactoryMethod(AbstractAutowireCapableBeanFactory.java:1310) ~[spring-beans-6.0.0-M2.jar:6.0.0-M2]
    at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.createBeanInstance(AbstractAutowireCapableBeanFactory.java:1161) ~[spring-beans-6.0.0-M2.jar:6.0.0-M2]
    at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.doCreateBean(AbstractAutowireCapableBeanFactory.java:566) ~[spring-beans-6.0.0-M2.jar:6.0.0-M2]
    at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.createBean(AbstractAutowireCapableBeanFactory.java:526) ~[spring-beans-6.0.0-M2.jar:6.0.0-M2]
    at org.springframework.beans.factory.support.AbstractBeanFactory.lambda$doGetBean$0(AbstractBeanFactory.java:326) ~[spring-beans-6.0.0-M2.jar:6.0.0-M2]
    at org.springframework.beans.factory.support.DefaultSingletonBeanRegistry.getSingleton(DefaultSingletonBeanRegistry.java:234) ~[spring-beans-6.0.0-M2.jar:6.0.0-M2]
    at org.springframework.beans.factory.support.AbstractBeanFactory.doGetBean(AbstractBeanFactory.java:324) ~[spring-beans-6.0.0-M2.jar:6.0.0-M2]
    at org.springframework.beans.factory.support.AbstractBeanFactory.getBean(AbstractBeanFactory.java:199) ~[spring-beans-6.0.0-M2.jar:6.0.0-M2]
    at org.springframework.beans.factory.config.DependencyDescriptor.resolveCandidate(DependencyDescriptor.java:254) ~[spring-beans-6.0.0-M2.jar:6.0.0-M2]
    at org.springframework.beans.factory.support.DefaultListableBeanFactory.doResolveDependency(DefaultListableBeanFactory.java:1361) ~[spring-beans-6.0.0-M2.jar:6.0.0-M2]
    at org.springframework.beans.factory.support.DefaultListableBeanFactory.resolveDependency(DefaultListableBeanFactory.java:1281) ~[spring-beans-6.0.0-M2.jar:6.0.0-M2]
    at org.springframework.beans.factory.support.ConstructorResolver.resolveAutowiredArgument(ConstructorResolver.java:863) ~[spring-beans-6.0.0-M2.jar:6.0.0-M2]
    at org.springframework.beans.factory.support.ConstructorResolver.createArgumentArray(ConstructorResolver.java:767) ~[spring-beans-6.0.0-M2.jar:6.0.0-M2]
    at org.springframework.beans.factory.support.ConstructorResolver.instantiateUsingFactoryMethod(ConstructorResolver.java:525) ~[spring-beans-6.0.0-M2.jar:6.0.0-M2]
    at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.instantiateUsingFactoryMethod(AbstractAutowireCapableBeanFactory.java:1310) ~[spring-beans-6.0.0-M2.jar:6.0.0-M2]
    at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.createBeanInstance(AbstractAutowireCapableBeanFactory.java:1161) ~[spring-beans-6.0.0-M2.jar:6.0.0-M2]
    at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.doCreateBean(AbstractAutowireCapableBeanFactory.java:566) ~[spring-beans-6.0.0-M2.jar:6.0.0-M2]
    at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.createBean(AbstractAutowireCapableBeanFactory.java:526) ~[spring-beans-6.0.0-M2.jar:6.0.0-M2]
    at org.springframework.beans.factory.support.AbstractBeanFactory.lambda$doGetBean$0(AbstractBeanFactory.java:326) ~[spring-beans-6.0.0-M2.jar:6.0.0-M2]
    at org.springframework.beans.factory.support.DefaultSingletonBeanRegistry.getSingleton(DefaultSingletonBeanRegistry.java:234) ~[spring-beans-6.0.0-M2.jar:6.0.0-M2]
    at org.springframework.beans.factory.support.AbstractBeanFactory.doGetBean(AbstractBeanFactory.java:324) ~[spring-beans-6.0.0-M2.jar:6.0.0-M2]
    at org.springframework.beans.factory.support.AbstractBeanFactory.getBean(AbstractBeanFactory.java:199) ~[spring-beans-6.0.0-M2.jar:6.0.0-M2]
    at org.springframework.beans.factory.config.DependencyDescriptor.resolveCandidate(DependencyDescriptor.java:254) ~[spring-beans-6.0.0-M2.jar:6.0.0-M2]
    at org.springframework.beans.factory.support.DefaultListableBeanFactory.addCandidateEntry(DefaultListableBeanFactory.java:1579) ~[spring-beans-6.0.0-M2.jar:6.0.0-M2]
    at org.springframework.beans.factory.support.DefaultListableBeanFactory.findAutowireCandidates(DefaultListableBeanFactory.java:1543) ~[spring-beans-6.0.0-M2.jar:6.0.0-M2]
    at org.springframework.beans.factory.support.DefaultListableBeanFactory.resolveMultipleBeans(DefaultListableBeanFactory.java:1462) ~[spring-beans-6.0.0-M2.jar:6.0.0-M2]
    at org.springframework.beans.factory.support.DefaultListableBeanFactory.doResolveDependency(DefaultListableBeanFactory.java:1319) ~[spring-beans-6.0.0-M2.jar:6.0.0-M2]
    at org.springframework.beans.factory.support.DefaultListableBeanFactory.resolveDependency(DefaultListableBeanFactory.java:1281) ~[spring-beans-6.0.0-M2.jar:6.0.0-M2]
    at org.springframework.beans.factory.support.ConstructorResolver.resolveAutowiredArgument(ConstructorResolver.java:863) ~[spring-beans-6.0.0-M2.jar:6.0.0-M2]
    at org.springframework.beans.factory.support.ConstructorResolver.createArgumentArray(ConstructorResolver.java:767) ~[spring-beans-6.0.0-M2.jar:6.0.0-M2]
    at org.springframework.beans.factory.support.ConstructorResolver.autowireConstructor(ConstructorResolver.java:227) ~[spring-beans-6.0.0-M2.jar:6.0.0-M2]
    at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.autowireConstructor(AbstractAutowireCapableBeanFactory.java:1330) ~[spring-beans-6.0.0-M2.jar:6.0.0-M2]
    at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.createBeanInstance(AbstractAutowireCapableBeanFactory.java:1188) ~[spring-beans-6.0.0-M2.jar:6.0.0-M2]
    at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.doCreateBean(AbstractAutowireCapableBeanFactory.java:566) ~[spring-beans-6.0.0-M2.jar:6.0.0-M2]
    at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.createBean(AbstractAutowireCapableBeanFactory.java:526) ~[spring-beans-6.0.0-M2.jar:6.0.0-M2]
    at org.springframework.beans.factory.support.AbstractBeanFactory.lambda$doGetBean$0(AbstractBeanFactory.java:326) ~[spring-beans-6.0.0-M2.jar:6.0.0-M2]
    at org.springframework.beans.factory.support.DefaultSingletonBeanRegistry.getSingleton(DefaultSingletonBeanRegistry.java:234) ~[spring-beans-6.0.0-M2.jar:6.0.0-M2]
    at org.springframework.beans.factory.support.AbstractBeanFactory.doGetBean(AbstractBeanFactory.java:324) ~[spring-beans-6.0.0-M2.jar:6.0.0-M2]
    at org.springframework.beans.factory.support.AbstractBeanFactory.getBean(AbstractBeanFactory.java:199) ~[spring-beans-6.0.0-M2.jar:6.0.0-M2]
    at org.springframework.beans.factory.support.ConstructorResolver.instantiateUsingFactoryMethod(ConstructorResolver.java:394) ~[spring-beans-6.0.0-M2.jar:6.0.0-M2]
    at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.instantiateUsingFactoryMethod(AbstractAutowireCapableBeanFactory.java:1310) ~[spring-beans-6.0.0-M2.jar:6.0.0-M2]
    at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.createBeanInstance(AbstractAutowireCapableBeanFactory.java:1161) ~[spring-beans-6.0.0-M2.jar:6.0.0-M2]
    at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.doCreateBean(AbstractAutowireCapableBeanFactory.java:566) ~[spring-beans-6.0.0-M2.jar:6.0.0-M2]
    at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.createBean(AbstractAutowireCapableBeanFactory.java:526) ~[spring-beans-6.0.0-M2.jar:6.0.0-M2]
    at org.springframework.beans.factory.support.AbstractBeanFactory.lambda$doGetBean$0(AbstractBeanFactory.java:326) ~[spring-beans-6.0.0-M2.jar:6.0.0-M2]
    at org.springframework.beans.factory.support.DefaultSingletonBeanRegistry.getSingleton(DefaultSingletonBeanRegistry.java:234) ~[spring-beans-6.0.0-M2.jar:6.0.0-M2]
    at org.springframework.beans.factory.support.AbstractBeanFactory.doGetBean(AbstractBeanFactory.java:324) ~[spring-beans-6.0.0-M2.jar:6.0.0-M2]
    at org.springframework.beans.factory.support.AbstractBeanFactory.getBean(AbstractBeanFactory.java:199) ~[spring-beans-6.0.0-M2.jar:6.0.0-M2]
    at org.springframework.beans.factory.support.DefaultListableBeanFactory.getBeansOfType(DefaultListableBeanFactory.java:661) ~[spring-beans-6.0.0-M2.jar:6.0.0-M2]
    at org.springframework.beans.factory.support.DefaultListableBeanFactory.getBeansOfType(DefaultListableBeanFactory.java:649) ~[spring-beans-6.0.0-M2.jar:6.0.0-M2]
    at org.springframework.context.support.AbstractApplicationContext.getBeansOfType(AbstractApplicationContext.java:1278) ~[spring-context-6.0.0-M2.jar:6.0.0-M2]
    at org.springframework.boot.actuate.autoconfigure.health.HealthEndpointConfiguration$AdaptedReactiveHealthContributors.<init>(HealthEndpointConfiguration.java:141) ~[spring-boot-actuator-autoconfigure-3.0.0-M1.jar:3.0.0-M1]
    at org.springframework.boot.actuate.autoconfigure.health.HealthEndpointConfiguration.healthContributorRegistry(HealthEndpointConfiguration.java:84) ~[spring-boot-actuator-autoconfigure-3.0.0-M1.jar:3.0.0-M1]
    at java.base/jdk.internal.reflect.NativeMethodAccessorImpl.invoke0(Native Method) ~[na:na]
    at java.base/jdk.internal.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:77) ~[na:na]
    at java.base/jdk.internal.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43) ~[na:na]
    at java.base/java.lang.reflect.Method.invoke(Method.java:568) ~[na:na]
    at org.springframework.beans.factory.support.SimpleInstantiationStrategy.instantiate(SimpleInstantiationStrategy.java:130) ~[spring-beans-6.0.0-M2.jar:6.0.0-M2]
    at org.springframework.beans.factory.support.ConstructorResolver.instantiate(ConstructorResolver.java:630) ~[spring-beans-6.0.0-M2.jar:6.0.0-M2]
    at org.springframework.beans.factory.support.ConstructorResolver.instantiateUsingFactoryMethod(ConstructorResolver.java:622) ~[spring-beans-6.0.0-M2.jar:6.0.0-M2]
    at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.instantiateUsingFactoryMethod(AbstractAutowireCapableBeanFactory.java:1310) ~[spring-beans-6.0.0-M2.jar:6.0.0-M2]
    at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.createBeanInstance(AbstractAutowireCapableBeanFactory.java:1161) ~[spring-beans-6.0.0-M2.jar:6.0.0-M2]
    at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.doCreateBean(AbstractAutowireCapableBeanFactory.java:566) ~[spring-beans-6.0.0-M2.jar:6.0.0-M2]
    at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.createBean(AbstractAutowireCapableBeanFactory.java:526) ~[spring-beans-6.0.0-M2.jar:6.0.0-M2]
    at org.springframework.beans.factory.support.AbstractBeanFactory.lambda$doGetBean$0(AbstractBeanFactory.java:326) ~[spring-beans-6.0.0-M2.jar:6.0.0-M2]
    at org.springframework.beans.factory.support.DefaultSingletonBeanRegistry.getSingleton(DefaultSingletonBeanRegistry.java:234) ~[spring-beans-6.0.0-M2.jar:6.0.0-M2]
    at org.springframework.beans.factory.support.AbstractBeanFactory.doGetBean(AbstractBeanFactory.java:324) ~[spring-beans-6.0.0-M2.jar:6.0.0-M2]
    at org.springframework.beans.factory.support.AbstractBeanFactory.getBean(AbstractBeanFactory.java:199) ~[spring-beans-6.0.0-M2.jar:6.0.0-M2]
    at org.springframework.beans.factory.config.DependencyDescriptor.resolveCandidate(DependencyDescriptor.java:254) ~[spring-beans-6.0.0-M2.jar:6.0.0-M2]
    at org.springframework.beans.factory.support.DefaultListableBeanFactory.doResolveDependency(DefaultListableBeanFactory.java:1361) ~[spring-beans-6.0.0-M2.jar:6.0.0-M2]
    at org.springframework.beans.factory.support.DefaultListableBeanFactory.resolveDependency(DefaultListableBeanFactory.java:1281) ~[spring-beans-6.0.0-M2.jar:6.0.0-M2]
    at org.springframework.beans.factory.support.ConstructorResolver.resolveAutowiredArgument(ConstructorResolver.java:863) ~[spring-beans-6.0.0-M2.jar:6.0.0-M2]
    at org.springframework.beans.factory.support.ConstructorResolver.createArgumentArray(ConstructorResolver.java:767) ~[spring-beans-6.0.0-M2.jar:6.0.0-M2]
    at org.springframework.beans.factory.support.ConstructorResolver.instantiateUsingFactoryMethod(ConstructorResolver.java:525) ~[spring-beans-6.0.0-M2.jar:6.0.0-M2]
    at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.instantiateUsingFactoryMethod(AbstractAutowireCapableBeanFactory.java:1310) ~[spring-beans-6.0.0-M2.jar:6.0.0-M2]
    at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.createBeanInstance(AbstractAutowireCapableBeanFactory.java:1161) ~[spring-beans-6.0.0-M2.jar:6.0.0-M2]
    at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.doCreateBean(AbstractAutowireCapableBeanFactory.java:566) ~[spring-beans-6.0.0-M2.jar:6.0.0-M2]
    at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.createBean(AbstractAutowireCapableBeanFactory.java:526) ~[spring-beans-6.0.0-M2.jar:6.0.0-M2]
    at org.springframework.beans.factory.support.AbstractBeanFactory.lambda$doGetBean$0(AbstractBeanFactory.java:326) ~[spring-beans-6.0.0-M2.jar:6.0.0-M2]
    at org.springframework.beans.factory.support.DefaultSingletonBeanRegistry.getSingleton(DefaultSingletonBeanRegistry.java:234) ~[spring-beans-6.0.0-M2.jar:6.0.0-M2]
    at org.springframework.beans.factory.support.AbstractBeanFactory.doGetBean(AbstractBeanFactory.java:324) ~[spring-beans-6.0.0-M2.jar:6.0.0-M2]
    at org.springframework.beans.factory.support.AbstractBeanFactory.getBean(AbstractBeanFactory.java:199) ~[spring-beans-6.0.0-M2.jar:6.0.0-M2]
    at org.springframework.context.support.AbstractApplicationContext.getBean(AbstractApplicationContext.java:1132) ~[spring-context-6.0.0-M2.jar:6.0.0-M2]
    at org.springframework.boot.actuate.endpoint.annotation.EndpointDiscoverer.lambda$createEndpointBean$1(EndpointDiscoverer.java:145) ~[spring-boot-actuator-3.0.0-M1.jar:3.0.0-M1]
    at org.springframework.boot.actuate.endpoint.annotation.EndpointDiscoverer$EndpointBean.getBean(EndpointDiscoverer.java:447) ~[spring-boot-actuator-3.0.0-M1.jar:3.0.0-M1]
    at org.springframework.boot.actuate.endpoint.annotation.EndpointDiscoverer.getFilterEndpoint(EndpointDiscoverer.java:307) ~[spring-boot-actuator-3.0.0-M1.jar:3.0.0-M1]
    at org.springframework.boot.actuate.endpoint.annotation.EndpointDiscoverer.isFilterMatch(EndpointDiscoverer.java:285) ~[spring-boot-actuator-3.0.0-M1.jar:3.0.0-M1]
    at org.springframework.boot.actuate.endpoint.annotation.EndpointDiscoverer.isExtensionExposed(EndpointDiscoverer.java:239) ~[spring-boot-actuator-3.0.0-M1.jar:3.0.0-M1]
    at org.springframework.boot.actuate.endpoint.annotation.EndpointDiscoverer.addExtensionBean(EndpointDiscoverer.java:170) ~[spring-boot-actuator-3.0.0-M1.jar:3.0.0-M1]
    at org.springframework.boot.actuate.endpoint.annotation.EndpointDiscoverer.addExtensionBeans(EndpointDiscoverer.java:159) ~[spring-boot-actuator-3.0.0-M1.jar:3.0.0-M1]
    at org.springframework.boot.actuate.endpoint.annotation.EndpointDiscoverer.discoverEndpoints(EndpointDiscoverer.java:124) ~[spring-boot-actuator-3.0.0-M1.jar:3.0.0-M1]
    at org.springframework.boot.actuate.endpoint.annotation.EndpointDiscoverer.getEndpoints(EndpointDiscoverer.java:117) ~[spring-boot-actuator-3.0.0-M1.jar:3.0.0-M1]
    at org.springframework.boot.actuate.autoconfigure.endpoint.jmx.JmxEndpointAutoConfiguration.jmxMBeanExporter(JmxEndpointAutoConfiguration.java:104) ~[spring-boot-actuator-autoconfigure-3.0.0-M1.jar:3.0.0-M1]
    at java.base/jdk.internal.reflect.NativeMethodAccessorImpl.invoke0(Native Method) ~[na:na]
    at java.base/jdk.internal.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:77) ~[na:na]
    at java.base/jdk.internal.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43) ~[na:na]
    at java.base/java.lang.reflect.Method.invoke(Method.java:568) ~[na:na]
    at org.springframework.beans.factory.support.SimpleInstantiationStrategy.instantiate(SimpleInstantiationStrategy.java:130) ~[spring-beans-6.0.0-M2.jar:6.0.0-M2]
    at org.springframework.beans.factory.support.ConstructorResolver.instantiate(ConstructorResolver.java:630) ~[spring-beans-6.0.0-M2.jar:6.0.0-M2]
    at org.springframework.beans.factory.support.ConstructorResolver.instantiateUsingFactoryMethod(ConstructorResolver.java:622) ~[spring-beans-6.0.0-M2.jar:6.0.0-M2]
    at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.instantiateUsingFactoryMethod(AbstractAutowireCapableBeanFactory.java:1310) ~[spring-beans-6.0.0-M2.jar:6.0.0-M2]
    at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.createBeanInstance(AbstractAutowireCapableBeanFactory.java:1161) ~[spring-beans-6.0.0-M2.jar:6.0.0-M2]
    at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.doCreateBean(AbstractAutowireCapableBeanFactory.java:566) ~[spring-beans-6.0.0-M2.jar:6.0.0-M2]
    at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.createBean(AbstractAutowireCapableBeanFactory.java:526) ~[spring-beans-6.0.0-M2.jar:6.0.0-M2]
    at org.springframework.beans.factory.support.AbstractBeanFactory.lambda$doGetBean$0(AbstractBeanFactory.java:326) ~[spring-beans-6.0.0-M2.jar:6.0.0-M2]
    at org.springframework.beans.factory.support.DefaultSingletonBeanRegistry.getSingleton(DefaultSingletonBeanRegistry.java:234) ~[spring-beans-6.0.0-M2.jar:6.0.0-M2]
    at org.springframework.beans.factory.support.AbstractBeanFactory.doGetBean(AbstractBeanFactory.java:324) ~[spring-beans-6.0.0-M2.jar:6.0.0-M2]
    at org.springframework.beans.factory.support.AbstractBeanFactory.getBean(AbstractBeanFactory.java:199) ~[spring-beans-6.0.0-M2.jar:6.0.0-M2]
    at org.springframework.beans.factory.support.DefaultListableBeanFactory.preInstantiateSingletons(DefaultListableBeanFactory.java:934) ~[spring-beans-6.0.0-M2.jar:6.0.0-M2]
    at org.springframework.context.support.AbstractApplicationContext.finishBeanFactoryInitialization(AbstractApplicationContext.java:917) ~[spring-context-6.0.0-M2.jar:6.0.0-M2]
    at org.springframework.context.support.AbstractApplicationContext.refresh(AbstractApplicationContext.java:583) ~[spring-context-6.0.0-M2.jar:6.0.0-M2]
    at org.springframework.boot.web.reactive.context.ReactiveWebServerApplicationContext.refresh(ReactiveWebServerApplicationContext.java:64) ~[spring-boot-3.0.0-M1.jar:3.0.0-M1]
    at org.springframework.boot.SpringApplication.refresh(SpringApplication.java:719) ~[spring-boot-3.0.0-M1.jar:3.0.0-M1]
    at org.springframework.boot.SpringApplication.refreshContext(SpringApplication.java:401) ~[spring-boot-3.0.0-M1.jar:3.0.0-M1]
    at org.springframework.boot.SpringApplication.run(SpringApplication.java:302) ~[spring-boot-3.0.0-M1.jar:3.0.0-M1]
    at org.springframework.boot.SpringApplication.run(SpringApplication.java:1290) ~[spring-boot-3.0.0-M1.jar:3.0.0-M1]
    at org.springframework.boot.SpringApplication.run(SpringApplication.java:1279) ~[spring-boot-3.0.0-M1.jar:3.0.0-M1]
    at cn.com.pagoda.customer.coupon.web.b.WebBStarter.main(WebBStarter.java:15) ~[classes/: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-classes-macos-4.1.73.Final.jar:4.1.73.Final]
    at io.netty.resolver.dns.macos.MacOSDnsServerAddressStreamProvider.retrieveCurrentMappings(MacOSDnsServerAddressStreamProvider.java:127) ~[netty-resolver-dns-classes-macos-4.1.73.Final.jar:4.1.73.Final]
    at io.netty.resolver.dns.macos.MacOSDnsServerAddressStreamProvider.<init>(MacOSDnsServerAddressStreamProvider.java:123) ~[netty-resolver-dns-classes-macos-4.1.73.Final.jar:4.1.73.Final]
    ... 136 common frames omitted

Comment From: wilkinsona

https://github.com/netty/netty/issues/11020 may help.

Comment From: wleese

It is unclear to me if this is a bug in Spring Boot, or in Netty. https://github.com/netty/netty/issues/11020 has a workaround. Are users of Spring Boot expected to apply this directly, something Netty should solve in a more elegant way or is this something Spring Boot should be applying?

In any case, this is an issue for Apple Silicon Spring Boot webflux users.

Comment From: snicoll

I am afraid there's nothing we can do about it. The issue you've reference has already all the history that you need.

Comment From: breun

It looks like this is an issue in io.projectreactor.netty:reactor-netty-http:1.0.22, because that has a hardcoded dependency on io.netty:netty-resolver-dns-native-macos with classifier osx-x86_64.

Comment From: wleese

@snicoll looking at the response from reactor-netty in https://github.com/reactor/reactor-netty/issues/2440#issuecomment-1220762196, they'd like to push the responsibility of selecting the correct dependency up to the user(s) of reactor-netty. In other words, the behavior is intended.

Now there is the choice of who in the stack of dependencies is going to implement the correct switching between the appropriate native resolver?

If no one does it: then the user is faced with a very ominous warning that DNS resolution may be incorrect. If the user does it, then they need to copy & paste a 5 line xml snippet to their each of their webflux using projects.

Should spring-boot-starter-webflux not provide this convenience?

Comment From: philwebb

Should spring-boot-starter-webflux not provide this convenience?

I'm not sure we can really do this. Only the user knows the architecture they're targeting and the classifier to use. I agree with the comment in https://github.com/reactor/reactor-netty/issues/2440#issuecomment-1220762196:

We don't want to have transitive dependencies to all arch that might be there in the future

Comment From: wleese

Only the user knows the architecture they're targeting and the classifier to use.

Could a maven profile not be used to switch dependencies based on architecture?

Comment From: breun

You could automatically detect OS and CPU arch at build time, but that is not necessarily the same as the runtime OS and CPU arch.

If Spring Boot would bundle all of these native dependencies by default, I believe the app will run in any environment, because which library to load, if any, is determined at runtime. The alternative would be documenting which dependencies to add for which use cases.

Comment From: violetagg

@wleese @breun Even if Spring Boot provides something, how Spring Boot will be able to predict whether you want NIO transport vs. KQueue vs Epoll vs. IO_Uring or the example with DNS resolution whether you want to use the JVM’s built-in blocking resolver or Netty's non-blocking resolver? (these are just some examples I'm sure there are more).

Comment From: breun

I guess either Spring Boot needs to decide on defaults (and ideally allow users to override these), or Spring Boot will need to somehow clarify what a user must do to get Netty to work.

Comment From: violetagg

I guess either Spring Boot needs to decide on defaults (and ideally allow users to override these), or Spring Boot will need to somehow clarify what a user must do to get Netty to work.

Netty is working as expected even if you do not specify the natives

Comment From: breun

If the exception should be ignored, I guess Spring Boot could be modified to not log it as an error?

Comment From: snicoll

@breun please stop. We've made clear that our opinion is that there's nothing we can do. "If the exception should be ignored, then perhaps Netty shouldn't throw it". With that kind of argument, we're not going anywhere.

Comment From: breun

I'm sorry, but I'm not making that argument. Someone wants to run Spring Boot with WebFlux on an Apple Silicon device and gets a big stacktrace about not being able to load a Netty class. That's not a nice user experience, right? Why shouldn't we change Spring Boot to not log this error and stacktrace when according to the Netty developers everything should work fine when this happens?

Comment From: philwebb

@breun I think we might be able to add a failure analyzer to produce a better message. I've opened #32150 to consider that. Thanks for the suggestion.

Comment From: bclozel

Does this exception fails the application startup though? I thought FailureAnalyzer would only be triggered for startup errors.

Comment From: philwebb

Does this exception fails the application startup though

Doh! That'll teach me to try and look at issues before I've had my coffee. You're right, it's in DnsServerAddressStreamProviders so there's nothing we can do.

Comment From: violetagg

I proposed an improvement for the log message and this improvement will be in the next Netty 4.1.80.Final https://github.com/netty/netty/pull/12732

Comment From: breun

After some more discussion in https://github.com/reactor/reactor-netty/issues/2440 it seems that this error for Apple Silicon users can be fixed by adding a dependency on io.netty:netty-resolver-dns-native-macos with classifier osx-aarch_64. reactor-netty-http already includes this dependency with classifier osx-x86_64, but reactor-netty-http doesn't want to add any more optional native dependencies by default.

I believe this error could also be solved for Spring Boot users specifically by adding the osx-aarch_64 dependency to spring-boot-starter-reactor-netty. Would Spring Boot consider adding this dependency (18 KB, contains a single jnilib file, will only be loaded on Apple Silicon devices) to solve this error for Spring Boot users on Apple Silicon, or will end users need figure out for themselves that they need to add this dependency to their Spring Boot projects to resolve this error?

Comment From: bclozel

I don't think we're going to add new dependencies to the starter for that. We should rely on whatever reactor-netty-http declares, and I sympathize with Violetta's position in the linked issue - overriding this decision from Spring Boot would not make sense.

@breun Are you aware of a way to declare compile/runtime dependencies so that they're only resolved for specific architectures? Given that Netty's artifacts are published with classifiers, I don't see a way to automate that for all users. To me, Reactor Netty depends on the most popular one as a convenience, but ultimately native libraries should be added by the consumer.

Comment From: breun

I know how to fix this for my own applications, but I'm thinking from the perspective of Spring Boot users in general. Spring Boot users on Apple Silicon devices that use reactor-netty-http (so including all WebFlux users) currently get this rather puzzling error, which could be resolved by adding that native dependency. It's pretty small and would only be loaded on Apple Silicon machines. I see Apple Silicon devices are quite busy overtaking Intel Macs in the developer world, so more and more people around me are encountering this error.

My team supports Spring Boot-based software for 1000+ applications in production, so we could tell our users to add this dependency whenever they use WebFlux/reactor-netty-http, but it would be nice if nobody, including people outside my company, would need to encounter this error, so that's why I'm looking for ways to make this better for everyone.

If both Reactor Netty and Spring Boot are not willing to add the native Apple Silicon library by default, then I guess all end users will need to figure out for themselves how to get rid of this error. I just think that's not a great end user experience. Maybe this could at least be documented for Apple Silicon users?

Comment From: bclozel

The improvement contributed by Violeta in Netty (see https://github.com/netty/netty/pull/12732) has been merged and we think that further improvements should be also contributed to Netty directly.

Comment From: nightswimmings

I am not clear on whether this should be addressed by netty or spring-boot, but certainly, having to create environment profiles in each service as netty suggests is not an acceptable solution from the end user experience point of view. I mean, we run the builds in different machines (local dev, pipelines, production)... should I create a -P profile for each arch in each service just because the embedded web server uses a native component properly to resolve dns? I think it even goes against the fundamental spirit of the java language itself

Comment From: philwebb

@nightswimmings You'll need to take this up with the Netty team and make suggestions with them. I don't think we can go against the grain of what they recommend.