When experimenting with Cassandra I've observed that Cassandra listens to the following ports:
- TCP *:8080
- TCP *:8888
- TCP *:57311
- TCP *:57312
- TCP 127.0.0.1:7000
- TCP 127.0.0.1:9160
- UDP 127.0.0.1:700
How does Cassandra use each of the ports listed?
When experimenting with Cassandra I've observed that Cassandra listens to the following ports:
How does Cassandra use each of the ports listed?
@Schildmeijer is largely right, however port 7001 is still used when using TLS Encrypted Internode communication
So my complete list would be for current versions of Cassandra:
For Apache Cassandra 2.0 you need to take into account the following TCP ports: (See EC2 security group configuration and Apache Cassandra FAQ)
com.sun.management.jmxremote.rmi.port
property.A possible architecture with Cassandra + OpsCenter on EC2 could look like this:
8080 - JMX (remote)
8888 - Remote debugger (removed in 0.6.0)
7000 - Used internal by Cassandra
(7001 - Obsolete, removed in 0.6.0. Used for membership communication, aka gossip)
9160 - Thrift client API
Cassandra FAQ What ports does Cassandra use?
Ports 57311 and 57312 are randomly assigned ports used for RMI communication. These ports change each time Cassandra starts up, but need to be open in the firewall, along with 8080/7199 (depending on version), to allow for remote JMX access. Something that doesn't appear to be particularly well documented, but has tripped me up in the past.
I resolved issue using below steps :
Stop cassandara services
sudo su -
systemctl stop datastax-agent
systemctl stop opscenterd
systemctl stop app-dse
Take backup and Change port from 9042 to 9035
cp /opt/dse/resources/cassandra/conf/cassandra.yaml /opt/dse/resources/cassandra/conf/bkp_cassandra.yaml
Vi /opt/dse/resources/cassandra/conf/cassandra.yaml
native_transport_port: 9035
Start Cassandra services
systemctl start datastax-agent
systemctl start opscenterd
systemctl start app-dse
create cqlshrc file.
vi /root/.cassandra/cqlshrc
[connection]
hostname = 198.168.1.100
port = 9035
Thanks, Mahesh