You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@zookeeper.apache.org by "zhangzhisheng (Jira)" <ji...@apache.org> on 2023/05/24 07:45:00 UTC
[jira] [Commented] (ZOOKEEPER-3779) Zookeeper client 3.4.x fails to connect when using Java 14
[ https://issues.apache.org/jira/browse/ZOOKEEPER-3779?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=17725669#comment-17725669 ]
zhangzhisheng commented on ZOOKEEPER-3779:
------------------------------------------
{code:java}
// code placeholder
java.lang.IllegalArgumentException: Unable to canonicalize address 10.0.0.1/<unresolved>:2181 because it's not resolvable {code}
downgrade to JDK8
> Zookeeper client 3.4.x fails to connect when using Java 14
> ----------------------------------------------------------
>
> Key: ZOOKEEPER-3779
> URL: https://issues.apache.org/jira/browse/ZOOKEEPER-3779
> Project: ZooKeeper
> Issue Type: Bug
> Affects Versions: 3.4.14
> Environment: Java 14
> Reporter: Jaikiran Pai
> Priority: Major
>
> When running on Java 14, the 3.4.x version of `org.apache.zookeeper.Zookeeper` which creates a client to connect to a Zookeeper server, fails to connect against the server.
> This appears to be due to the use of `InetSocketAddress.toString()` to parse the host name of an unresolved address in StaticHostProvider[1]. The issue doesn't show up in 3.5.x versions of Zookeeper. But given that 3.4.x isn't that old, I thought I'll raise this here and see if it can be fixed and whether a new 3.4.x release is warranted.
> Furthermore, there was a discussion here[2] which explains the whole details. There's even a discussion in the openjdk net-dev mailing list[3] to see if there are other similar usages in Zookeeper which might be impacted by this change in the JDK 14. I don't have any real experience with this library, so if someone more knowledgable knows whether or not there are other similar usages in this project, please do reply to the net-dev discussion on the openjdk mailing list.
>
> [1] [https://github.com/apache/zookeeper/blob/branch-3.4.14/zookeeper-server/src/main/java/org/apache/zookeeper/client/StaticHostProvider.java#L135]
> [2] [https://github.com/quarkusio/quarkus/issues/8212#issuecomment-605403656]
> [3] https://mail.openjdk.java.net/pipermail/net-dev/2020-March/013725.html
--
This message was sent by Atlassian Jira
(v8.20.10#820010)