-
Notifications
You must be signed in to change notification settings - Fork 67
Troubleshooting
Here are some known scenarios to watch out for and solutions on how to deal with them.
If your app has logging set to debug level for org.apache.pulsar
then you may see several exceptions at startup.[1]
While the logged exceptions may give you a sense of impending 💣 doom, they are actually expected under certain common circumstances.
The recommendation is to set the log level higher, for example in application.yml
with:
logging.level:
org.apache.pulsar: error
The exceptions are described as follows.
If you see the following exceptions in your startup log:
java.lang.UnsatisfiedLinkError: 'int org.apache.pulsar.shade.io.netty.internal.tcnative.Library.aprMajorVersion()'
or
java.lang.IllegalArgumentException: Failed to load any of the given libraries: [netty_tcnative_osx_x86_64, netty_tcnative_x86_64, netty_tcnative]
This is 🆗 and just a part of the normal startup when netty-tcnative
can not be loaded.
A summary log message is written at DEBUG
indicating that OpenSSL is unavailable and it will then use the JDK security provider.
DEBUG 19255 --- [r-client-io-1-1] o.a.p.s.io.netty.handler.ssl.OpenSsl : Failed to load netty-tcnative; OpenSslEngine will be unavailable, unless the application has already loaded the symbols by some other means. See https://netty.io/wiki/forked-tomcat-native.html for more information.
When? On Linux, this is typically not an issue. However, when running on a Mac (especially M1 using an X86 JDK) you are likely to encounter this.
Solution If you really want to use netty-tcnative then follow the netty-tcnative docs.
This exception is expected, it is trapped and logged by the Pulsar ObjectMapperFactory:
java.lang.ClassNotFoundException: org.apache.pulsar.shade.org.apache.pulsar.policies.data.loadbalancer.LoadManagerReport
When? You will always see this in the logs when using the shaded clients - which Spring for Apache Pulsar uses.
Solution If you need to deserialize the load report you will need to use the non-shaded client or handle the serialization yourself. The above solutions have not been verified and are very much "in theory".