Summary: Reinstalling GBase Database(GBase 8c) after a failed deployment without cleaning up the previous state can cause repeated installation failures. This article covers three essential pre-installation cleanup checks: residual processes, installation directories, and occupied service ports.
Keywords: GBase Database, GBase Database 8c, Database Reinstallation, Database Installation Troubleshooting, Linux Process Management, Port Verification, Installation Cleanup
After a failed GBase Database(GBase 8c) installation, rerunning the installation script may seem like the fastest solution.
But a failed installation can leave residual processes, partially written directories, and occupied ports. Starting another installation without checking these resources can stack new problems on top of the previous failure.
Before reinstalling GBase Database, perform three cleanup checks: processes, directories, and ports.
1. Check Residual Database Processes
Start by checking whether an old database instance is still running.
ps -ef | grep gaussdb
If a previous instance is still active, it may continue holding the port required by the new installation.
However, not every related process contains gaussdb in its process name. Management agents and helper processes may also remain active.
When a port is still occupied, identify its owning process instead of assuming the main database process is responsible.
The key is to verify the actual process state before taking action.
2. Check the Installation Directory
Next, inspect the target installation directory.
ls -A /home/gbase/gbase_db
For a clean installation, verify that the target runtime directory meets the expected initialization requirements.
Pay particular attention to:
- Residual files from the previous installation.
- Partially written configuration or initialization files.
- Unexpected subdirectories.
- Directory ownership and permissions.
For this example, the directory should be empty and owned by gbase before initialization.
A partially written file from a failed attempt may prevent the next initialization from completing, even when the error message does not clearly identify the directory as the cause.
3. Check Occupied Service Ports
Finally, verify that the ports required by the deployment are available.
ss -tlnp | grep -E ':(20001|2379|6666|5432|15432) '
These example ports cover several GBase Database service and management components.
Do not check only the main database connection port. Coordination services, management agents, and other components may also require their own ports.
If a required port is occupied, identify the listening process and determine whether it belongs to the previous installation or another service.
A port being unavailable can prevent the new database instance or management component from starting.
4. Four Types of Residual State to Remember
Most repeated installation failures caused by incomplete cleanup can be traced to four types of residual state:
| Residual state | Verification method |
|---|---|
| Main database process | ps |
| Management or agent process |
ps and process lookup by port |
| Partially written installation directory | ls |
| Occupied service port | ss |
These checks are simple, but they cover different parts of the installation environment.
Stopping the main database process does not guarantee that the environment is clean. An agent process may still hold a port, or an incomplete directory may prevent initialization.
5. Automate Detection, Not Destructive Cleanup
For repeated GBase Database deployments, scripting these three checks is more reliable than depending on individual memory.
A useful pre-installation cleanup script should:
- Detect residual database and management processes.
- Inspect the target installation directory.
- Identify occupied service ports.
- Report which resources need attention.
- Stop and wait for human confirmation before any destructive action.
Automatic detection is useful. Automatically killing processes or deleting directories is much riskier.
Process termination and file removal should require human confirmation because the resources may belong to another active service or contain data that must be preserved.
Conclusion: Clean Means Clean, Not Just Stopped
A common failure scenario is stopping the main database process while leaving a management agent running. The agent continues holding a required port, and the next installation fails again.
For GBase Database(GBase 8c), a reliable reinstallation starts with verifying the actual state of the environment.
Check processes, inspect directories, and verify ports before running the installation script again.
Ten minutes of systematic cleanup is usually cheaper than losing an entire maintenance window to repeated installation failures.
Before reinstalling a database, make sure the previous installation has actually been cleaned up.
Top comments (0)