You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
This repository has been archived by the owner on Apr 1, 2024. It is now read-only.
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.
Original Issue: apache#15349
Describe the bug
DnsResolverUtil fails to get existing DNS TTL settings. This happens in Java 17. Error message:
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
apache#15219
The text was updated successfully, but these errors were encountered: