I tried to deploy YugabyteDB cluster based on instructions from Deploy | YugabyteDB Docs . My problem is that tserver processes are not registering with master processes. From tserver logs I can see that tserver process is trying to register to address 127.0.0.1:7100.
My masters are on 10.10.10.27 and 10.20.10.27.
tserver process is started with: /opt/yugabyte-2.1.5.0/bin/yb-tserver --flagfile /opt/yugabyte-2.1.5.0/etc/tserver.conf
tserver config file (/opt/yugabyte-2.1.5.0/etc/tserver.conf) looks like:
YugabyteDB uses Raft distributed consensus for both data replication and leader election (on a per-shard basis). This means that the replication factor of the cluster has to be an odd number like 3 or 5. And the number of yb-master servers has to match this replication factor since that is how the yb-master service is made continuously available.
In your conf file above, you have only 2 yb-master addresses. That is an invalid configuration. The AWS manual deployment doc and the regular manual deployment doc (Deploy | YugabyteDB Docs) highlight this aspect along with the steps. Hoping you can try setting up your cluster as per the documented steps and let us know on this thread how it goes.
As the documentation states, the above should be <host-ip>:9100 so that the servers can find each other correctly. And you should provide a similar value of <host-ip>:7100 for the yb-master servers. Any reason you are changing these values?
Also, I assume you are running a 3 node cluster where every host has 1 yb-tserver and 1 yb-master. But I see the following where yb-tserver is running on a different host. Can you pls confirm if this is a typo?
@sid.choudhury and @puska : it would be good to know the command line with which the masters are being brought up.
For both master and tserver, here are the guidelines regarding the use of rpc_bind_addresses. Either of the two modes below should be used:
Set --rpc_bind_addresses to the ip of the host. So yb-master’s command line would include --rpc_bind_addresses=10.10.10.27:7100 and a yb-tserver would include –rpc_bind_addresses=10.10.10.28:9100
If –rpc_bind_addresses is either not set at all or being set to 0.0.0.0, the parameter --server_broadcast_addresses should be set to the host ip. For a yb-master, that would include something like --server_broadcast_addresses=10.10.10.27:7100 and for the yb-tserver it would include something like –server_broadcast_addresses=10.10.10.28:9100. This allows the servers to advertise the right ip on which they can be reached.