2

I have cassandra running on single node in Ubuntu Server 14.04 (with IP 10.3.2.92 and I am connected via VPN to the same network of the server). The following parameters in the file cassandra.yaml were changed:

listen_address: 10.3.2.92
rpc_address: 10.3.2.92
- seeds: "10.3.2.92"

rpc_port: 9160 and native_transport_port: 9042, so they are set to default. 

When I do in OSX in my machine:

./cqlsh 10.3.2.92 9160

I get the following error:

Connection error: ('Unable to connect to any servers', {'10.3.2.92': error(None, "Tried connecting to [('10.3.2.92', 9042)]. Last error: timed out")})

I have already tried nodetool enablethrift on server after started cassandra doing sudo service dse start, but without success. I tried at port 9042 too.

What am I doing wrong ?

Thanks in advance

EDIT :

Changed the native_transport_port to 8080 and it works. My private network admins blocked 9xxx ports.

joao-prg
  • 97
  • 1
  • 2
  • 11

2 Answers2

1

Basically cqlsh knows how to talk with a node by using 9042 only. If you are interested in 9160 you should use the cassandra-cli but this tool has been deprecated.

Anyway, since you tried 9042 I think you have some other networking issue. Just to make sure can you try if you are managing to pull off telnet 10.3.2.92 9042 if this doesn't work, check firewall settings on the node.

Marko Švaljek
  • 2,071
  • 1
  • 14
  • 26
  • No, telnet does not work even when I disable the firewall on the node (doing sudo ufw disable). – joao-prg Apr 19 '17 at 11:57
  • Until the port is open for some communication you have networking issue (sometimes there are firewalls on routers, please check with your admins) or the cassandra isn't even started. Could you check system.log of cassandra did it even start? – Marko Švaljek Apr 19 '17 at 12:02
  • Yes, cassandra started and gives a message saying that is listening for cql clients at 10.3.2.92:9042 – joao-prg Apr 19 '17 at 12:43
  • It says the state is filtered unknown ... you should be able to do something like: `telnet 127.0.0.2 9042 Trying 127.0.0.2... Connected to 127.0.0.2. Escape character is '^]'.` – Marko Švaljek Apr 19 '17 at 13:10
0

https://stackoverflow.com/a/43485961/839733

cqlsh knows how to talk with a node by using 9042 only.

Wrong!

cqlsh host port -u username -p password

works fine.

[cqlsh 5.0.1 | Cassandra 3.11.7 | CQL spec 3.4.4 | Native protocol v4]
Abhijit Sarkar
  • 21,927
  • 20
  • 110
  • 219