You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@pulsar.apache.org by "thomas-turner (via GitHub)" <gi...@apache.org> on 2023/07/03 11:03:50 UTC

[GitHub] [pulsar] thomas-turner commented on issue #20282: [Bug] DnsResolverUtil "Cannot get DNS TTL settings from sun.net.InetAddressCachePolicy class" in Java 17

thomas-turner commented on issue #20282:
URL: https://github.com/apache/pulsar/issues/20282#issuecomment-1617948821

   Running into a similar problem using Pulsar Client 3.0.0 and JDK 17 in one of our microservices:
   
   ```
   2023-07-03 11:58:41.915  WARN 19312 --- [           main] o.a.p.c.u.n.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 @1a708820
   ```
   
   This occurs when we build the `PulsarClient` object from the `client.api` package.
   I have tried, as mentioned above, adding `--add-opens java.base/sun.net=ALL-UNNAMED` to my VM args when running the service but I still get this exception.
   On top of that I have also tried building `branch-3.0` locally and I still get the exception with that build.
   Perhaps this issue is more widespread than just the functions local runner?


-- 
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: commits-unsubscribe@pulsar.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org