You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@pulsar.apache.org by GitBox <gi...@apache.org> on 2022/04/27 11:12:58 UTC

[GitHub] [pulsar] lhotari opened a new issue, #15349: DnsResolverUtil "Cannot get DNS TTL settings from sun.net.InetAddressCachePolicy class" in Java 17

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

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


[GitHub] [pulsar] lgxbslgx commented on issue #15349: DnsResolverUtil "Cannot get DNS TTL settings from sun.net.InetAddressCachePolicy class" in Java 17

Posted by GitBox <gi...@apache.org>.
lgxbslgx commented on issue #15349:
URL: https://github.com/apache/pulsar/issues/15349#issuecomment-1139684809

   @lhotari @Technoboy- Have you started the work locally? If not, I would like to take it over.


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


[GitHub] [pulsar] michaeljmarshall closed issue #15349: DnsResolverUtil "Cannot get DNS TTL settings from sun.net.InetAddressCachePolicy class" in Java 17

Posted by GitBox <gi...@apache.org>.
michaeljmarshall closed issue #15349: DnsResolverUtil "Cannot get DNS TTL settings from sun.net.InetAddressCachePolicy class" in Java 17
URL: https://github.com/apache/pulsar/issues/15349


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


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

Posted by GitBox <gi...@apache.org>.
Technoboy- commented on issue #15349:
URL: https://github.com/apache/pulsar/issues/15349#issuecomment-1123171979

   I only know to add vm options `--add-opens=java.management/sun.management=ALL-UNNAMED` ` --add-opens=java.base/sun.net=ALL-UNNAMED` could solve the issue


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