Skip to content

HTTP services on macOS warn generate a warning about missing Netty MacOSDnsServerAddressStreamProvider #176

@pcholakov

Description

@pcholakov

We currently do not include a runtime dependency on Netty's macOS-specific DNS resolver package, which causes the following warning on startup:

2023-12-11 11:54:31 WARN   io.netty.resolver.dns.DnsServerAddressStreamProviders - Can not find io.netty.resolver.dns.macos.MacOSDnsServerAddressStreamProvider in the classpath, 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'

This doesn't seem to be causing examples to break in an obvious way but there are probably cases where it is desirable to use the native resolver config.

We may address this by including something like the following in our examples' project Gradle config:

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

dependencies {
  // ...

  if (osdetector.os == "osx") {
    runtimeOnly("io.netty:netty-resolver-dns-native-macos:4.1.72.Final:osx-${osdetector.arch}")
  }
}  

Since ARM-architecture macOS is likely going to be a common development platform, we may wish to fix this purely to suppress the WARN noise even if it doesn't break anything.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions