Skip to content
Advertisement

Spring Api-Gateway: (M1) java.lang.UnsatisfiedLinkError: no netty_resolver_dns_native_macos_aarch_64

Just to clearify this only occurs on M1 Mac, the intel version doesn’t seem to have this problem.

JDK 17

JavaScript

Project Diagram

enter image description here

Problem:

java.lang.UnsatisfiedLinkError exception is thrown when trying to access one of the microservice through API-Gateway. For example, http://localhost:8082/API-USER/users/status/ok will throw this exception.

The return value is correct, API-Gateway continuse to run dispite the annoying exception.

JavaScript

Question

Does any one know how to mitigate this error?

I tired…

Both of these links suggested to add netty-tcnative-boringssl-static dependency but that didn’t work as well….

API-Gateway : build.gradle

JavaScript

Advertisement

Answer

Found an issue on GitHub: https://github.com/netty/netty/issues/11020

Get the newest version: https://mvnrepository.com/artifact/io.netty/netty-resolver-dns-native-macos

Still doesn’t explain why this problem occurs, but here it is that fixed the issue for me:

Maven

JavaScript

Gradle

JavaScript
User contributions licensed under: CC BY-SA
9 People found this is helpful
Advertisement