Hey folks,
Was trying to get ZK 3.4.14 (don't ask..) to run on Java 17. The server
seemed to start just fine, and responded to ruok, but basically nothing
worked.
After a bit of poking around, while debugging SimpleSysTest, I got the
following stack trace:
IllegalArgumentException: Unable to canonicalize address
localhost/<unresolved>:2181 because it's not resolvable
at
org.apache.zookeeper.SaslServerPrincipal.getServerPrincipal(SaslServerPrincipal.java:65)
at
org.apache.zookeeper.SaslServerPrincipal.getServerPrincipal(SaslServerPrincipal.java:41)
at
org.apache.zookeeper.ClientCnxn$SendThread.startConnect(ClientCnxn.java:1008)
at org.apache.zookeeper.ClientCnxn$SendThread.run(ClientCnxn.java:1080)
I doubt this is an actual DNS issue, given that this works just fine on
Java 11. But there seems to be something different about the way Java 17
handles resolution when connecting to sockets.
Any clues? I'm running the Adoptium JDK 17 build on Linux x86_64, though
I suspect this will happen on all 17 builds.
There is course a chance that this isn't the root cause at all, and that
this is just the side effect of some other incompatibility somewhere.
The line numbers in the stack trace are probably off, had to fiddle
about with it to get at the stack trace.
Thanks,
- Bram