OceanBase logo

OceanBase

A unified distributed database ready for your transactional, analytical, and AI workloads.

DEPLOY YOUR WAY

OceanBase Cloud

The best way to deploy and scale OceanBase

OceanBase Enterprise

Run and manage OceanBase on your infra

TRY OPEN SOURCE

OceanBase Community Edition

The free, open-source distributed database

OceanBase seekdb

Open source AI native search database

Customer Stories

Real-world success stories from enterprises across diverse industries.

View All
BY USE CASES

Mission-Critical Transactions

Global & Multicloud Application

Elastic Scaling for Peak Traffic

Real-time Analytics

Active Geo-redundancy

Database Consolidation

Resources

Comprehensive knowledge hub for OceanBase.

Blog

Live Demos

Training & Certification

Documentation

Official technical guides, tutorials, API references, and manuals for all OceanBase products.

View All
PRODUCTS

OceanBase Cloud

OceanBase Database

Tools

Connectors and Middleware

QUICK START

OceanBase Cloud

OceanBase Database

BEST PRACTICES

Practical guides for utilizing OceanBase more effectively and conveniently

Company

Learn more about OceanBase – our company, partnerships, and trust and security initiatives.

About OceanBase

Partner

Trust Center

Contact Us

International - English
中国站 - 简体中文
日本 - 日本語
Sign In
Start on Cloud

A unified distributed database ready for your transactional, analytical, and AI workloads.

DEPLOY YOUR WAY

OceanBase Cloud

The best way to deploy and scale OceanBase

OceanBase Enterprise

Run and manage OceanBase on your infra

TRY OPEN SOURCE

OceanBase Community Edition

The free, open-source distributed database

OceanBase seekdb

Open source AI native search database

Customer Stories

Real-world success stories from enterprises across diverse industries.

View All
BY USE CASES

Mission-Critical Transactions

Global & Multicloud Application

Elastic Scaling for Peak Traffic

Real-time Analytics

Active Geo-redundancy

Database Consolidation

Comprehensive knowledge hub for OceanBase.

Blog

Live Demos

Training & Certification

Documentation

Official technical guides, tutorials, API references, and manuals for all OceanBase products.

View All
PRODUCTS
OceanBase CloudOceanBase Database
ToolsConnectors and Middleware
QUICK START
OceanBase CloudOceanBase Database
BEST PRACTICES

Practical guides for utilizing OceanBase more effectively and conveniently

Learn more about OceanBase – our company, partnerships, and trust and security initiatives.

About OceanBase

Partner

Trust Center

Contact Us

Start on Cloud
编组
All Products
    • Databases
    • iconOceanBase Database
    • iconOceanBase Cloud
    • iconOceanBase Tugraph
    • iconInteractive Tutorials
    • iconOceanBase Best Practices
    • Tools
    • iconOceanBase Cloud Platform
    • iconOceanBase Migration Service
    • iconOceanBase Developer Center
    • iconOceanBase Migration Assessment
    • iconOceanBase Admin Tool
    • iconOceanBase Loader and Dumper
    • iconOceanBase Deployer
    • iconKubernetes operator for OceanBase
    • iconOceanBase Diagnostic Tool
    • iconOceanBase Binlog Service
    • Connectors and Middleware
    • iconOceanBase Database Proxy
    • iconEmbedded SQL in C for OceanBase
    • iconOceanBase Call Interface
    • iconOceanBase Connector/C
    • iconOceanBase Connector/J
    • iconOceanBase Connector/ODBC
    • iconOceanBase Connector/NET
icon

OceanBase Database Proxy

V4.2.0Community Edition

  • What is ODP?
  • Installation and deployment
    • Deploy ODP by using OBD
    • Deploy ODP by using OCP
    • Deploy ODP by using the CLI
    • Deployment modes
  • Basic operations
  • Configuration parameter
    • Parameter description
    • Dynamically modifiable parameters
    • Parameters that are not dynamically modifiable
    • Internal and inherited parameters
    • In-memory parameters
  • Connection management
    • Principles
    • Session status synchronization
    • Client session
    • Server session
  • Data routing
    • Factors affecting data routing
    • Routing strategies
    • ODP routing
    • Intra-tenant routing
    • Read/Write separation
    • Follower latency threshold
  • High availability mechanism
    • Overview
    • High availability of ODP services
    • High availability of OceanBase Database
    • High availability testing
  • Security and protocols
  • Operation and maintenance
    • Troubleshooting
      • Troubleshooting logic
      • Monitoring logs
    • Performance analysis
    • Show Trace

