Articles in this section

Java warning shows when Pulsar outbound connector started

Detail

Once installed and started the latest Pulsar outbound connector 3.2.1, the below Java warning shows in connector log. However, it seems connector still works. What does the warning mean? Will it impact the connector functionality?


Answer

From debug log we could identify the Java Warnings is "An illegal reflective access operation has occurred". 

Details is showing below.
2023-08-29 14:44:42.423 GMT DEBUG NetUtil - -Djava.net.preferIPv4Stack: false
2023-08-29 14:44:42.423 GMT DEBUG NetUtil - -Djava.net.preferIPv6Addresses: false
2023-08-29 14:44:42.425 GMT DEBUG NetUtilInitializations - Loopback interface: lo (lo, 0:0:0:0:0:0:0:1%lo)
2023-08-29 14:44:42.425 GMT DEBUG NetUtil - /proc/sys/net/core/somaxconn: 4096
2023-08-29 14:44:42.433 GMT DEBUG DefaultHostsFileEntriesResolver - -Dio.netty.hostsFileRefreshInterval: 0
WARNING: An illegal reflective access operation has occurred
WARNING: Illegal reflective access by org.apache.pulsar.common.util.netty.DnsResolverUtil (file:/opt/aerospike-pulsar-outbound/lib/pulsar-client-admin-3.0.0.jar) to method sun.net.InetAddressCachePolicy.get()
WARNING: Please consider reporting this to the maintainers of org.apache.pulsar.common.util.netty.DnsResolverUtil
WARNING: Use --illegal-access=warn to enable warnings of further illegal reflective access operations
WARNING: All illegal access operations will be denied in a future release

We could confirm the warning is harmless, and also the module causing that warning should be the pulsar client itself. This is an example in Pulsar docs, we could see error happens when you start the client.

More information can be referred to: 
https://docs.streamnative.io/platform/configure-asyn-geo-replication

This is because starting from Java 9, new checks of illegal access, and it is common to have such kind of security warnings after the release of java 9. The permanent solution to this is to report the bug to the maintainers and wait for them to release a patch update.

However only at your own risk, yes you can continue without security 



 

Applies To Latest Version

Current Version
Was this article helpful?
0 out of 0 found this helpful