drTr0jan commented on issue #1740: URL: https://github.com/apache/logging-log4j2/issues/1740#issuecomment-5696146408
Hi, @ppkarwasz. Thx for detailed answer. I've investigated the flow of `InetAddress.getLocalHost()` in detail. And I believe that using `lookupAllHostAddr()` as SHOULD canonicalizational is incorrect. I think that AI_CANONNAME was been added to the `lookupAllHostAddr()` by mistake. And I agree with @vy, who opened https://bugs.openjdk.org/browse/JDK-8392344 Besides, I think that using canonicalization for lookup hostname it's not always good idea. There's two cases where it works incorrect: 1. Server (no containers) has a hostname, but haven't the hostname in DNS or hosts(5). In that case we have `host` as `localhost`, which is incorrect. 2. Container (not Linux, ex. FreeBSD jail) has a hostname, but has the hostname in hosts(5) as a second string (after the localhost). In that case we have `host` as `localhost` after 2.24.0. And have `host` as correct hostname before 2.24.0. -- This is an automated message from the Apache Git Service. To respond to the message, please log on to GitHub and use the URL above to go to the specific comment. To unsubscribe, e-mail: [email protected] For queries about this service, please contact Infrastructure at: [email protected]