Download PDF

What is ODP? Deploy ODP by using OBD Deploy ODP by using OCP Deploy ODP by using the CLI Deployment modes Basic operations Parameter description Dynamically modifiable parameters Parameters that are not dynamically modifiable Internal and inherited parameters In-memory parameters Principles Session status synchronization Client session Server session Factors affecting data routing Routing strategies ODP routing Intra-tenant routing Read/Write separation Follower latency threshold Overview High availability of ODP services High availability of OceanBase Database High availability testing Security and protocols Troubleshooting logic Monitoring logs Performance analysis Show Trace
OceanBase logo

The Unified Distributed Database for the AI Era.

Follow Us
Products
OceanBase CloudOceanBase EnterpriseOceanBase Community EditionOceanBase seekdb
Resources
DocsBlogLive DemosTraining & Certification
Company
About OceanBaseTrust CenterLegalPartnerContact Us
Follow Us

© OceanBase 2026. All rights reserved

Cloud Service AgreementPrivacy PolicySecurity
Contact Us
Document Feedback
  1. Documentation Center
  2. OceanBase Database Proxy
  3. V4.2.0
iconOceanBase Database Proxy
V 4.2.0Community Edition
  • V 4.3.6
  • V 4.3.4
  • V 4.3.3
  • V 4.3.2
  • V 4.3.1
  • V 4.3.0
  • V 4.2.3
  • V 4.2.2
  • V 4.2.0 and earlier
Community Edition
  • V 4.2.0
  • V 4.1.0
  • V 4.0.0
  • V 3.1.0

Deploy ODP by using OBD

Last Updated:2023-10-10 02:43:33  Updated
share
What is on this page
Prepare the installation environment
Choose a suitable version
Procedure
Step 1: Download and install OBD
Step 2: Modify the configuration file
Step 3: Deploy ODP
Step 4: Perform check after the installation
Common issues in deployment
Startup failed
Failed to connect to OceanBase Database

folded

share

This topic describes how to use OceanBase Deployer (OBD) to deploy OceanBase Database Proxy (ODP). Perform the following steps:

  1. Prepare the installation environment

  2. Choose a suitable version

  3. Use OBD to install ODP

  4. Perform check after the installation

You can also deploy ODP in the following ways:

  • Use OceanBase Cloud Platform (OCP) to install and deploy ODP. For more information, see Deploy ODP by using OCP.

  • Use the CLI to install and deploy ODP. For more information, see Deploy ODP by using the CLI.

Prepare the installation environment

  • Platform: X86_64 or ARM

  • Operating system: Red Hat Linux (x86_64) of version 5, 6, 7, or later

  • CPU: ODP occupies about 70% of the resources of a CPU core during operation.

  • Memory: ODP occupies about 100 MB of memory during operation.

  • Disk size: The disk space is determined by your data size. We recommend that you use a disk that has 10 GB or more of space.

  • OceanBase cluster: For more information, see Deploy OceanBase Database Community Edition.

  • (Optional) Config Server: If you have deployed Config Server, you can deploy ODP by configuring obproxy_config_server_url. In this case, ODP can function as a proxy for all clusters registered in the Config Server.

Choose a suitable version

If you install ODP for learning purposes, install the latest version. For a production environment, we recommend that you check the new features and fixed issues of each version.

ODP is now available as an open-source project. You can find the OBProxy project under the open-source OceanBase Database project. Click Releases to view the details of each version. Each version of ODP has been tested in terms of features , stress handling, and performance, and can be used with guaranteed performance.

Procedure

Note

  • The following describes the deployment of OceanBase Database on an x86-based CentOS Linux 7.9 system. The procedure may be different on other operating systems.

  • Before deploying the OceanBase cluster, it is recommended that you switch to a non-root user for data security.

Step 1: Download and install OBD

OBD is the most efficient deployment tool to make ODP ready to work. We recommend that you use OBD to deploy ODP.

Download and install OBD by performing the following steps. If the server has access to the Internet and allows you to add a third-party YUM repository as the software source, you can run the following command to install OBD from the official software source of OceanBase:

sudo yum install -y yum-utils
sudo yum-config-manager --add-repo https://mirrors.aliyun.com/oceanbase/OceanBase.repo
sudo yum install -y ob-deploy
source /etc/profile.d/obd.sh

