Trying Out Yugabyte

Let's try installing a three-node Yugabyte cluster on a 2011-era laptop running Debian linux!

The quickstart guide is here..

We ran the suggested:

./bin/yb-ctl --rf 3 create

But it initially failed, because we had a Redis server running on the default port. So let's turn that off...

sudo systemctl stop redis

We need to destroy the partially-created system before retrying:

 ./bin/yb-ctl --rf 3 destroy

Then we retried the creation of three nodes, but our disks didn't spin fast enough to satisfy the default timeout values! So we found another failure.

Creating cluster.
Waiting for cluster to be ready.
Traceback (most recent call last):
  File "./bin/yb-ctl", line 2021, in <module>
  File "./bin/yb-ctl", line 1998, in run
  File "./bin/yb-ctl", line 1755, in create_cmd_impl
  File "./bin/yb-ctl", line 1598, in wait_for_cluster_or_raise
    raise RuntimeError("Timed out waiting for a YugaByte DB cluster!")
RuntimeError: Timed out waiting for a YugaByte DB cluster!
Error: Leader not ready to serve requests. (yb/master/
 Unable to list tablet servers: Leader not yet ready to serve requests: leader_ready_te
rm_ = -1; cstate.current_term = 1

Let's increase all the possible timeout values and hope that the install works:

# values in seconds
./bin/yb-ctl --timeout-yb-admin-sec 3000 --timeout-processes-running-sec 3000 --rf 3 create

This time it worked!

Creating cluster.
Waiting for cluster to be ready.
| Node Count: 3 | Replication Factor: 3
| JDBC                : jdbc:postgresql://
| YSQL Shell          : bin/ysqlsh
| YCQL Shell          : bin/ycqlsh
| YEDIS Shell         : bin/redis-cli
| Web UI              :
| Cluster Data        : /home/whoever/yugabyte-data

Can we connect to the redis-like interface (YEDIS)? Yes.

./bin/redis-cli> ping
PONG> ping

Can we connect to Yugabyte as a SQL database using the provided shell script? Yes.


Let's create a user and then try to connect with one of our favorite SQL GUIs, SQLWorkbench/J.

yugabyte=# create user whoever with password 'superhardtoguess';

Now we can connect using SQLWorkbench/J. We need to check the box for AUTOCOMMIT so that it's enabled. Notice that the port differs from the default of 5432. Also, helpfully, the team at Yugabyte made sure that there's a tutorial for connecting with SQLWorkbench/J. Thank you!

Connect with SQLWorkbench/J

So we're connected, but can we create a table? Yes. We waited 20 seconds for it to happen.

Creating a basic table

Thanks for Reading

This article was drafted on July 14, 2020.