4

融合升級到3.3.0後,Cassandra連接器失敗。 Cassandra驅動程序的版本是3.3。堆棧如下。融合3.3升級後Kafka-cassandra連接器失敗

[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.net的依賴關係,但它沒有解決問題。

回答

1

該問題是由於Cassandra驅動3.3.0使用Netty 4.0.47.Final而不是Netty 4.0.44.Final。通過排除Netty依賴關係並添加Netty 4.0.44.Final作爲所需的依賴關係解決了該問題。哪些已經由某些用戶報告過。 cassandra-1535