Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Setup 3 node cluster on multiple machines #2

Open
pscholle opened this issue Oct 16, 2020 · 2 comments
Open

Setup 3 node cluster on multiple machines #2

pscholle opened this issue Oct 16, 2020 · 2 comments

Comments

@pscholle
Copy link

Hey man!

Thanks for this repo! Was a big help in getting scylla running on my laptop.

Do you know what needs to be changed in the yaml files in order for ths setup to work on say two machines?

For example I started the seed node on one machine and want to start node2 and node3 on another machine. But nodes 2 and 3 are not showing up when I used nodetool to check the state of the cluster. I also changed the seeds parameter under seed_provider of the yaml file but that didnt seem to work. any ideas?

cheers!

@FrodeRanders
Copy link
Owner

Nice to hear from you! :)

Internally, Scylla uses a gossip protocol to make the cluster nodes aware of each other. This mechanism is not the same used to distribute data over the nodes in the cluster, but inherently as important.

This is from the Readme, indicating how a second node is started. Notice the --seeds argument?

docker run --name scylla-node2 --publish 9043:9042
--volume /Users/froran/scylla/mapped/node2:/var/lib/scylla
--volume /Users/froran/scylla/scylla-node2.yaml:/etc/scylla/scylla.yaml
--detach scylladb/scylla
--seeds="$(docker inspect --format='{{ .NetworkSettings.IPAddress }}' scylla-node1)"

This informs the second node to participate in the gossiping that eventually leads to transfer of data into this node and that this node will participate in cluster searches.

If you run Scylla on different physical machines, make sure they can talk with each other (no firewalls blocking the important ports), and then seed new nodes with the IP-address of (any) existing node in the cluster. In my example, I used 'docker inspect' to determine the IP-address of the first node, but it may be necessary to actually determine the IP-address of your nodes in order to correctly seed additional cluster nodes.

Hope this answer may be of any help.

// Frode

@pscholle
Copy link
Author

pscholle commented Oct 17, 2020

Hey man, thanks for that quick response!

Ja I played around with the seeds flag but to no avail. I think the ip was probably not correct. Is that the only parameter one has to change you think?
Looking at the yaml file there are quite a few ip address parameters one can fiddle around with. Like this here for example.

# seeds address(es) are mandatory!
seed_provider:
    # Addresses of hosts that are deemed contact points. 
    # Scylla nodes use this list of hosts to find each other and learn
    # the topology of the ring.  You must change this if you are running
    # multiple nodes!
    - class_name: org.apache.cassandra.locator.SimpleSeedProvider
      parameters:
          # seeds is actually a comma-delimited list of addresses.
          # Ex: "<ip1>,<ip2>,<ip3>"
          - seeds: "127.0.0.1"```Ja communication between the machines is no issue. 

What I did was change the seeds value to the ip of the host machine where the seed node was started, but luck there.

For example the ip is 10.1.0.22 and adding this to the seeds flag when running the docker container, and adding this in the yaml file didnt seem to work.

I'll figure it out eventually:)
Have a good weekend!
P

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants