2 server set up using manual installation of YugaByte with replication factor of 2

Hi, I’m new to Yugabytes. Please help me to figure this out.

I have 2 CentOS servers, where I wanted to deploy YugaByteDB using the generic binary v2.14 on both servers and setup as a 2-node cluster with replication as 2.
First of all is it possible to do this with only 2 servers because the leader election needs 3 instances?
I tried deploying the following commands,

# VM 1
yb-master \
   --master_addresses <vm-01>:7100,<vm-02>:7100 \
   --rpc_bind_addresses <vm-01> \
   --fs_data_dirs "/home/yugabyte/yb-data" > /home/yugabyte/yb-master.out 2>&1 &

# VM 2 
yb-master \
    --master_addresses <vm-01>:7100,<vm-02>:7100 
    --rpc_bind_addresses <vm-02> 
    --fs_data_dirs "/home/yugabyte/yb-data" > /home/yugabyte/yb-master.out 2>&1 &

# VM 1
yb-tserver 
    --tserver_master_addrs <vm-01>:7100,<vm-02>:7100 
    --rpc_bind_addresses <vm-01> 
    --fs_data_dirs "/home/yugabyte/yb-data" > /home/yugabyte/yb-tserver.out 2>&1 &

# VM 2
yb-tserver 
    --tserver_master_addrs <vm-01>:7100,<vm-02>:7100 
    --rpc_bind_addresses <vm-02> 
    --fs_data_dirs "/home/yugabyte/yb-data" > /home/yugabyte/yb-tserver.out 2>&1 &

But for some reason, VM1’s yb-master fails on VM1’s yb-tserver deployment. And again VM2 can run both at once.

VM2’s UI is accessible at port 7000 and shows this error.

Any help regarding this 2 node deployment is highly appriciated.

Hi @re4nightwing

2 nodes deployment is not supported. The minimum is 3. Please read Deployment checklist for YugabyteDB clusters | YugabyteDB Docs

In this case we have to look at logs of yb-master2 to know why it’s not starting Inspect logs | YugabyteDB Docs

It’s usually better to use a newer stable release like 2.20.

I understand but is it possible to deploy a yugabytedb cluster using 2 nodes + 1 witness node (container)?

No, it is not possible. The 3rd node has to be a normal node. When using the default synchronous replication model.