관리 메뉴

피터의 개발이야기

[MacOS M1] DNS resolutions Error에 대한 Jar 설정 본문

Programming/Spring

[MacOS M1] DNS resolutions Error에 대한 Jar 설정

기록하는 백앤드개발자 2023. 4. 24. 10:09
반응형

 

ㅁ 들어가며

Unable to load io.netty.resolver.dns.macos.MacOSDnsServerAddressStreamProvider, fallback to system defaults. This may result in incorrect DNS resolutions on MacOS.

 -  에러에 대한 조치 과정을 정리하였다.

 

ㅁ 에러 내용

[admin] [restartedMain] [2023-04-21 11:46:32:7022] ERROR 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)
	at java.base/jdk.internal.reflect.NativeConstructorAccessorImpl.newInstance(NativeConstructorAccessorImpl.java:62)
	at java.base/jdk.internal.reflect.DelegatingConstructorAccessorImpl.newInstance(DelegatingConstructorAccessorImpl.java:45)
	at java.base/java.lang.reflect.Constructor.newInstance(Constructor.java:490)
	at io.netty.resolver.dns.DnsServerAddressStreamProviders.<clinit>(DnsServerAddressStreamProviders.java:64)
	at io.netty.resolver.dns.DnsNameResolverBuilder.<init>(DnsNameResolverBuilder.java:60)
	at reactor.netty.transport.NameResolverProvider.newNameResolverGroup(NameResolverProvider.java:479)
	at reactor.netty.tcp.TcpResources.getOrCreateDefaultResolver(TcpResources.java:315)
	at reactor.netty.http.HttpResources.getOrCreateDefaultResolver(HttpResources.java:162)
	at reactor.netty.http.client.HttpClientConfig.defaultAddressResolverGroup(HttpClientConfig.java:381)
	at reactor.netty.transport.ClientTransportConfig.resolverInternal(ClientTransportConfig.java:224)
	at reactor.netty.http.client.HttpClientConfig.resolverInternal(HttpClientConfig.java:435)
	at reactor.netty.http.client.HttpClientConnect$MonoHttpConnect.lambda$subscribe$0(HttpClientConnect.java:266)
	at reactor.core.publisher.MonoCreate.subscribe(MonoCreate.java:58)
	at reactor.core.publisher.InternalMonoOperator.subscribe(InternalMonoOperator.java:64)
	at reactor.core.publisher.FluxRetryWhen.subscribe(FluxRetryWhen.java:77)
	at reactor.core.publisher.MonoRetryWhen.subscribeOrReturn(MonoRetryWhen.java:46)
	at reactor.core.publisher.InternalMonoOperator.subscribe(InternalMonoOperator.java:57)
	at reactor.netty.http.client.HttpClientConnect$MonoHttpConnect.subscribe(HttpClientConnect.java:273)
	at reactor.core.publisher.InternalMonoOperator.subscribe(InternalMonoOperator.java:64)
	at reactor.core.publisher.MonoDefer.subscribe(MonoDefer.java:52)
	at reactor.core.publisher.Mono.subscribe(Mono.java:4397)
	at reactor.core.publisher.Mono.block(Mono.java:1706)

 ㅇ M1인 경우 Netty DNS Jar를수정해 줘야한다.

 

ㅁ Maven 리포지토리

https://mvnrepository.com/artifact/io.netty/netty-resolver-dns-native-macos/4.1.91.Final

 

<!-- https://mvnrepository.com/artifact/io.netty/netty-resolver-dns-native-macos -->
<dependency>
    <groupId>io.netty</groupId>
    <artifactId>netty-resolver-dns-native-macos</artifactId>
    <version>4.1.91.Final</version>
</dependency>


// https://mvnrepository.com/artifact/io.netty/netty-resolver-dns-native-macos
runtimeOnly("io.netty:netty-resolver-dns-native-macos:4.1.91.Final")

 

ㅇ maven과 gradle에 의존성을 추가하면 된다.

 

ㅁ 함께 보면 좋은 사이트

https://mvnrepository.com/artifact/io.netty/netty-resolver-dns-native-macos/4.1.91.Final

 

반응형
Comments