2017-02-20 135 views
0

一個AWS實例已安裝並運行Cassandra(2.1.16)。另一個AWS實例沒有安裝Cassandra,但正在使用apache-cassandra-2.1.16二進制文件中的sstableloader程序。在sstableloader服務器上使用的cassandra.yaml具有以下設置:將Cassandra sstableloader從一個AWS實例使用到另一個AWS實例失敗

羣集名: '測試集羣' listen_address: storage_port:7000 rpc_address:0.0.0.0 rpc_port:9160

兩個服務器都使用它具有開放組以下端口相同AWS安全組:

7000,9160

當我執行ssltableloader這樣的:

./sstableloader -d <CassandraNode> -f ../../cassandra/cassandra.yaml -v ../../cassandra/<Keyspace>/<CFName>/ 

我得到這個錯誤:

Established connection to initial hosts 
Opening sstables and calculating sections to stream 
Streaming relevant part of ../../cassandra/<Keyspace>/<CFName>/<Keyspace-CFName>-ka-6952-Data.db ../../cassandra/<Keyspace>/<CFName>/<Keyspace-CFName>-ka-6951-Data.db to [/public ip of Cassandra node] 
ERROR 20:06:33 [Stream #c7915b50-f7a7-11e6-bd84-8dd23712cb6e] Streaming error occurred 
java.net.ConnectException: Connection timed out 
at sun.nio.ch.Net.connect0(Native Method) ~[na:1.8.0_111] 
at sun.nio.ch.Net.connect(Net.java:454) ~[na:1.8.0_111] 
at sun.nio.ch.Net.connect(Net.java:446) ~[na:1.8.0_111] 
at sun.nio.ch.SocketChannelImpl.connect(SocketChannelImpl.java:648) ~[na:1.8.0_111] 
at java.nio.channels.SocketChannel.open(SocketChannel.java:189) ~[na:1.8.0_111] 
at org.apache.cassandra.tools.BulkLoadConnectionFactory.createConnection(BulkLoadConnectionFactory.java:62) ~[apache-cassandra-2.1.16.jar:2.1.16] 
at org.apache.cassandra.streaming.StreamSession.createConnection(StreamSession.java:240) ~[apache-cassandra-2.1.16.jar:2.1.16] 
at org.apache.cassandra.streaming.ConnectionHandler.initiate(ConnectionHandler.java:80) ~[apache-cassandra-2.1.16.jar:2.1.16] 
at org.apache.cassandra.streaming.StreamSession.start(StreamSession.java:227) ~[apache-cassandra-2.1.16.jar:2.1.16] 
at org.apache.cassandra.streaming.StreamCoordinator$StreamSessionConnector.run(StreamCoordinator.java:208) [apache-cassandra-2.1.16.jar:2.1.16] 
at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1142) [na:1.8.0_111] 
at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:617) [na:1.8.0_111] 
at java.lang.Thread.run(Thread.java:745) [na:1.8.0_111] 
progress: total: 100% 0 MB/s(avg: 0 MB/s)WARN 20:06:33 [Stream #c7915b50-f7a7-11e6-bd84-8dd23712cb6e] Stream failed 
Streaming to the following hosts failed: 
[/<public ip of Cassandra node>] 
java.util.concurrent.ExecutionException: org.apache.cassandra.streaming.StreamException: Stream failed 
at com.google.common.util.concurrent.AbstractFuture$Sync.getValue(AbstractFuture.java:299) 
at com.google.common.util.concurrent.AbstractFuture$Sync.get(AbstractFuture.java:286) 
at com.google.common.util.concurrent.AbstractFuture.get(AbstractFuture.java:116) 
at org.apache.cassandra.tools.BulkLoader.main(BulkLoader.java:125) 
Caused by: org.apache.cassandra.streaming.StreamException: Stream failed 
at org.apache.cassandra.streaming.management.StreamEventJMXNotifier.onFailure(StreamEventJMXNotifier.java:85) 
at com.google.common.util.concurrent.Futures$4.run(Futures.java:1172) 
at com.google.common.util.concurrent.MoreExecutors$SameThreadExecutorService.execute(MoreExecutors.java:297) 
at com.google.common.util.concurrent.ExecutionList.executeListener(ExecutionList.java:156) 
at com.google.common.util.concurrent.ExecutionList.execute(ExecutionList.java:145) 
at com.google.common.util.concurrent.AbstractFuture.setException(AbstractFuture.java:202) 
at org.apache.cassandra.streaming.StreamResultFuture.maybeComplete(StreamResultFuture.java:209) 
at org.apache.cassandra.streaming.StreamResultFuture.handleSessionComplete(StreamResultFuture.java:185) 
at org.apache.cassandra.streaming.StreamSession.closeSession(StreamSession.java:413) 
at org.apache.cassandra.streaming.StreamSession.onError(StreamSession.java:518) 
at org.apache.cassandra.streaming.StreamSession.start(StreamSession.java:233) 
at org.apache.cassandra.streaming.StreamCoordinator$StreamSessionConnector.run(StreamCoordinator.java:208) 
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) 

我已經成功地使用從sstableloader本地PC將數據加載到AWS上的卡桑德拉節點。我失敗的地方是當我嘗試從一個ASW實例到另一個ASW實例的sstableloader時。

爲了充分披露,我也嘗試過在2個實例之間打開所有端口,並導致相同的故障。

是否有配置步驟,我失蹤的實例試圖做sstableloading?

回答

0

Cassandra節點使用其公有IP作爲其broadcast_address。當我從我的盒子使用sstableloader時,這工作。嘗試從另一個AWS實例使用sstableloader時失敗,因爲該服務器無法通過其公共IP查找Cassandra節點。我能夠通過使用Cassandra節點的專用IP作爲broadcast_address使其工作。

相關問題