Skip to content

Troubleshooting

Following logs will help to diagnose dSource/VDB issues related to this plugin.

CockroachDB dSource/VDB log files:

/{toolkit_directory}/Delphix_COMMON_{appliance_id}/plugin/sc:cockroach_{plugin-id}/CRDB/log_{os_user}/delphixCRDBDebug.log

CockroachDB log files: CockroachDB can write messages to log files. The files are named using the following format:

cockroach.[host].[user].[start timestamp in UTC].[process ID].log
To make it easier to watch a log without knowing the full filename, a symlink with the short filename cockroach.log is also created. This symlink points to the most recent log. The Cockroach log location on staging or target host can be found at below location:
{delphix_mount_path}/node0/logs/cockroach.log

Troubleshooting Queries:

Identify Cockroach Version:

{CockroachDB_install_path} version --build-tag
For example: 
/usr/local/bin/cockroach version --build-tag
v21.2.2

Start CockroachDB multi-node cluster:

cockroach start --certs-dir=[path-to-certs-directory] --advertise-addr=<node1 address> --join=<node1 address>,<node2 address>,<node3 address> --cache=.25 --max-sql-memory=.25

List CockroachDB certificate and keys:

cockroach cert list --certs-dir=[path-to-certs-directory]

Initialize a Cluster from any CockroachDB node:

cockroach init --certs-dir=[path-to-certs-directory] --host=<address of any node on --join list>

Start interactive CockroachDB SQL shell:

cockroach sql --certs-dir=[path-to-certs-directory] --host=<address of any cluster-node>:<cockroach_db_port>
Note: --certs-dir - It’s the valid path to the CockroachDB cluster’s certificate directory.

Find full backup subdirectories details:

SHOW BACKUPS IN 's3://{bucket name}/{path}?AWS_ACCESS_KEY_ID={placeholder}&AWS_SECRET_ACCESS_KEY={placeholder}';

Find full and incremental backups in a specific full backup subdirectory details:

SHOW BACKUP FROM LATEST IN 's3://{bucket name}?AWS_ACCESS_KEY_ID={placeholder}&AWS_SECRET_ACCESS_KEY={placeholder}';

Create CockroachDB User to login into CockroachDB console to access secure clusters:

create user dlpxadmin WITH PASSWORD 'dlpxadmin';

Generate HAProxy configuration file:

cockroach gen haproxy
For full details on HAProxy configurations settings, see the HAProxy Configuration Manual

For more information on cockroach commands overview, please refer to CockroachDB official documentation

Source Code Github Repo [ Internal Link ]