5

融合升级到 3.3.0 后,Cassandra 连接器失败。Cassandra驱动的版本是3.3。堆栈如下所示。

[2017-09-14 08:56:28,123] ERROR java.lang.reflect.InvocationTargetException 
(com.cantiz.nucleus.kafka.connector.cassandra.CassandraSinkTask:72)
java.lang.RuntimeException: java.lang.reflect.InvocationTargetException
at com.google.common.base.Throwables.propagate(Throwables.java:240)
at com.datastax.driver.core.NettyUtil.newEventLoopGroupInstance(NettyUtil.java:136)
at com.datastax.driver.core.NettyOptions.eventLoopGroup(NettyOptions.java:99)
at com.datastax.driver.core.Connection$Factory.<init>(Connection.java:774)
at com.datastax.driver.core.Cluster$Manager.init(Cluster.java:1446)
at com.datastax.driver.core.Cluster.init(Cluster.java:159)
at com.datastax.driver.core.Cluster.connectAsync(Cluster.java:330)
at com.datastax.driver.core.Cluster.connectAsync(Cluster.java:305)
at com.datastax.driver.core.Cluster.connect(Cluster.java:247)
at com.attinad.cantiz.iot.historian.cassandra.session.CassandraSessionManager.connect(CassandraSessionManager.java:33)
at com.cantiz.nucleus.kafka.connector.cassandra.CassandraSinkTask.start(CassandraSinkTask.java:61)
at org.apache.kafka.connect.runtime.WorkerSinkTask.initializeAndStart(WorkerSinkTask.java:232)
at org.apache.kafka.connect.runtime.WorkerSinkTask.execute(WorkerSinkTask.java:145)
at org.apache.kafka.connect.runtime.WorkerTask.doRun(WorkerTask.java:146)
at org.apache.kafka.connect.runtime.WorkerTask.run(WorkerTask.java:190)
at java.util.concurrent.Executors$RunnableAdapter.call(Executors.java:511)
at java.util.concurrent.FutureTask.run(FutureTask.java:266)
at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1142)
at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:617)
at java.lang.Thread.run(Thread.java:745)
Caused by: java.lang.reflect.InvocationTargetException
at sun.reflect.NativeConstructorAccessorImpl.newInstance0(Native Method)
at sun.reflect.NativeConstructorAccessorImpl.newInstance(NativeConstructorAccessorImpl.java:62)
at sun.reflect.DelegatingConstructorAccessorImpl.newInstance(DelegatingConstructorAccessorImpl.java:45)
at java.lang.reflect.Constructor.newInstance(Constructor.java:423)
at com.datastax.driver.core.NettyUtil.newEventLoopGroupInstance(NettyUtil.java:134)
... 18 more
Caused by: java.lang.NoClassDefFoundError: Could not initialize class io.netty.channel.epoll.EpollEventLoop
at io.netty.channel.epoll.EpollEventLoopGroup.newChild(EpollEventLoopGroup.java:71)
at io.netty.util.concurrent.MultithreadEventExecutorGroup.<init>(MultithreadEventExecutorGroup.java:64)
at io.netty.channel.MultithreadEventLoopGroup.<init>(MultithreadEventLoopGroup.java:50)
at io.netty.channel.epoll.EpollEventLoopGroup.<init>(EpollEventLoopGroup.java:56)
at io.netty.channel.epoll.EpollEventLoopGroup.<init>(EpollEventLoopGroup.java:48)
... 23 more
[2017-09-14 08:56:28,125] INFO Sink task WorkerSinkTask{id=cassandra-thing-event-desc-3} finished initialization and start (org.apache.kafka.connect.runtime.WorkerSinkTask:233)
[2017-09-14 08:56:28,123] ERROR java.lang.reflect.InvocationTargetException (com.cantiz.nucleus.kafka.connector.cassandra.CassandraSinkTask:72)
java.lang.RuntimeException: java.lang.reflect.InvocationTargetException

我已经尝试通过更新 guava 和 io.netty 依赖项,但它并没有解决问题。

4

1 回答 1

3

问题是由于 Cassandra 驱动程序 3.3.0 使用 Netty 4.0.47.Final 而不是 Netty 4.0.44.Final。通过排除 Netty 依赖项并添加 Netty 4.0.44.Final 作为必需的依赖项解决了该问题。一些用户已经报告了这一点。 卡桑德拉-1535

于 2017-09-15T09:04:37.737 回答