YMatrix
Quick Start
Connecting
Benchmarks
Deployment
Data Usage
Manage Clusters
Upgrade
Global Maintenance
Expansion
Monitoring
Security
Best Practice
Technical Principles
Data Type
Storage Engine
Execution Engine
Streaming Engine(Domino)
MARS3 Index
Extension
Advanced Features
Advanced Query
Federal Query
Grafana
Backup and Restore
Disaster Recovery
Graph Database
Introduction
Clauses
Functions
Advanced
Guide
Performance Tuning
Troubleshooting
Tools
Configuration Parameters
SQL Reference
Note!
It is strongly recommended to back up the configuration files under/etc/matrixdb6to another directory before performing any operations, or contact YMatrix technical support for assistance.
In upgrade scenarios, after reinstalling the YMatrix RPM package, restart the supervisor service on all nodes using:
sudo systemctl restart matrixdb6.supervisor.service
mxstop -af
supervisorctl enable-etcd-credential
mxstart -a
Run etcdctl with certificates specified:
Command:
etcdctl --endpoints="$ETCD_ENDPOINTS" \
--cacert "$MXCONFDIR/etcd_credential/ca.crt" \
--cert "$MXCONFDIR/etcd_credential/client.crt" \
--key "$MXCONFDIR/etcd_credential/client.key" \
--write-out=table endpoint status
Example output:
[mxadmin@ip-172-31-35-209 ~]$ etcdctl --endpoints="https://172.31.35.209:4679,https://172.31.32.54:4679,https://172.31.47.1:4679" \
> --cacert "$MXCONFDIR/etcd_credential/ca.crt" \
> --cert "$MXCONFDIR/etcd_credential/client.crt" \
> --key "$MXCONFDIR/etcd_credential/client.key" \
> --write-out=table endpoint status
+----------------------------+------------------+---------+---------+-----------+------------+-----------+------------+--------------------+--------+
| ENDPOINT | ID | VERSION | DB SIZE | IS LEADER | IS LEARNER | RAFT TERM | RAFT INDEX | RAFT APPLIED INDEX | ERRORS |
+----------------------------+------------------+---------+---------+-----------+------------+-----------+------------+--------------------+--------+
| https://172.31.35.209:4679 | 67e0d780ecd95b3b | 3.5.20 | 164 kB | false | false | 4 | 473 | 473 | |
| https://172.31.32.54:4679 | 9c2d17a0b36aed50 | 3.5.20 | 164 kB | true | false | 4 | 473 | 473 | |
| https://172.31.47.1:4679 | 5fa5b306916e2d84 | 3.5.20 | 164 kB | false | false | 4 | 473 | 473 | |
+----------------------------+------------------+---------+---------+-----------+------------+-----------+------------+--------------------+--------+
The default configuration directory is
/etc/matrixdbX.
Check etcd endpoints (HTTP/HTTPS):
grep -n "etcd_endpoints" "/etc/matrixdb6/physical_cluster.toml"
Example:
[mxadmin@ip-127-1-1-1 ~]$ grep -n "etcd_endpoints" "/etc/matrixdb6/physical_cluster.toml"
4:etcd_endpoints = ['https://127.1.1.1:4679', 'https://127.1.1.1:4679', 'https://127.1.1.1:4679']
Verify whether TLS credentials exist:
ls -la "/etc/matrixdb6/etcd_credential"
Example:
[mxadmin@ip-127-1-1-1 ~]$ ls -la "/etc/matrixdb6/etcd_credential"
total 28
drwx------. 2 mxadmin mxadmin 123 Jan 22 03:26 .
drwxr-xr-x. 6 root root 288 Jan 22 01:52 ..
-rw-------. 1 mxadmin mxadmin 1846 Jan 22 02:47 ca.crt
-rw-------. 1 mxadmin mxadmin 3272 Jan 22 02:47 ca.key
-rw-------. 1 mxadmin mxadmin 1513 Jan 22 02:47 client.crt
-rw-------. 1 mxadmin mxadmin 1708 Jan 22 02:47 client.key
-rw-------. 1 mxadmin mxadmin 407 Jan 22 01:52 meta.json
-rw-------. 1 mxadmin mxadmin 1558 Jan 22 02:47 server.crt
-rw-------. 1 mxadmin mxadmin 1704 Jan 22 02:47 server.key
How to determine if TLS is enabled:
TLS enabled:endpointsinphysical_cluster.tomlusehttps://..., and the filesca.crt,ca.key,server.crt,server.key,client.crt, andclient.keyexist under/etcd_credential.
TLS disabled:endpointsusehttp://..., and the/etcd_credentialdirectory does not exist.
supervisorctl enable-etcd-credential
supervisorctl enable-etcd-credential --rollback
Command:
supervisorctl enable-etcd-credential
Effects:
supervisord./etcd_credential./service/etcd.conf to change the client URL to https:// and enables --client-cert-auth.physical_cluster.toml to replace endpoints with https://....Example Output:
[mxadmin@ip-127-1-1-1 ~]$ supervisorctl enable-etcd-credential
EnableEtcdCredential succeeded.
Command:
supervisorctl enable-etcd-credential --rollback
Use Cases:
Effects:
/service/etcd.conf: removes TLS-related parameters and changes the client URL from https:// back to http://.physical_cluster.toml: reverts endpoints to http://..../etcd_credential directory.Example Output:
[mxadmin@ip-127-1-1-1 ~]$ supervisorctl enable-etcd-credential --rollback
EnableEtcdCredential succeeded.