I have a Cassandra Service running on my Ubuntu Server with a single node now. I want to make it into a ring cluster with 3 nodes to get a feel of multinode cluster all being on the same server. By following the steps in this link https://www.youtube.com/watch?v=oHMJrhMtv3c, I tried to create a fresh cluster without stopping the already running cassandra service. But it has thrown address Caused by: java.net.BindException: Address already in use. So i tried changing the seeds ip to already running cassandra ip address and tried to run a second cassandra service in the foreground. This time it has thrown java.lang.RuntimeException: Unable to create thrift socket to ip port. Please let me know how to add nodes to a already running single node cluster on the same server.
相关问题
- Why doesn't php sleep work in the windows-subs
- What version of Java does Cassandra 3 require
- Installing Pydev for Eclipse throws error
- Error building gcc 4.8.3 from source: libstdc++.so
- Filter from Cassandra table by RDD values
相关文章
- 为什么nfs在不同版本的Linux下安装的文件都不一样
- Cassandra Read a negative frame size
- Incompatible JavaHl library loaded
- Python - Node.js (V8) runtime is not available on
- Stacktrace does not print in Glassfish 4.1 Cluster
- How does cassandra split keyspace data when multip
- How does Cassandra scale horizontally ?
- Ubuntu graphviz 'sfdp' not working
The easiest way to set up a multinode cluster on a single machine is using CCM. Currently you are running into issues with your nodes attempting all bind the same set of ports. CCM will work around this for you and auto increment ports ect...
https://github.com/pcmanus/ccm
Elaborating on the answer provided by h22 (I cannot comment on it yet) You will need node0 to be running on localhost with the default jmx port. It's only the additional nodes that need to change the cassandra.yaml Further if you are using cassandra 3 or beyond (on windows?), one needs to start the second cassandra node with -a parameter to skip the port checks.
Tried this on,
In cassandra.yaml, keep the following values different for different instances:
Use loopback address in both listen_address and broadcast_rpc_address. Keep the storage port same in all the instances(i.e. 7000).
It is very easy to run multiple Cassandra instances on the same Ubuntu machine as long as they have different IP addresses that all resolve to the local host. The entire 127.0.0.0/8 address block is reserved for loopback purposes so any packet sent to addresses (127.0.0.1 through 127.255.255.254) will be looped back.
ping
to check if the addresses resolve properly.Edit
cassandra.yaml
and replacelocalhost
to the IP address we give to that instance (like 127.0.0.2).SimpleSeedProvider
and put addresses of all other Cassandra instances to the seed list to make a cluster (like- seeds: "127.0.0.2","127.0.0.3"
Edit
cassandra-env.sh
, find where theJMX_PORT
property is set and give it a different value (different port) for every instance of Cassandra. Otherwise instances cannot run together because of the conflicts on this port../cassandra
startup script (you can write simple bash script for this later).Verify your topology with
./nodetool
status . For the two nodes, for instance, the output must look like