2014-05-09 125 views
-1

上午成功安裝cassandra,當我用「connect localhost/9160;」這是工作的罰款我。我想用不同的IP地址進行連接測試/ Port.I被更改listen_addresscassandra.yaml文件並重新啓動服務器並測試它顯示下面的錯誤。如何連接到羣集prommatically

Exception retrieving information about the cassandra node, check you have connected to the thrift port. 

org.apache.thrift.transport.TTransportException: Read a negative frame size (-21 
13929216)! 
     at org.apache.thrift.transport.TFramedTransport.readFrame(TFramedTranspo 
rt.java:133) 
     at org.apache.thrift.transport.TFramedTransport.read(TFramedTransport.ja 
va:101) 
     at org.apache.thrift.transport.TTransport.readAll(TTransport.java:84) 
     at org.apache.thrift.protocol.TBinaryProtocol.readAll(TBinaryProtocol.ja 
va:362) 
     at org.apache.thrift.protocol.TBinaryProtocol.readI32(TBinaryProtocol.ja 
va:284) 
     at org.apache.thrift.protocol.TBinaryProtocol.readMessageBegin(TBinaryPr 
otocol.java:191) 
     at org.apache.thrift.TServiceClient.receiveBase(TServiceClient.java:69) 
     at org.apache.cassandra.thrift.Cassandra$Client.recv_describe_cluster_na 
me(Cassandra.java:1206) 
     at org.apache.cassandra.thrift.Cassandra$Client.describe_cluster_name(Ca 
ssandra.java:1194) 
     at org.apache.cassandra.cli.CliMain.connect(CliMain.java:138) 
     at org.apache.cassandra.cli.CliClient.executeConnect(CliClient.java:2393 
) 
     at org.apache.cassandra.cli.CliClient.executeCLIStatement(CliClient.java 
:282) 
     at org.apache.cassandra.cli.CliMain.processStatementInteractive(CliMain. 
java:201) 
     at org.apache.cassandra.cli.CliMain.main(CliMain.java:331) 

這實在是有幫助的me.Sorry我的英語不好..

回答

0

如果更改的唯一參數是listen_address,那麼你還需要使用端口9160與卡桑德拉-CLI連接。如果您還想更改該端口,則需要相應地調整cassandra.yaml中的rpc_port。 listen_address定義兩個Cassandra節點通過的端口。它獨立於用於Thrift客戶端的端口(如cassandra-cli)。