Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Netty:LogCleanupFilterBuildItem does not remove a message #40938

Closed
Karm opened this issue Jun 3, 2024 · 3 comments · Fixed by #43957
Closed

Netty:LogCleanupFilterBuildItem does not remove a message #40938

Karm opened this issue Jun 3, 2024 · 3 comments · Fixed by #43957
Assignees
Labels
Milestone

Comments

@Karm
Copy link
Member

Karm commented Jun 3, 2024

Describe the bug

I keep encountering:

Build resources:
 - 12.09GB of memory (75.6% of 16.00GB system memory, determined at start)
 - 10 thread(s) (100.0% of 10 available processor(s), determined at start)
01:09:13,109 INFO  [org.jbo.res.res.i18n] RESTEASY002225: Deploying jakarta.ws.rs.core.Application: class com.example.quarkus.QuarkusRestApplication
01:09:26,536 WARN  [io.net.res.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'

So it seems this doesn't work: NettyProcessor.java#L302

    /**
     * On mac, if you do not have the `MacOSDnsServerAddressStreamProvider` class, Netty prints a warning saying it
     * falls back to the default system DNS provider. This is not a problem and generates tons of questions.
     *
     * @return the log cleanup item removing the message
     */
    @BuildStep
    LogCleanupFilterBuildItem cleanupMacDNSInLog() {
        return new LogCleanupFilterBuildItem(DnsServerAddressStreamProviders.class.getName(), Level.WARN,
                "Can not find io.netty.resolver.dns.macos.MacOSDnsServerAddressStreamProvider in the classpath");
    }

Expected behavior

No warning.

Actual behavior

Warning in the build log.

How to Reproduce?

e.g. build this project: https://github.com/Karm/mandrel-integration-tests/tree/master/apps/quarkus-full-microprofile
(patch with quarkus_3.8.x.patch first)

mvn package -Pnative -Dquarkus.version=3.8.4

Output of uname -a or ver

Darwin mandrel-macos-aarch64-1.local 23.5.0 Darwin Kernel Version 23.5.0: Wed May 1 20:14:38 PDT 2024; root:xnu-10063.121.3~5/RELEASE_ARM64_T6020 arm64

Output of java -version

openjdk 21.0.3 2024-04-16 LTS

Quarkus version or git rev

3.8.4

Build tool (ie. output of mvnw --version or gradlew --version)

Apache Maven 3.9.7 (8b094c9513efc1b9ce2d952b3b9c8eaedaf8cbf0) Maven home: /opt/apache-maven-3.9.7 Java version: 21.0.3, vendor: Eclipse Adoptium, runtime: /Users/tester/tmp/mandrel-23.1.3.1-Final/Contents/Home

Additional information

% native-image --version
native-image 21.0.3 2024-04-16
OpenJDK Runtime Environment Mandrel-23.1.3.2-dev49b42155870 (build 21.0.3+9-LTS)
OpenJDK 64-Bit Server VM Mandrel-23.1.3.2-dev49b42155870 (build 21.0.3+9-LTS, mixed mode)

@Karm Karm added the kind/bug Something isn't working label Jun 3, 2024
Copy link

quarkus-bot bot commented Jun 3, 2024

/cc @cescoffier (netty), @franz1981 (netty), @galderz (mandrel), @jponge (netty), @zakkak (mandrel)

@Karm Karm changed the title Netty:LogCleanupFilterBuildItem does not remove MacOSDnsServerAddressStreamProvider message Netty:LogCleanupFilterBuildItem does not remove a message Jun 3, 2024
@geoand
Copy link
Contributor

geoand commented Jun 3, 2024

So this happens during native image build, correct?

If so, we probably need to augment io.quarkus.runtime.graal.DisableLoggingFeature

@Karm Karm self-assigned this Jun 3, 2024
@Karm
Copy link
Member Author

Karm commented Jun 3, 2024

@geoand Oh, I see.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging a pull request may close this issue.

3 participants