lhotari opened a new issue, #15349:
URL: https://github.com/apache/pulsar/issues/15349

   **Describe the bug**
   
   DnsResolverUtil fails to get existing DNS TTL settings. This happens in Java 
17. Error message:
   
   ```
   WARN  org.apache.pulsar.common.util.netty.DnsResolverUtil - Cannot get DNS 
TTL settings from sun.net.InetAddressCachePolicy class
     java.lang.IllegalAccessException: class 
org.apache.pulsar.common.util.netty.DnsResolverUtil cannot access class 
sun.net.InetAddressCachePolicy (in module java.base) because module java.base 
does not export sun.net to unnamed module @3932c79a
        at 
jdk.internal.reflect.Reflection.newIllegalAccessException(Reflection.java:392) 
~[?:?]
        at 
java.lang.reflect.AccessibleObject.checkAccess(AccessibleObject.java:674) ~[?:?]
        at java.lang.reflect.Method.invoke(Method.java:560) ~[?:?]
        at 
org.apache.pulsar.common.util.netty.DnsResolverUtil.<clinit>(DnsResolverUtil.java:46)
 ~[org.apache.pulsar-pulsar-common-2.11.0-SNAPSHOT.jar:2.11.0-SNAPSHOT]
        at 
org.apache.pulsar.client.impl.ConnectionPool.createDnsNameResolver(ConnectionPool.java:116)
 ~[org.apache.pulsar-pulsar-client-original-2.11.0-SNAPSHOT.jar:2.11.0-SNAPSHOT]
   ```
   
   **To Reproduce**
   
   Use Pulsar Java Client in Java 17
   
   
   **Expected behavior**
   
   Pulsar Java Client should be able to detect DNS TTL settings used in Java 
and apply them to Netty's DnsNameResolverBuilder.
   
   **Additional context**
   #15219
   


-- 
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]

Reply via email to