If the server does not have access to the Internet, use other server to download the OBD installation package from the releases page on GitHub, and then transfer the installation package to the server you are using for installation.

Step 2: Modify the configuration file

After OBD is installed, you can view the configuration files provided by OBD in the /usr/obd/example/ directory and select the appropriate configuration file as required.

obproxy-ce:
  version: 3.2.3
  servers:
    - 10.10.10.1
  global:
    listen_port: 2883 # External port. The default value is 2883.
    prometheus_listen_port: 2884 # The Prometheus port. The default value is 2884.
    home_path: /home/admin/obproxy
    obproxy_config_server_url: http://10.10.10.1:9999/services?Action=GetObProxyConfig
    # rs_list: 10.10.10.2:2881;10.10.10.3:2881;10.10.10.4:2881
    enable_cluster_checkout: false
    skip_proxy_sys_private_check: true
    enable_strict_kernel_release: false
    obproxy_sys_password: ***** # obproxy sys user password, can be empty. When a depends exists, OBD gets this value from the oceanbase-ce of the depends.
    observer_sys_password: ***** # proxyro user password, consistent with oceanbase-ce's proxyro_password, can be empty. When a depends exists, OBD gets this value
Parameter Required? Default value Description
version No Latest version The version of OceanBase Database Proxy (ODP) to install. If this parameter is not specified, OceanBase Deployer (OBD) deploys the latest ODP version.
servers Yes None Each server is specified in the - name: Server name (line break) ip: Server IP address format. You can specify multiple servers in this format. The server names must be unique.
If the server IP addresses are unique, you can also specify servers in the - <ip> (line break)- <ip> format, in which - <ip> is equivalent to - name: Server name (line break) ip: Server IP address.
listen_port No 2883 The listening port of ODP. Default value: 2883.
prometheus_listen_port Yes 2884 The listening port of Prometheus. Default value: 2884.
home_path Yes None The installation path of ODP. We recommend that you install ODP in the directory of the admin user.
obproxy_config_server_url No None The URL of the config server. After this URL is configured, ODP can function as a proxy for all clusters registered in the config server.
If the config server is not configured, you can also use the rs_list parameter to configure the OBServer node list for the OceanBase cluster in the ip:mysql_port;ip:mysql_port format. In this case, ODP can function as a proxy only for the configured cluster.
obproxy_sys_password No Empty in OBD V2.0.0 and earlier.
A random string in OBD V2.1.0 and later.
The password for the administrator (root@proxysys) of ODP. If no password is set for this account in OBD V2.1.0 or later, a random string is automatically generated.
observer_sys_password No Empty in OBD V2.0.0 and earlier.
A random string in OBD V2.1.0 and later.
The password for the account (proxyro@sys) used by ODP to connect to the OceanBase cluster. The password must be the same as the value of the proxyro_password parameter in OceanBase Database.

Step 3: Deploy ODP

If the server has access to the Internet, perform steps 4 and 5 directly. If the server does not have access to the Internet, download the ODP installation package from the Releases page on GitHub, and then copy the installation package to the local image repository as follows:

  1. Run the following command to disable the remote image repository:

    obd mirror disable <mirror repo name>
    

    The mirror repo name parameter specifies the name of the image repository to be disabled. If you set this parameter to remote, all remote image repositories are disabled.

  2. Run the following command to copy the ODP installation package to the local image repository:

    obd mirror clone <path> [-f]
    

    The path parameter specifies the path of the RPM package. The -f option indicates --force, which is optional and is disabled by default. When this option is enabled, if an image already exists, the image is forcibly overwritten.

  3. Run the following command to get the list of RPM packages in the local image repository:

    obd mirror list local
    
  4. Run the following command to deploy ODP:

    obd cluster deploy <deploy_name> -c <deploy_config_path>
    

    In the preceding command, the deploy_name parameter specifies the cluster name, which can be understood as the alias of the configuration file. deploy_config_path specifies the path of the configuration file.

    Note

    During online installation, after you run the obd cluster deploy command, OBD checks the target server for the ODP installation package. If the package does not exist, OBD automatically obtains the package from the YUM repository.

  5. Run the following command to start ODP:

    obd cluster start <deploy_name>
    

