Cassandra Server is installed on a Windows 7 PC, using local CQLSH, It can connect to the local server perfectly.
But when I try to connect to CQLSH from another PC in the same network, I get the following error message:
Connection error: (‘Unable to connect to any servers’, {‘MYHOST’:
error(10061, “Tried connecting to [(‘HOST_IP’, 9042)]. Last error: No
connection could be made because the target machine actively refused
it”)})
So I want to know how to configure it correctly (I should do it on the cassandra.yaml configuration file What changed) The Cassandra server allows remote connections.
Thank you in advance!
< /p>
In Cassandra 2.1, the cqlsh utility uses the native protocol. In Cassandra 2.1 using the Datastax python driver, the default cqlsh listening port is 9042.
The cassandra node should be bound The IP address to the server network card-it should not be 127.0.0.1 or localhost, this is the IP of the loopback interface, binding to this will prevent direct remote access. To configure the binding address, use the rpc_address parameter in cassandra.yaml . Setting it to 0.0.0.0 will listen to all network interfaces.
Have you checked whether the remote computer can connect to the Cassandra node? Is there a firewall between the machines? You can try the following steps to test it:
1) Make sure you can connect to this IP from your server:
$ssh [email protected]< /p>
2) Check the status of the node and confirm that it shows the same IP:
$nodetool status
3) Run the command to connect to the IP (if the default value is not used) , Then only specify the port):
$cqlsh xxx.xxx.xx.xx
I am trying to configure Cassandra Datastax Community Edition on Windows to For remote connection,
Cassandra Server is installed on a Windows 7 PC, using local CQLSH, it can connect to the local server perfectly.
But when I try to connect from the same network When another PC in my computer connects to CQLSH, I receive the following error message:
Connection error: (‘Unable to connect to any servers’, {‘MYHOST ‘:
error(10061, “Tried connecting to [(‘HOST_IP’, 9042)]. Last error: No
connection could be made because the target machine actively refused
it”)}) p>
So I want to know how to configure correctly (I should make changes in the cassandra.yaml configuration file) Cassandra server allows remote connections.
Thank you in advance!
Remote access to Cassandra is through its Cassandra 2.0 junk port. In Cassandra 2.0.x, the default cqlsh listening port is 9160, which is defined by the rpc_port parameter Defined in cassandra.yaml. By default, Cassandra 2.0.x and earlier versions enable Thrift by configuring start_rpc to true in the cassandra.yaml file.
In Cassandra 2.1, cqlsh The utility uses the native protocol. In Cassandra 2.1 using the Datastax python driver, the default cqlsh listening port is 9042.
The cassandra node should be bound to the IP address of the server network card-it should not be 127.0 0.1 or localhost, this is the IP of the loopback interface, binding to this will prevent direct remote access. To configure the binding address, use the rpc_address parameter in cassandra.yaml. Setting it to 0.0.0.0 will listen to all Network interface.
Have you checked whether the remote computer can connect to the Cassandra node? Is there a firewall between the machines? You can try the following steps to test it:
1) Make sure you can connect to this IP from your server:
$ssh [email protected]< /p>
2) Check the status of the node and confirm that it shows the same IP:
$nodetool status
3) Run the command to connect to the IP (if the default value is not used) , Then only specify the port):
$cqlsh xxx.xxx.xx.xx