Before deployment, perform an environment check based on the actual components and versions to be deployed.
Port planning and check
Port planning
When deploying OceanBase Database, the default ports that need to be opened for each component are listed in the following table. Before deployment, please allow the corresponding ports in the security group or firewall in advance based on the actual components and versions to be deployed, and check whether the ports are occupied.
OBServer core port
Port |
Purpose |
Description |
|---|---|---|
| 2880 | Reserved port (deprecated) | Version 2.2.3 was previously used for high-priority RPC services and has been deprecated. |
| 2881 | SQL service port | MySQL protocol standard SQL access port |
| 2882 | RPC service port | Internal communication port between OBServer nodes |
OBProxy (ODP) port
Port |
Purpose |
Description |
|---|---|---|
| 2883 | SQL proxy service port | Default port for clients to access the database through OBProxy |
| 2884 | Prometheus monitoring port | Monitoring data collection port |
| 2885 | RPC service port | Supported starting from OBProxy-3.4.0 |
| 2888 | Management console port | Used in some versions |
OCP (OceanBase Control Platform) port
Port |
Purpose |
Description |
|---|---|---|
| 8080 | HTTP service port | Management interface of OCP Standard Edition |
| 8180 | HTTP service port | Management interface of OCP Express |
| 8443 | HTTPS service port | Security access port for OCP Standard Edition |
| 8445 | HTTPS service port | Secure access port for OCP Express |
| 2881 | Metadb port | MySQL protocol port |
| 62888 | OCP-Agent O&M listening port | OCP-Agent O&M management listening port (supported starting from OCP 2.0) |
| 62889 | OCP-Agent collection listening port | OCP-Agent monitoring data collection listening port (supported starting from OCP 2.0) |
OMS (OceanBase Migration Service) port
Port |
Purpose |
Description |
|---|---|---|
| 8089/8090 | Management console port | OMS console port |
| 8084 | supervisorctl Web interface | Standalone deployment mode: supervisorctl web interface; Separated deployment mode: supervisorctl web interface of the management node |
| 9084 | supervisorctl Web interface | Standalone deployment mode: This port is not required. Separated deployment mode: supervisorctl web interface of component nodes |
| 8088 | Cluster management module port | The OMS cluster management module, whose component name in supervisorctl is oms_drc_cm |
| 9000/9001 | Host agent service port | Service port of the host agent process |
| 7100-7499 | Random port for internal components | Random port of OMS internal components |
| 16000-18499 | Random port for internal components | Random ports for OMS internal components (including the three ranges: 16000–16499, 17000–17499, and 18000–18499) |
OAT (OceanBase Auto Tool) port
Port |
Purpose |
Description |
|---|---|---|
| 7000 | Web management interface port | Default GUI port of the automated deployment tool |
OCP-Agent port
Port |
Purpose |
Description |
|---|---|---|
| 62888 | O&M listening port | OCP-Agent O&M management listening port (supported starting from OCP 2.0) |
| 62889 | Collection listening port | OCP-Agent monitoring data collection listening port (supported starting from OCP 2.0) |
OCS (OceanBase Cluster Service) port
Port |
Purpose |
Description |
|---|---|---|
| 2886 | Open API service port | Supported starting from OCS-4.2.1. You can specify the port by using ocs_agent -p 2886. |
Log service cluster port (OB 4.4.0+ shared storage mode)
Port |
Purpose |
Description |
|---|---|---|
| 7890 | RPC service port | RPC communication of the log service cluster |
| 7891 | HTTP service port | Used for cluster management and monitoring |
OBD web management interface port
Port |
Purpose |
Description |
|---|---|---|
| 8680 | Web service port | The default port for the OBD web management interface. You can specify a custom port by using obd web -p. |
Summary of component ports
Component |
Default Port |
Purpose |
Description |
|---|---|---|---|
| OBServer | 2880 | Reserved (deprecated) | Version 2.2.3 was previously used for high-priority RPCs and has been deprecated. |
| OBServer | 2881 | SQL service | MySQL protocol standard SQL access port |
| OBServer | 2882 | RPC service | Internal communication port between nodes |
| OBProxy | 2883 | SQL proxy | Client database access port |
| OBProxy | 2884 | Prometheus monitoring | Monitoring data collection |
| OBProxy | 2885 | RPC service | Supported OBProxy versions: 3.4.0 and later |
| OCP | 8080 | HTTP service | Standard edition management interface |
| OCP | 8180 | HTTP service | Express edition management interface |
| OCP | 8443/8445 | HTTPS service | Secure access port |
| OCP-Agent | 62888 | O&M listening | OCP-Agent O&M management (OCP 2.0+) |
| OCP-Agent | 62889 | Collection listening | OCP-Agent data collection (OCP 2.0+) |
| OMS | 8089/8090 | Management console | OMS console port |
| OMS | 8084 | supervisorctl Web | Management node for standalone deployment/separated deployment |
| OMS | 9084 | supervisorctl Web | Separated deployment of component nodes |
| OMS | 8088 | Cluster management module | oms_drc_cm component |
| OMS | 9000/9001 | Host agent | Service port of the host agent process |
| OMS | 7100-7499 | Internal random port | Random port of OMS internal components |
| OMS | 16000-18499 | Internal random port | Random port of OMS internal components |
| OAT | 7000 | Web management interface | UI of the automated deployment tool |
| OCS | 2886 | Open API service | Supported in OCS-4.2.1 or later |
| Log service | 7890/7891 | RPC/HTTP service | OB 4.4.0+ shared storage mode |
| OBD Web | 8680 | Web service | You can specify a custom port on the command line. |
Considerations
- Port conflict check: Before deployment, check whether the ports are occupied, especially ports in the 2881-2885 series. Note that port 2880 is deprecated, and port 2886 is used as the default port for the OCS service. Adjust the port according to the actual situation during deployment.
- Firewall configuration: You must open the corresponding ports in the security group or firewall. In a production environment, we recommend that you restrict access sources by using firewall rules.
- Version compatibility:
- Port 2885 requires OBProxy-3.4.0 or later.
- The log service's ports 7890 and 7891 are supported starting from OB 4.4.0.
- OCS's port 2886 is supported starting from OCS-4.2.1.
- Port range: All ports have a value range of (1024, 65536), which can be adjusted according to actual needs.
- Production environment recommendation: It is recommended to use non-default ports to enhance security.
Port conflict check
Before deploying each component of OceanBase, confirm that all required ports are not occupied. Pay special attention to the following high-conflict-risk ports:
- Port 8088: The OMS cluster management module (oms_drc_cm) uses this port. Be cautious of conflicts when deploying it together with other components that also use port 8088.
- Port 8080: The standard edition HTTP service of OCP uses this port. Be cautious of conflicts when deploying it together with other components that also use port 8080.
- Ports 62888/62889: OCP-Agent uses these ports for O&M listening and data collection. Ensure they are not occupied.
- Ports 9000/9001: The OMS host Agent process uses these ports. Ensure they are not occupied.
- Mixed deployment of OCP and arbitration nodes: When OCP and arbitration nodes (Arbitration) are deployed on the same server, check in advance whether their default ports conflict and manually adjust the conflicting ports in the deployment configuration.
Common commands for checking port occupancy:
# Check if the specified port is occupied
ss -tlnp | grep <port number>
# or
lsof -i :<port number>
Disk space check
The installation packages for various OceanBase components are quite large (for example, a single OMS installation package can reach several GB). Additionally, the deployment process requires storing images, logs, and data files. Insufficient disk space will cause deployment failure.
Before deployment, confirm the available space in the following directories:
Directory |
Description |
Recommended available space |
|---|---|---|
| Installation package download directory | Stores installation packages for various components | Determined by the number of deployed components. It is recommended to reserve more than 100 GB. |
| OAT working directory | OAT installation and running directory | We recommend reserving sufficient space; 100 GB may not be sufficient. |
| OBServer data directory | Database data file storage | Plan based on business data volume |
| Log directory | Component operation logs | It is recommended to reserve more than 20 GB. |
Common commands for checking disk space:
# Check the available space of each mount point.
df -h
# Check the space used by a specified directory
du -sh <directory path>
Notice
If the installation package download directory has insufficient space, OAT will directly report an error and fail during image pulling or installation. Ensure there is sufficient directory space before deployment. Expand the capacity or change the directory if necessary.
.bashrc check
Before installing OAT, check the /root/.bashrc file on the server to ensure it does not contain commands that are only applicable to interactive shells. Otherwise, OAT installation will fail.
Background information
During the OAT installation process, the Airflow task executes Python scripts in a non-interactive environment, where the .bashrc file is loaded. If the .bashrc file contains commands such as bind, which are intended for interactive shells, the following issues may occur:
- When executing the
bindcommand in a non-interactive shell, a"line editing not enabled"warning is generated. - This warning message is captured by the script that detects the operating system type.
- The warning message is mistakenly passed to OAT as the operating system type.
- OAT attempts to look up this incorrect "operating system type" in the configuration dictionary, resulting in a
KeyErrorand installation failure.
Check method
Check the .bashrc file to confirm whether it contains content similar to the following:
bind 'set enable-bracketed-paste off'
Solution
Modify the bind command in .bashrc to be executed only in an interactive shell:
# Edit the .bashrc file.
vim /root/.bashrc
# Method 1 (recommended): Use conditional wrapping
if [[ $- == *i* ]]; then
bind 'set enable-bracketed-paste off'
fi
# Method 2: Simplified syntax
[ -z "$PS1" ] || bind 'set enable-bracketed-paste off'
After making the fix, re-execute the OAT installation.
Note
This issue is common in automated deployments, as many deployment scripts run in the background in a non-interactive environment, while some commands in `.bashrc` are suitable only for interactive shells. It is recommended to perform this check uniformly on all servers before deployment.
