我在CentOS 6.6上使用VPS。Cassandra拒絕連接
兩天來我試着啓動我已經安裝的Cassandra。
它的CLI只是不工作,給我錯誤。我嘗試了所有在線解決方案,但都沒有成功。
[email protected] [/etc/cassandra/conf]# cassandra-cli -h localhost
org.apache.thrift.transport.TTransportException: java.net.ConnectException: Connection refused
at org.apache.thrift.transport.TSocket.open(TSocket.java:185)
at org.apache.thrift.transport.TFramedTransport.open(TFramedTransport.java:81)
at org.apache.cassandra.thrift.TFramedTransportFactory.openTransport(TFramedTransportFactory.java:41)
at org.apache.cassandra.cli.CliMain.connect(CliMain.java:65)
at org.apache.cassandra.cli.CliMain.main(CliMain.java:237)
Caused by: java.net.ConnectException: Connection refused
at java.net.PlainSocketImpl.socketConnect(Native Method)
at java.net.AbstractPlainSocketImpl.doConnect(AbstractPlainSocketImpl.java:339)
at java.net.AbstractPlainSocketImpl.connectToAddress(AbstractPlainSocketImpl.java:200)
at java.net.AbstractPlainSocketImpl.connect(AbstractPlainSocketImpl.java:182)
at java.net.SocksSocketImpl.connect(SocksSocketImpl.java:392)
at java.net.Socket.connect(Socket.java:579)
at org.apache.thrift.transport.TSocket.open(TSocket.java:180)
... 4 more
Exception connecting to localhost/9160. Reason: Connection refused.
Welcome to Cassandra CLI version 2.0.14
The CLI is deprecated and will be removed in Cassandra 3.0. Consider migrating to cqlsh.
CQL is fully backwards compatible with Thrift data; see http://www.datastax.com/dev/blog/thrift-to-cql3
Type 'help;' or '?' for help.
Type 'quit;' or 'exit;' to quit.
[[email protected]]
我自己也嘗試cqlsh它給類似的錯誤:
[email protected] [/etc/cassandra/conf]# cqlsh
Connection error: Could not connect to localhost:9160
請幫助。
你對remote_address和listen地址的配置是什麼? – jny 2015-04-04 12:29:25
rpc_address和listen_address都是localhost。我嘗試了更多的組合。順便說一下,我的VPS IP是靜態的。你有什麼建議?預先感謝您的幫助。 – EresDev 2015-04-04 12:34:21