The GBase database (GBase 数据库)supports various deployment configurations, including standalone, primary-standby, and distributed modes.
This article provides examples of common issues encountered in primary-standby cluster maintenance. Each case includes environment details, error messages, troubleshooting steps, and solutions. Please exercise caution in production environments, and consult with technical staff when needed.
Issue 1
Environment: 500 primary-standby setup. Installation directory, logs, and data directory are all located under/home/gbase, and no VIP is configured in the cluster.
Issue: The application reported that it could not connect to the primary node database, with the error message:error: Unsupported or unrecognized SSL message.
Troubleshooting: The data node logs contained the error messageDETAIL: Permissions should be u=rw (0600) or less. Upon inspection, it was found thatchmod -R 777 /homehad been run under the root user, affecting the database directory located at/home/gbase/database.
Issue 2
Requirement: Configuring firewall rules for a 500 primary-standby database (default port15400).
Solution:
systemctl start firewalld
firewall-cmd --zone=public --add-port=15400/tcp --permanent
firewall-cmd --zone=public --add-port=15300/tcp --permanent
firewall-cmd --zone=public --add-port=15301/tcp --permanent
firewall-cmd --zone=public --add-port=15302/tcp --permanent
firewall-cmd --zone=public --add-port=15405/tcp --permanent
systemctl stop firewalld
systemctl start firewalld
firewall-cmd --zone=public --query-port=15400/tcp
Issue 3
Environment: 500 primary-standby database.
Issue: Changing the hostname or IP address caused the database to throw an error:xxxx list index out of range.
Solution:
1) Locate the Configuration XML:
find / -name *.xml
2) Replace Hostname in Configuration:
sed -i 's/old_hostname/new_hostname/g' /home/opt/gbase_package/cluster_config.xml
3) Reload Configuration with gs_om:
Update hostname:
gs_om -t generateconf -X /home/opt/gbase_package/cluster_config.xml --distribute
Update IP and Port:
gs_om -t generateconf --old-values=2345,192.x.x.100 --new-values=15400,192.x.x.100 --distribute
4) Restart Cluster:
gs_om -t stop; gs_om -t start
This guide aims to provide insights and practical solutions for common issues encountered during primary-standby maintenance in GBase database (GBase 数据库). Properly following these steps can help ensure smooth operations and effective troubleshooting.
SOCIAL SHARE CARD GENERATOR