Step 4: Perform check after the installation

  1. Run the following command to view the deployment result:

    obd cluster display <deploy_name>
    
    # Example
    [admin@test ~]$ obd cluster display obtest
    Get local repositories and plugins ok
    Open ssh connection ok
    Cluster status check ok
    Connect to observer ok
    Wait for observer init ok
    +----------------------------------------------+
    |                 observer                     |
    +------------+---------+------+-------+--------+
    | ip         | version | port | zone  | status |
    +------------+---------+------+-------+--------+
    | 10.10.10.2 | 4.0.0.0 | 2881 | zone1 | ACTIVE |
    | 10.10.10.3 | 4.0.0.0 | 2881 | zone2 | ACTIVE |
    | 10.10.10.4 | 4.0.0.0 | 2881 | zone3 | ACTIVE |
    +-----------+---------+------+-------+--------+
    obclient -h10.10.10.2 -P2881 -uroot -p****** -Doceanbase
    
    Connect to obproxy ok
    +----------------------------------------------+
    |                 obproxy                      |
    +------------+------+-----------------+--------+
    | ip         | port | prometheus_port | status |
    +------------+------+-----------------+--------+
    | 10.10.10.1 | 2883 | 2884            | active |
    +------------+------+-----------------+--------+
    obclient -h10.10.10.1 -P2883 -uroot -p****** -Doceanbase
    

    The obproxy information is returned. 2883 in the port column indicates that Port 2883 provides the SQL service. This port is required in the JDBC URL.

  2. After you confirm the status by using the obd cluster display command, you can use a terminal to log on to the server that hosts the obproxy process and run the ps -ef | grep obproxy command to view the process information.

    [admin@test ~]# ps -ef | grep obproxy | grep -v grep
    admin     6868     1  0 Nov12 ?        00:02:09 bash /home/admin/obproxy/obproxyd.sh /home/admin/obproxy 10.10.10.1 2883 daemon
    admin     6901     1  0 Nov12 ?        00:44:11 /home/admin/obproxy/bin/obproxy --listen_port 2883
    

    You can find the obproxyd.sh and obproxy processes in the return information of the preceding example. obproxy is the name of the ODP process, and obproxyd.sh is the daemon script of ODP. The obproxyd.sh process is responsible for starting the obproxy process and performs health check on the obproxy process. If the obproxy process does not exist, obproxyd.sh will actively pull up the process.

Common issues in deployment

Startup failed

In a Linux system, ODP uses the enable_strict_kernel_release parameter to control the verification of the operating system version. If the operating system fails the check, the startup fails. The key logs are as follows:

[2021-10-13 10:38:17.235062] WARN [PROXY] get_kernel_release_by_uname (ob_config_server_processor.cpp:1039) [2060][Y0-0] [lt=14] [dc=0] unknown uname release(uinfo.release="4.18.0-80.el8.x86_64", ret=-4016)

You can run the uname command to view kernel information. This option supports only the EL series and AliOS series. The check strategies are conservative, and false errors may be reported. If you encounter the preceding issue in other Linux systems, you can disable the parameter to solve the problem.

Failed to connect to OceanBase Database

ODP establishes a connection with OceanBase Database by using the proxyro user. If the proxyro user does not exist or the password of the proxyro user is inconsistent with the value of the observer_sys_password parameter of ODP, ODP fails to connect to OceanBase Database, and the following error is reported:

ERROR 2013 (HY000): Lost connection to MySQL server at 'reading authorization packet', system error: 11

In this case, choose a solution according to your situation:

  1. The proxyro user does not exist.

    Use the root@sys user to access OceanBase Database directly, and create the proxyro user in the sys tenant.

    create user proxyro identified by '*******';
    grant select on *.* to proxyro;
    
  2. The password of the proxyro user is inconsistent with the value of the observer_sys_password parameter of ODP.

    1. You can use the root@sys user to access OceanBase Database directly and change the password of the proxyro user to make it consistent with the value of the observer_sys_password parameter that you set during ODP startup.

      ALTER USER proxyro IDENTIFIED BY 'password';
      
    2. You can also log on to ODP with the root@proxysys account and change the password of proxyro@sys. After the change, restart the ODP.

      alter proxyconfig set observer_sys_password = 'password';
      

Notice

Enter the original value of the password rather than the SHA1-hashed value for password in the preceding statement.

Previous topic

What is ODP?
Last

Next topic

Deploy ODP by using OCP
Next
What is on this page
Prepare the installation environment
Choose a suitable version
Procedure
Step 1: Download and install OBD
Step 2: Modify the configuration file
Step 3: Deploy ODP
Step 4: Perform check after the installation
Common issues in deployment
Startup failed
Failed to connect to OceanBase Database