1

I have setup Cassandra, and I've created a keyspace('mykeyspace') and a table in it. I started Cassandra as a service, added the cassandra.properties file like this, in the presto installation files:

connector.name=cassandra
cassandra.contact-points=localhost
cassandra.native-protocol-port=9142
cassandra.thrift-port=9160

After this I have issued this command in Presto but I'm not sure if it is connecting to the Cassandra data:

./presto --server localhost:8080 --catalog cassandra --schema mykeyspace

Now, when I give the command 'show tables', I get this Exception-message:

All host(s) tried for query failed (tried: localhost/127.0.0.1 (com.datastax.driver.core.TransportException: [localhost/127.0.0.1] Cannot connect))

I have used cqlsh, to view a created table in 'mykeyspace' in cassandra, and hence sure that cassandra is running.

I would really appreciate any help to clear this error.

Piotr Findeisen
  • 19,480
  • 2
  • 52
  • 82
Nishanth Reddy
  • 589
  • 2
  • 14
  • 27
  • have you resolved this? I m facing the same issue. I would really appreciate if you can share the solution here – Arvind Pant Mar 26 '21 at 12:28

1 Answers1

3

If you have a default cassandra installation, the dafault native protocol port is 9042. If that is the case, you can remove cassandra.native-protocol-port and cassandra.thrift-port properties.

If you want to keep this ports, you can change cassandra.yaml configuration file, property native_transport_port

I hope it's helps.

ajnavarro
  • 738
  • 3
  • 13