Troubleshooting CockroachDB data sources
The CockroachDB connector produces three sets of logs during normal runtime. Refer to the list below to understand what they are and how you can access them.
CockroachDB Plugin logs
The CockroachDB connector is built using the plugin framework. Therefore, it adheres to Delphix Continuous Data’s standard plugin logging behavior. We recommend starting here for all troubleshooting. Refer to the Troubleshooting document for more information.
Plugin logs for CockroachDB are found at the below locations.
CODE/{toolkit_directory}/Delphix_COMMON_{appliance_id}/plugin/sc:cockroach_{plugin-id}/CRDB/log_{os_user}/delphixCRDBDebug.log
CockroachDB Cluster logs
CockroachDB can write error messages to log files. The files are named using the following format:
CODEcockroach.[host].[user].[start timestamp in UTC].[process ID].logCBBACKUPMGR.
To make it easier to watch a log without knowing the full filename, a symlink with the short filename cockroach.log is also created.
{delphix_mount_path}/node<number>/logs/cockroach.log
This symlink points to the most recent log. The Cockroach log locations on staging or target host can be found at below locations:
CODE{CockroachDB_install_path} version --build-tag For example: /usr/local/bin/cockroach version --build-tag v21.2.2
Start CockroachDB multi-node cluster.
CODEcockroach 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.
CODEcockroach cert list --certs-dir=[path-to-certs-directory]
Initialize a Cluster from any CockroachDB node.
CODEcockroach init --certs-dir=[path-to-certs-directory] --host=<address of any node on --join list>
Start interactive CockroachDB SQL shell.
CODEcockroach sql --certs-dir=[path-to-certs-directory] --host=<address of any cluster-node>:<cockroach_db_port>
Use the --certs-dir option with the valid path to the certificate directory of the CockroachDB cluster.
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.
CODESHOW 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.
CODEcreate user dlpxadmin WITH PASSWORD 'dlpxadmin';
Grant access to CockroachDB User to access data.
CODEGRANT SELECT, INSERT ON TABLE vehicles to dlpxadmin;