我尝试使用sstableloader将SSTable(.db)文件加载到AWS EC2实例上运行的Cassandra集群中。发生此错误:
Established connection to initial hosts
Opening sstables and calculating sections to stream
Streaming relevant part of C:\Users\SNCUser\dataquest\CassandraLoader\WrDir\beed5b97-0b52-45d7-be5d-fbbac00ac607\device_data\blob\device_data-blob-ka-1-Data.db to [/172.*.*.*]
ERROR 16:08:36 [Stream #1114a0d0-1054-11e5-9ccc-65ee5fdd8902] Streaming error occurred
java.net.ConnectException: Connection timed out: connect
at sun.nio.ch.Net.connect0(Native Method) ~[na:1.8.0_45]
at sun.nio.ch.Net.connect(Net.java:458) ~[na:1.8.0_45]
at sun.nio.ch.Net.connect(Net.java:450) ~[na:1.8.0_45]
at sun.nio.ch.SocketChannelImpl.connect(SocketChannelImpl.java:648) ~[na:1.8.0_45]
at java.nio.channels.SocketChannel.open(SocketChannel.java:189) ~[na:1.8.0_45]
at org.apache.cassandra.tools.BulkLoadConnectionFactory.createConnection(BulkLoadConnectionFactory.java:62) ~[apache-cassandra-2.1.5.jar:2.1.5]
at org.apache.cassandra.streaming.StreamSession.createConnection(StreamSession.java:233) ~[apache-cassandra-2.1.5.jar:2.1.5]
at org.apache.cassandra.streaming.ConnectionHandler.initiate(ConnectionHandler.java:79) ~[apache-cassandra-2.1.5.jar:2.1.5]
at org.apache.cassandra.streaming.StreamSession.start(StreamSession.java:220) ~[apache-cassandra-2.1.5.jar:2.1.5]
at org.apache.cassandra.streaming.StreamCoordinator$StreamSessionConnector.run(StreamCoordinator.java:208) [apache-cassandra-2.1.5.jar:2.1.5]
at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1142) [na:1.8.0_45]
at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:617) [na:1.8.0_45]
at java.lang.Thread.run(Thread.java:745) [na:1.8.0_45]
progress: total: 100% 0 MB/s(avg: 0 MB/s)WARN 16:08:36 [Stream #1114a0d0-1054-11e5-9ccc-65ee5fdd8902] Stream failed
我使用" sstableloader -d publicip path \ keyspace \ table",它适用于localhost,但不适用于EC2实例的公共IP地址(我模糊了地址172的实际ip。 。*)。
可能与EC2防火墙有关,但是端口80的设置在实例上打开(尽管tcping超时)。
答案 0 :(得分:3)
您需要打开安全组中的服务器端口。端口80不用于节点间通信。完整列表如下: http://docs.datastax.com/en/cassandra/2.1/cassandra/security/secureFireWall_r.html