Connecting two desktop PC into multi node cluster Cassandra - cassandra

I'm doing this for the very first time and I need help about clearing some stuffs.
I have Ubuntu 14.04 desktop on one machine, and on the other I have Windows 8.1. also on both machines I have installed the same version of Cassandra.
Can someone tell me, is it possible to connect 2 desktop machines and make a cluster with 2 nodes in Cassandra and how?

You need make sure the following settings are set correctly in the cassandra.yaml on each machine:
cluster_name - this needs to be the same on both nodes
seed_provider.parameters.seeds - this needs to be set to the external IP address of one of the nodes and needs to be the same on both nodes.
listen_address - this needs to be set to the external IP address on each machine.
Note: Make sure you can ping each machine from the other on the IP address you use for the listen_address and make sure that the storage_port 7000 isn't blocked by a firewall on either machine.

Related

Redhat Linux Network Interface Autostart

We have a PostgreSQL cluster with 2 instances, one of them primary and other one is primary. Both of them are running on Red Hat Enterprise Linux release 8.5 (Ootpa). In order unify connection string we use virtual IP.
We have problem with managing virtual IP. We are managing VIP manually.
On the standby node content of my /etc/sysconfig/network-scripts/ifcfg-eth0:1 :
NAME="eth0:1"
DEVICE="eth0:1"
ONBOOT=no
NETBOOT=no
BOOTPROTO=none
IPADDR=$My-VIP
NETMASK="255.255.255.240"
TYPE=Ethernet
PEERDNS=no
When I reboot this standby server it tries to start "eth0:1" interface even though "ONBOOT=no" parameter and that cause trouble because same VIP, "$My-VIP", is already taken by primary instance.
Is there any other configuration that I should check?
If you need extra information or logs please let me know I will provide it as soon as possible.
Thank you in advance!
According to news that I got from my ex colleagues it is because of base interface, "eth0". After reboot eth0 starts all interfaces that depends on it. Only way to get rid of this commenting IPADDR out for eth0:1.

Which kind of network should i choose to setup a Satndalone Spark Cluster

I have 2 PC (with Windows as default OS), let's say PC_master and PC_slave. Since it is recommended to work with Linux to manage a spark Cluster i created one Virtual Machines with Linux on each of theses PC: VM_master on PC_master and VM_slave on PC_slave.
I would like to setup a Standalone Spark Cluster, so which Networking configuration should i use (NAT, Bridge, HostOnly?) for theses 2VM in order that they own their private IP adress letting me ssh from one to another without the need of port forwarding ?
Edit: My two laptop are linked to the same box, so they have private IP and supposed to be linked to the same router.
Finally it seems that if i want to give each VM its own Ip adress to create a private Network i have to choose Bridge Network which will assign a unique Ip for each VM!

Settting a Spark Standalone Cluster using two different Windows machines

I would like to set up an apache spark Standalone cluster using two different computers (windows 10) of the same wifi network as slaves.
I can successfully set up the master using Windows bash(linux subsystem) and connect a slave from the same machine.
The problem is when I'm trying to connect a slave from a different machine (same wifi) using the local ip of the master. I even temporarily opened up all the ports of both the machines and mamaged to view the spark ui from the slave machine using the local ip of the master. But still trying to set up a slave on master-local-ip:7077 didn't work.
I believe that the correct way is to use password-less ssh between them but I'm not sure how to configure it for local ip addresses using the windows bash. I tried to create the key and when I executed ssh-copy-id the connection refused.
Any suggestions?

How to access the Cassandra browser terminal running on VirtualBox?

I'm trying to access the Cassandra browser terminal but the reported IP is unreachable.
I'm following the instructions to install Cassandra on VirtualBox here, and have the following configuration:
And Cassandra appears to start up appropriately:
But I'm unable to hit the provided IP (10.0.0.2)
Any idea what's wrong?
Ok, so I went to Install Cassandra OVA on VirtualBox and followed the instructions (like you did). And it didn't work for me, either.
What did work, was messing with the network settings and ultimately switching to a "Bridged" network adapter:
This put the CassandraVM on my internal network, and I was then able to reach everything from an internal IP (192.168.0.103, in my case).
Also, not sure if it made a difference, but I set Promiscuous Mode to "Allow All."
Had the same issue. Here's what worked for me (the solution came from this VirtualBox forum post).
In Host-only Network Details select the Adapter tab and change the ipv4 address into something inside the 10.0.0.x range. I think you should avoid conflicts with settings in the DHCP Server tab, thus a suitable choice would be 10.0.0.254, for example.
Also, I think you should configure your virtual machine's network settings this way:
Attach to: select Host-only Adapter
Name: select vboxnet0
I've also set Allow All for Promiscous Mode, but I don't know if it's strictly required.

How can I develop using a local VM server without using URLs with ports in them?

I'm setting up a linux server in a VM for my development.
Previously I've had PHP, MySQL etc etc all installed locally on my Mac. Apart from being a security risk, it's a drag to maintain and keep up to date, and there's a risk that an OS upgrade will wipe part of your setup out as the changes you make are fairly non-standard.
Having the entire server contained within a VM makes it easily upgradable and portable between machines. It means I can have the same configuration as the destination server and with shared folders even if the VM gets corrupted my work is safe on the host machine.
Previously with the local installation I was able to develop on convenient URLs like http://site.dev. I'd quite like to carry this over to the VM way of development but I'm struggling to figure out how, if it's possible at all.
Here's the problem:
In Bridged mode, the VM is part of the same network as the host. This is great but I can't choose a fixed IP address as I may be joining other networks and that address may be taken already. I'd like a consistent way of addressing my VM.
In NAT mode I can't directly address the VM without using port forwarding. I can use http://site.dev if I use the hosts file to forward that to localhost and then localhost:8080 forwards to the vm:80. The trouble is I have to access http://site.dev:8080 which is inconvenient for URL construction.
Does anyone know a way around this? I'm using ubuntu server and virtualbox.
Thanks!
The answer is to define a separate host-only network adapter and use that for host->guest communication.
You can do this by powering down the guest and adding the adapter in the VM settings. Once that's done you can boot the guest again and configure the new network interface however suits you best. I chose a fixed IP address in an unused range.

Resources