Somnium99 opened a new issue, #18441: URL: https://github.com/apache/pulsar/issues/18441
### Search before asking - [X] I searched in the [issues](https://github.com/apache/pulsar/issues) and found nothing similar. ### Version OS : 13.0.1 Ventura MacOS Pulsar : 2.10.2 ### Minimal reproduce step build.gradle.kts : ``` dependencies { implementation(platform("org.jetbrains.kotlin:kotlin-bom")) implementation("org.jetbrains.kotlinx:kotlinx-coroutines-core:1.6.4") testImplementation("org.jetbrains.kotlin:kotlin-test") testImplementation("org.jetbrains.kotlin:kotlin-test-junit") implementation("io.ktor:ktor-server-netty:2.1.3") implementation("org.apache.pulsar:pulsar-client:2.10.2") ``` also tried : ``` runtimeOnly("io.netty:netty-resolver-dns-classes-macos:4.1.85.Final") runtimeOnly("io.netty:netty-resolver-dns-classes-macos:4.1.85.Final:osx-x86_64") ``` Main.kt : ``` val pulsar = PulsarClient.builder().serviceUrl("pulsar://localhost:6650").build() ``` On running the program I get : ``` 21:42:28.732 [main] DEBUG org.apache.pulsar.shade.io.netty.util.NetUtilInitializations - Loopback interface: lo0 (lo0, 0:0:0:0:0:0:0:1%lo0) 21:42:28.733 [main] DEBUG org.apache.pulsar.shade.io.netty.util.NetUtil - Failed to get SOMAXCONN from sysctl and file /proc/sys/net/core/somaxconn. Default: 128 21:42:28.750 [main] DEBUG org.apache.pulsar.shade.io.netty.resolver.DefaultHostsFileEntriesResolver - -Dio.netty.hostsFileRefreshInterval: 0 21:42:28.753 [main] WARN org.apache.pulsar.shade.io.netty.resolver.dns.DnsServerAddressStreamProviders - Can not find org.apache.pulsar.shade.io.netty.resolver.dns.macos.MacOSDnsServerAddressStreamProvider in the classpath, fallback to system defaults. This may result in incorrect DNS resolutions on MacOS. 21:42:28.762 [main] 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 @3aefe5e5 at java.base/jdk.internal.reflect.Reflection.newIllegalAccessException(Reflection.java:392) at java.base/java.lang.reflect.AccessibleObject.checkAccess(AccessibleObject.java:674) at java.base/java.lang.reflect.Method.invoke(Method.java:560) at org.apache.pulsar.common.util.netty.DnsResolverUtil.<clinit>(DnsResolverUtil.java:46) at org.apache.pulsar.client.impl.ConnectionPool.createAddressResolver(ConnectionPool.java:121) at org.apache.pulsar.client.impl.ConnectionPool.lambda$new$1(ConnectionPool.java:109) at java.base/java.util.Optional.orElseGet(Optional.java:364) at org.apache.pulsar.client.impl.ConnectionPool.<init>(ConnectionPool.java:109) at org.apache.pulsar.client.impl.ConnectionPool.<init>(ConnectionPool.java:78) at org.apache.pulsar.client.impl.ConnectionPool.<init>(ConnectionPool.java:73) at org.apache.pulsar.client.impl.PulsarClientImpl.<init>(PulsarClientImpl.java:194) at org.apache.pulsar.client.impl.PulsarClientImpl.<init>(PulsarClientImpl.java:150) at org.apache.pulsar.client.impl.ClientBuilderImpl.build(ClientBuilderImpl.java:67) at MainKt.main(Main.kt:72) ``` ### What did you expect to see? No error. And a functioning program. ### What did you see instead? Program does not crash, but pulsar framework does not work. It also shows the mentioned stacktrace when trying to build a pulsar client. ### Anything else? _No response_ ### Are you willing to submit a PR? - [ ] I'm willing to submit a PR! -- 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]
