How to fix the “Found Netty's native epoll transport in the classpath, but epoll is not available. Using NIO instead” warning?

后端 未结 1 1339
别跟我提以往
别跟我提以往 2020-12-03 21:03

I am using Cassandra and, during startup, Netty prints a warning with a stack trace:

Found Netty\'s native epoll transport in the classpath, but epoll

相关标签:
1条回答
  • 2020-12-03 22:03

    If you are running on Linux, you can use the native Linux driver. For instance, if you are using Maven, add a dependency like this:

    <dependency>
      <groupId>io.netty</groupId>
      <artifactId>netty-transport-native-epoll</artifactId>
      <version>4.0.27.Final</version>
      <classifier>linux-x86_64</classifier>
    </dependency>
    

    An alternative, you can suppress the warning by setting -Dcom.datastax.driver.FORCE_NIO=true. As it is only a performance optimization, it is a viable option to ignore it.

    For more background, refer to the Netty documentation about native transports.

    0 讨论(0)
提交回复
热议问题