[
https://issues.apache.org/jira/browse/ZOOKEEPER-4268?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=17731161#comment-17731161
]
Andor Molnar edited comment on ZOOKEEPER-4268 at 6/10/23 5:32 AM:
------------------------------------------------------------------
I checked the code of StaticHostProvider on latest master and cannot find any
sign of reverse DNS lookups. Hostnames / IP addresses are parsed from the
command line into unresolved InetSocketAddresses which will be individually
resolved by the resolve() function once selected for connection.
resolve() will as for getHostString() which returns the hostname or IP address
without reverse lookup and we call InetAddress.getAllByName() which resolves
the hostname to IP or validates the address if it's already an IP.
ZOOKEEPER-2184 was about to re-resolve the hostname every time we try to
connect instead of doing it at startup.
I closed this as cannot reproduce.
was (Author: andorm):
I checked the code of StaticHostProvider on latest master and cannot find any
sign of reverse DNS lookups. Hostnames / IP addresses are parsed from the
command line into unresolved InetSocketAddresses which will be individually
resolved by the resolve() function once selected for connection.
resolve() will as for getHostString() which returns the hostname or IP address
without reverse lookup and we call InetAddress.getAllByName() which resolves
the hostname to IP or validates the address if it's already an IP.
I closed this as cannot reproduce.
> Avoid Reverse DNS lookup if the hostname in connection string is literal IP
> address.
> ------------------------------------------------------------------------------------
>
> Key: ZOOKEEPER-4268
> URL: https://issues.apache.org/jira/browse/ZOOKEEPER-4268
> Project: ZooKeeper
> Issue Type: Bug
> Affects Versions: 3.4.13, 3.4.14
> Reporter: guoaomen
> Assignee: Andor Molnar
> Priority: Major
>
> Fix https://issues.apache.org/jira/browse/ZOOKEEPER-2184, when the client
> connects to the server via ip, it will also perform dns reverse lookup. I
> think this shouldn’t be the case, dns reverse lookup should only work Domain
> name is valid
--
This message was sent by Atlassian Jira
(v8.20.10#820010)