Meet OceanBase AI Database, the unified database for operational data, real-time analytics, and AI. Explore ->

Meet OceanBase AI Database, the unified database for operational data, real-time analytics, and AI. Explore ->

OceanBase logo

OceanBase

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

Product Overview
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

OceanBase

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

Product Overview
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 Deployer

V4.3.0Community Edition

  • What is obd
  • Quick Start
    • Install obd
    • Quick deployment of OceanBase Database
    • Quickly deploy OCP
  • obd Command
    • Quick deployment commands
    • Cluster commands
    • Command groups
    • Image and repository commands
    • Test command groups
    • Tool commands
    • obdiag commands
    • Binlog service commands
    • Hardware commands
    • License commands
    • Password commands
    • Telemetry commands
  • User Guide
    • Usage overview
    • Deploy through GUI
      • Overview
      • Pattern configuration rules
      • Deploy an OceanBase cluster
      • Deploy OCP
      • Deploy OMS
      • Change components
      • Upgrade OCP
      • Upgrade OMS
    • Deploy through CLI
      • Configuration file
      • Component deployment
        • Deploy an OceanBase cluster
        • Deploy seekdb
        • Deploy obconfigserver
        • Deploy OMS
        • Deploy OCP
        • Deploy Alertmanager
        • Deploy obbinlog
        • Deploy oblogproxy
      • Cluster management
        • Physical Standby Database
          • Create a standby tenant
          • Role switching and decoupling
          • Switch the synchronization mode between primary and standby tenants
        • seekdb primary/standby instance
          • Create a standby instance
          • Role switching and decoupling
        • Scale out and component changes
        • Performance test
        • Diagnose a cluster
        • Backup and restore
        • Add a GUI monitoring system to an existing cluster
      • Cluster management
        • Use OCP to take over an OceanBase cluster deployed by obd
        • Take over an OceanBase cluster
      • Component upgrade
        • Upgrade OceanBase Database
        • Upgrade ODP
        • Upgrade OMS
  • Upgrade obd
  • FAQ
  • Error codes
  • Release Notes
    • Version rules
    • V4.3
      • OceanBase Deploy V4.3.0
    • V4.2
      • OceanBase Deployment Tool V4.2.0
    • V4.1
      • OceanBase Deployer V4.1.0
    • V4.0
      • OceanBase Deployer V4.0.0
    • V3.6
      • OceanBase Deployer V3.6.0
    • V3.5
      • OceanBase Deployer V3.5.0
    • V3.4
      • OceanBase Deployer V3.4.0
    • V3.3
      • OceanBase Deployer V3.3.0
    • V3.2
      • OceanBase Deployer V3.2.2
      • OceanBase Deployer V3.2.1
      • OceanBase Deployer V3.2.0
    • V3.1
      • OceanBase Deployer V3.1.2
      • OceanBase Deployer V3.1.1
      • OceanBase Deployer V3.1.0
    • V3.0
      • OceanBase Deployer V3.0.1
      • OceanBase Deployer V3.0.0
    • V2.10
      • OceanBase Deployer V2.10.1
      • OceanBase Deployer V2.10.0
    • V2.9
      • OceanBase Deployer V2.9.2
      • OceanBase Deployer V2.9.1
      • OceanBase Deployer V2.9.0
    • V2.8
      • OceanBase Deployment Tool V2.8.0
    • V2.7
      • OceanBase Deployment Tool V2.7.0
    • V2.6
      • OceanBase Deployment Tool V2.6.2
      • OceanBase Deployment Tool V2.6.1
      • OceanBase Deployment Tool V2.6.0
    • V2.5
      • OceanBase Deployer V2.5.0
    • V2.4
      • OceanBase Deployer V2.4.0
    • V2.3
      • OceanBase Deployment Tool V2.3.1
      • OceanBase Deployer V2.3.0
    • V2.2
      • OceanBase Deployment Tool V2.2.0
    • V2.1
      • OceanBase Deployer V2.1.1
      • OceanBase Deployment Tool V2.1.0
    • V2.0
      • OceanBase Deployment Tool V2.0.1
      • OceanBase Deployment Tool V2.0.0
    • V1.6
      • OceanBase Deployer V1.6.2
      • OceanBase Deployer V1.6.1
      • OceanBase Deployer V1.6.0
    • V1.5
      • OceanBase Deployer V1.5.0
    • V1.4
      • OceanBase Deployer V1.4.0
    • V1.3
      • OceanBase Deployer V1.3.3
      • OceanBase Deployer V1.3.2
      • OceanBase Deployer V1.3.0
    • V1.2
      • OceanBase Deployer V1.2.1
      • OceanBase Deployer V1.2.0
  • Interactive deployment of OceanBase Database Community Edition
  • Deploy a Community Edition cluster using the obd graphical interface
  • Deploy a Community Edition cluster by using an obd configuration file

Download PDF

What is obdInstall obdQuick deployment of OceanBase DatabaseQuickly deploy OCPQuick deployment commandsCluster commandsCommand groupsImage and repository commandsTest command groupsTool commandsobdiag commandsBinlog service commandsHardware commandsLicense commandsPassword commandsTelemetry commandsUsage overviewOverviewPattern configuration rulesDeploy an OceanBase clusterDeploy OCPDeploy OMSChange componentsUpgrade OCPUpgrade OMSConfiguration fileUpgrade obdFAQError codesVersion rulesOceanBase Deploy V4.3.0OceanBase Deployment Tool V4.2.0OceanBase Deployer V4.1.0OceanBase Deployer V4.0.0OceanBase Deployer V3.6.0OceanBase Deployer V3.5.0OceanBase Deployer V3.4.0OceanBase Deployer V3.3.0OceanBase Deployer V3.2.2OceanBase Deployer V3.2.1OceanBase Deployer V3.2.0OceanBase Deployer V3.1.2OceanBase Deployer V3.1.1OceanBase Deployer V3.1.0OceanBase Deployer V3.0.1OceanBase Deployer V3.0.0OceanBase Deployer V2.10.1OceanBase Deployer V2.10.0OceanBase Deployer V2.9.2OceanBase Deployer V2.9.1OceanBase Deployer V2.9.0OceanBase Deployment Tool V2.8.0OceanBase Deployment Tool V2.7.0OceanBase Deployment Tool V2.6.2OceanBase Deployment Tool V2.6.1OceanBase Deployment Tool V2.6.0OceanBase Deployer V2.5.0OceanBase Deployer V2.4.0OceanBase Deployment Tool V2.3.1OceanBase Deployer V2.3.0OceanBase Deployment Tool V2.2.0OceanBase Deployer V2.1.1OceanBase Deployment Tool V2.1.0OceanBase Deployment Tool V2.0.1OceanBase Deployment Tool V2.0.0OceanBase Deployer V1.6.2OceanBase Deployer V1.6.1OceanBase Deployer V1.6.0OceanBase Deployer V1.5.0OceanBase Deployer V1.4.0OceanBase Deployer V1.3.3OceanBase Deployer V1.3.2OceanBase Deployer V1.3.0OceanBase Deployer V1.2.1OceanBase Deployer V1.2.0Interactive deployment of OceanBase Database Community EditionDeploy a Community Edition cluster using the obd graphical interfaceDeploy a Community Edition cluster by using an obd configuration file
OceanBase logo

The Unified Distributed Database for the AI Era.

Follow Us
Products
OceanBase CloudOceanBase EnterpriseOceanBase Community EditionOceanBase seekdb
Resources
DocsBlogWhite PaperLive DemosTraining & CertificationTicket
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 Deployer
  3. V4.3.0
iconOceanBase Deployer
V 4.3.0Community Edition
Databases
  • OceanBase Database
  • OceanBase Cloud
  • OceanBase Tugraph
  • Interactive Tutorials
  • OceanBase Best Practices
Tools
  • OceanBase Cloud Platform
  • OceanBase Migration Service
  • OceanBase Developer Center
  • OceanBase Migration Assessment
  • OceanBase Admin Tool
  • OceanBase Loader and Dumper
  • OceanBase Deployer
  • Kubernetes operator for OceanBase
  • OceanBase Diagnostic Tool
  • OceanBase Binlog Service
Connectors and Middleware
  • OceanBase Database Proxy
  • Embedded SQL in C for OceanBase
  • OceanBase Call Interface
  • OceanBase Connector/C
  • OceanBase Connector/J
  • OceanBase Connector/ODBC
  • OceanBase Connector/NET
Community Edition
  • V 4.3.0
  • V 3.2.1
  • V 3.2.0
  • V 3.1.0
  • V 3.0.0
  • V 2.10.1
  • V 2.10.0
  • V 2.9.0
  • V 2.8.0
  • V 2.7.0
  • V 2.6.0
  • V 2.5.0
  • V 2.4.0
  • V 2.3.1
  • V 2.3.0
  • V 2.2.0
  • V 2.1.0
  • V 2.0.0
  • V 1.6.1

Deploy obconfigserver

Last Updated:2026-06-30 14:40:58  Updated
Share
What is on this page
Components
Prerequisites
Procedure
Use obconfigserver
Register an OceanBase cluster
View the registration information of obconfigserver.
Start the ODP
Delete cluster registration info
FAQs
The error prepared statement not supported is returned when obconfigserver is started
The error is returned when a cluster registered in obconfigserver is connected through ODP

folded

Share

When you deploy obconfigserver, you can choose to deploy it separately or together with OceanBase Database and ODP. This topic describes the common deployment methods of obconfigserver.

Components

  • oceanbase-ce

    OceanBase Database Community Edition, an enterprise-level native distributed database independently developed by OceanBase.

  • obproxy-ce

    OceanBase Database Proxy, a proxy server dedicated to OceanBase Database, also known as ODP or OBProxy.

  • ob-configserver

    OceanBase Configserver, also known as obconfigserver, provides metadata registration, storage, and query services for OceanBase.

Prerequisites

Before you proceed, make sure that you meet the following conditions:

  • To directly deploy obconfigserver, you have installed V2.3.0 or a later version of obd. To add obconfigserver to a cluster, you have installed V2.5.0 or a later version of obd. We recommend that you install the latest version. For more information about how to install obd, see Install obd.

    Note

    We recommend that you install OceanBase All in One, which provides all the components required for deployment (except for the obbinlog component). The components have been tested for compatibility with each other and are the officially recommended versions.

  • Your machine can access the Internet, or the local image repository of obd contains the installation packages required for deployment.

    You can run the obd mirror list local command to view the installation packages in the local image repository. If you installed obd by using OceanBase All in One, the local image repository contains the installation packages of all the components required for deployment.

  • When you deploy an OceanBase cluster, make sure that the OBServer node supports the AVX instruction set (this restriction applies only to servers with the x86 architecture). You can run the lscpu | grep Flags | grep avx command to check whether the AVX instruction set is supported.

    Note

    If you use a server with the x86 architecture, the AVX instruction set is not required for the following OceanBase Database versions:

    • V4.2.5.6 or later for V4.2.x versions.
    • V4.3.5.4 or later for V4.3.x versions.
    • V4.4.1.0 or later for V4.4.x versions.
  • In an offline deployment scenario, when you deploy an OceanBase cluster and use a server with the ARM architecture, check whether the OBServer node supports the LSE instruction set. You can run the lscpu | grep Flags | grep atomics command to check whether the LSE instruction set is supported. If the server does not support the LSE instruction set, download an OceanBase Database installation package with the nonlse option and use the obd mirror clone command to upload the installation package to the local image repository of obd.

    Note

    The OceanBase All in One package does not contain an OceanBase Database installation package with the nonlse option.

Procedure

This section describes how to use obd commands to deploy obconfigserver in three scenarios. Choose an appropriate deployment method based on your situation:

  • Deploy OceanBase Database and ODP together

    You can configure obconfigserver, OceanBase Database, and ODP in the same configuration file. After deployment, OceanBase Database is registered to obconfigserver, and ODP is started in the config URL mode. This allows the ODP to connect to any cluster registered in the current obconfigserver.

    Notice

    When connecting to OceanBase Database by using ODP, ensure that the configuration parameter observer_sys_password in ODP is consistent with the password of the proxyro@sys user in OceanBase Database. Otherwise, an error will be reported when the connection is established.

  • Add an obconfigserver to the cluster.

    Execute the obd cluster component add command to add an obconfigserver component to an OceanBase cluster managed by obd. If an OceanBase cluster already has the ODP deployed and the command is successfully executed and the ODP is restarted, the ODP will use the config url of the added obconfigserver to start.

  • Deploy only the obconfigserver component

    After you have deployed the ODP service, you need to register an OceanBase Database cluster to the obconfigserver. Also, you need to modify the obproxy_config_server_url parameter of ODP to the address of the obconfigserver. For more information, see Use obconfigserver.

Add an obconfigserver to the cluster.
  1. Create a configuration file.

    When you add an obconfigserver to an OceanBase cluster managed by obd, you need to configure only the ob-configserver component in the new configuration file. Here is an example:

    ob-configserver:
      servers:
        - 10.10.10.1
      global:
        listen_port: 8080 # The port of ob-configserver web
        server_ip: 0.0.0.0 # Listen to the ob-configserver server IP. When you want to listen to the specified IP address,use it.
        home_path: /home/admin/ob-configserver  # The working directory for prometheus. ob-configserver is started under this directory. This is a required field.
        ## log config
        # log_level: info # Log printing level of ob-configserver. The default value is `info`
        # log_maxsize: 30 # The total size of manager ob-configserver.Log size is measured in Megabytes.The default value is 30
        # log_maxage: 7 # The days of manager expired ob-configserver.Log retention days. The default value is 7
        # log_maxbackups: 10  #The number of manager expired ob-configserver.Log. The default value is 10
        # log_localtime: true #  Switch of ob-configserver.Log naming with localtime. The default value is true
        # log_compress: true # Compress ob-configserver.Log switch. The default value is true
    
        ## vip config, configserver will generate url with vip_address and port and return it to the client
        ## do not use some random value that can't be connected
        # vip_address: "10.10.10.1"
        # vip_port: 8080
        ## storage config
        # storage:
          ## database type, support sqlite3 or mysql
          # sqlite3:
          # database_type: sqlite3
          # connection_url: "/home/admin/ob-configserver/.data.db?cache=shared&_fk=1"
    
          # mysql:
          # database_type: mysql
          # connection_url: "$user:$password@tcp($IP:$PORT)/$metadb?parseTime=true"
    

    If the commented-out configuration items in the configuration file are not enabled, they will use the default values. You can also uncomment and configure them to other values. The following configuration items need to be noted in the configuration file:

    • server_ip: the IP address whitelist for accessing the ob-configserver service. The default value is 0.0.0.0, which means that all IP addresses of the server where the ob-configserver is located can access it.

    • vip_address and vip_port: these are the configuration items for the load balancing access address. If you need to configure multiple nodes under servers, you need to use load balancing. After configuring load balancing, you need to fill in the load balancing address IP and port in the configuration file.

    • database_type: the database type, which can be sqlite3 or mysql. The default value is sqlite3, but it is recommended to use mysql.

    • connection_url: the database connection URL. If you choose sqlite3, the default value is $home_path/.data.db?cache=shared&_fk=1. If you choose mysql, the connection_url can be either an OceanBase Database or a native MySQL database. The specified database user must have the DDL and DML permissions for the corresponding database in the URL. Note that when using an OceanBase Database, do not use the oceanbase database, otherwise you will be prompted that you do not have permissions.

  2. Execute the command to add the component.

    obd cluster component add test1 -c configserver.yaml
    

    Here is an example where the existing OceanBase cluster name is test1 (the Name output from the obd cluster list command), and the configuration file name created when adding the obconfigserver is configserver.yaml. You need to replace the cluster name and component name with your actual values.

    The output after executing the command is as follows:

    Connect to ob-configserver ok
    +-----------------------------------------------------------------+
    |                         ob-configserver                         |
    +---------------+------+---------------+----------+--------+------+
    | server        | port | vip_address   | vip_port | status | pid  |
    +---------------+------+---------------+----------+--------+------+
    | 10.10.10.1    | 8080 | 10.10.10.1    | 8080     | active | 2725 |
    +---------------+------+---------------+----------+--------+------+
    curl -s 'http://10.10.10.1:8080/services?Action=GetObProxyConfig'
    

    If the cluster to which the component is to be added contains an ODP, the following two scenarios apply based on the obd version:

    • If obd is V3.2.0 or later, it supports interactive control for whether to restart the cluster. You can simply input restart at the specified location in the output to use the newly added obconfigserver to restart the ODP.

      Restart `obproxy-ce,oceanbase-ce` for test to take effect. You can do it manually later or enter `restart` now: 
      

      If you press Enter directly or input a value other than restart at this location, obd will not restart the cluster. After the process is completed, the ODP will still start using the rslist method.

    • If obd is earlier than V3.2.0, it will output the restart command. You just need to copy and execute the obd cluster restart command in the output. After executing the command, the ODP will be restarted using the newly added obconfigserver.

      obd cluster restart demo -c obproxy-ce
      

Add only the obconfigserver.

Create a configuration file. Here is an example where the configuration file name is config-only.yaml. The configuration and notes for each component in the configuration file are as follows.

  1. User configuration

    ## Only need to configure when remote login is required
    user:
      username: admin
    #   password: your password if need
      key_file: /home/admin/.ssh/id_rsa
    #   port: your ssh port, default 22
    #   timeout: ssh connection timeout (second), default 30
    

    username is the username for logging in to the target machine. Ensure that your username has write permissions for home_path. password and key_file are both used for user verification. Typically, you only need to fill in one of them.

    Notice

    After configuring the key path, if your key does not require a password, comment out or delete password to avoid it being considered the key password for login, which could lead to verification failure.

  2. Configure the ob-configserver component.

    ob-configserver:
      servers:
        - 10.10.10.1
      global:
        listen_port: 8080 # The port of ob-configserver web
        server_ip: 0.0.0.0 # Listen to the ob-configserver server IP. When you want to listen to the specified IP address,use it.
        home_path: /home/admin/ob-configserver  # The working directory for prometheus. ob-configserver is started under this directory. This is a required field.
        ## log config
        # log_level: info # Log printing level of ob-configserver. The default value is `info`
        # log_maxsize: 30 # The total size of manager ob-configserver.Log size is measured in Megabytes.The default value is 30
        # log_maxage: 7 # The days of manager expired ob-configserver.Log retention days. The default value is 7
        # log_maxbackups: 10  #The number of manager expired ob-configserver.Log. The default value is 10
        # log_localtime: true #  Switch of ob-configserver.Log naming with localtime. The default value is true
        # log_compress: true # Compress ob-configserver.Log switch. The default value is true
    
        ## vip config, configserver will generate url with vip_address and port and return it to the client
        ## do not use some random value that can't be connected
        # vip_address: "10.10.10.1"
        # vip_port: 8080
        ## storage config
        # storage:
          ## database type, support sqlite3 or mysql
          # sqlite3:
          # database_type: sqlite3
          # connection_url: "/home/admin/ob-configserver/.data.db?cache=shared&_fk=1"
    
          # mysql:
          # database_type: mysql
          # connection_url: "$user:$password@tcp($IP:$PORT)/$metadb?parseTime=true"
    

    If the commented-out configuration items in the configuration file are not enabled, they will use the default values. You can also uncomment and configure them to other values. The following configuration items need to be noted in the configuration file:

    • server_ip: the IP address whitelist for accessing the ob-configserver service. The default value is 0.0.0.0, which means that all IP addresses of the server where the ob-configserver is located can access it.

    • vip_address and vip_port: these are the configuration items for the load balancing access address. If you need to configure multiple nodes under servers, you need to use load balancing. After configuring load balancing, you need to fill in the load balancing address IP and port in the configuration file.

    • database_type: the database type, which can be sqlite3 or mysql. The default value is sqlite3, but it is recommended to use mysql.

    • connection_url: the database connection URL. If you choose sqlite3, the default value is $home_path/.data.db?cache=shared&_fk=1. If you choose mysql, the connection_url can be either an OceanBase Database or a native MySQL database. The specified database user must have the DDL and DML permissions for the corresponding database in the URL. Note that when using an OceanBase Database, do not use the oceanbase database, otherwise you will be prompted that you do not have permissions.

  3. Deploy the obconfigserver.

    [admin@obtest ~]$ obd cluster deploy config-only -c config-only.yaml
    

    Here is an example of deploying the config-only cluster using the config-only.yaml file. You need to modify the cluster name and configuration file name based on your actual situation.

  4. Start the obconfigserver.

    [admin@obtest ~]$ obd cluster start config-only
    

    The output is as follows, which displays the access address of the obconfigserver.

    +-----------------------------------------------------------+
    |                      ob-configserver                      |
    +---------+------+---------------+----------+--------+------+
    | server  | port | vip_address   | vip_port | status | pid  |
    +---------+------+---------------+----------+--------+------+
    | 0.0.0.0 | 8080 | 10.10.10.1    | 8080     | active | 6270 |
    +---------+------+---------------+----------+--------+------+
    curl -s 'http://10.10.10.1:8080/services?Action=GetObProxyConfig'
    

Use obconfigserver

This topic describes how to use obconfigserver after it is deployed. It covers how to register an OceanBase cluster with obconfigserver, how to view the registration information, how to start ODP, and how to delete a cluster registered with obconfigserver.

Register an OceanBase cluster

This topic describes how to register an OceanBase cluster to an obconfigserver by modifying the cluster configuration file or by running an SQL statement.

Execute SQL commands
  1. Use the root user to log in to the sys tenant of the database to be registered.

    obclient -h<IP> -P<PORT> -uroot@sys -p -c -A
    # example
    obclient -h10.10.10.4 -P4883 -uroot@sys -p -c -A
    

    In this parameter, IP specifies the IP address of the OceanBase database. PORT specifies the port of the OceanBase database. If you directly connect to the database, this parameter is set to the value of the mysql_port parameter. If you connect to the database through ODP, this parameter is set to the value of the listen_port parameter.

  2. Execute the following command to view the value of the obconfig_url parameter.

    obclient> SHOW PARAMETERS LIKE 'obconfig_url';
    

    The following output is returned, indicating that the obconfig_url parameter is not configured for the current cluster.

    +-------+----------+---------------+----------+--------------+-----------+-------+--------------------------+----------+---------+---------+-------------------+---------------+-----------+
    | zone  | svr_type | svr_ip        | svr_port | name         | data_type | value | info                     | section  | scope   | source  | edit_level        | default_value | isdefault |
    +-------+----------+---------------+----------+--------------+-----------+-------+--------------------------+----------+---------+---------+-------------------+---------------+-----------+
    | zone3 | observer | 10.10.10.4   |     2882  | obconfig_url | STRING    |       | URL for OBConfig service | OBSERVER | CLUSTER | DEFAULT | DYNAMIC_EFFECTIVE |               |         1 |
    | zone1 | observer | 10.10.10.2   |     2882  | obconfig_url | STRING    |       | URL for OBConfig service | OBSERVER | CLUSTER | DEFAULT | DYNAMIC_EFFECTIVE |               |         1 |
    | zone2 | observer | 10.10.10.3   |     2882  | obconfig_url | STRING    |       | URL for OBConfig service | OBSERVER | CLUSTER | DEFAULT | DYNAMIC_EFFECTIVE |               |         1 |
    +-------+----------+---------------+----------+--------------+-----------+-------+--------------------------+----------+---------+---------+-------------------+---------------+-----------+
    
  3. Run the following command to configure the obconfig_url parameter:

    alter system set obconfig_url = 'http://10.10.10.1:8080/services?Action=ObRootServiceInfo&ObCluster=test1';
    

    10.10.10.1:8080 is the access address of obconfigserver, and test1 is the appname value of the OceanBase cluster to be registered. You can execute the SHOW PARAMETERS LIKE 'cluster'; command after connecting to the cluster to view it. This example is for illustration only. You need to modify the appname value based on your actual requirements.

  4. After exiting the cluster, verify if obconfigserver can resolve information about the OceanBase cluster.

    curl -s 'http://10.10.10.1:8080/services?Action=ObRootServiceInfo&ObCluster=test1' |jq .
    

    Description

    After you register an OceanBase cluster to obconfigserver, wait a few minutes before you can query the relevant information from obconfigserver.

The output is as follows, indicating that the IP addresses and ports of all OBServer nodes in the cluster are successfully parsed.

{
  "Code": 200,
  "Message": "successful",
  "Success": true,
  "Data": {
    "ObClusterId": 1,
    "ObRegionId": 1,
    "ObCluster": "test1",
    "ObRegion": "test1",
    "ReadonlyRsList": [],
    "RsList": [
      {
        "address": "10.10.10.4:4882",
        "role": "LEADER",
        "sql_port": 4881
      }
    ],
    "Type": "PRIMARY",
    "timestamp": 1692699586370950
  },
  "Trace": "362172a2d5de734c",
  "Server": "10.10.10.1",
  "Cost": 1
}  

View the registration information of obconfigserver.

  1. View cluster details

    obd cluster display test
    

    In this example, the deployment name of the obconfigserver cluster is test. Run the obd cluster list command to get the actual deployment name, and then replace test with the actual value in the Name column.

    The output is as follows:

    Connect to ob-configserver ok
    +-------------------------------------------------------------------+
    |                          ob-configserver                          |
    +---------------+-------+---------------+----------+--------+-------+
    | server        | port  | vip_address   | vip_port | status | pid   |
    +---------------+-------+---------------+----------+--------+-------+
    | 10.10.10.1    | 8080  | 10.10.10.1    | 8080     | active | 13616 |
    +---------------+-------+---------------+----------+--------+-------+
    curl -s 'http://10.10.10.1:8080/services?Action=GetObProxyConfig'
    Connect to observer 10.10.10.1:2881 ok
    Wait for observer init ok
    +-------------------------------------------------+
    |                   oceanbase-ce                  |
    +---------------+---------+------+-------+--------+
    | ip            | version | port | zone  | status |
    +---------------+---------+------+-------+--------+
    | 10.10.10.2    | 4.3.5.0 | 2881 | zone1 | ACTIVE |
    | 10.10.10.3    | 4.3.5.0 | 2881 | zone2 | ACTIVE |
    | 10.10.10.4    | 4.3.5.0 | 2881 | zone3 | ACTIVE |
    +---------------+---------+------+-------+--------+
    obclient -h10.10.10.1 -P2881 -uroot -p'********' -Doceanbase -A
    
    cluster unique id: 253244ab-94b9-5def-9cbd-7a46e6c19621-1953714c460-00050304
    
    Connect to obproxy ok
    +-------------------------------------------------------------------+
    |                             obproxy-ce                            |
    +---------------+------+-----------------+-----------------+--------+
    | ip            | port | prometheus_port | rpc_listen_port | status |
    +---------------+------+-----------------+-----------------+--------+
    | 10.10.10.5    | 2883 | 2884            | 2885            | active |
    +---------------+------+-----------------+-----------------+--------+
    obclient -h10.10.10.1 -P2883 -uroot@proxysys -p'********' -Doceanbase -A
    obshell program health check ok
    display obshell dashboard ok
    +-----------------------------------------------------------+
    |                        obshell Dashboard                  |
    +---------------------------+------+---------------+--------+
    | url                       | user | password      | status |
    +---------------------------+------+---------------+--------+
    | http://10.10.10.2:2886    | root | '********'    | active |
    +---------------------------+------+---------------+--------+
    
    Trace ID: ea4340b6-f35a-11ef-a019-00163e4cf51e
    
  2. Query obconfigserve for the registered clusters.

    Copy the access information under the ob-configserver component. Then, you can use the ob-configserver command line tool to view the OceanBase clusters that are registered. To format the JSON output in the shell command line, run the ob-configserver command line tool and specify the --format option. You can use the sudo yum install jq command to install the jq command.

    curl -s 'http://10.10.10.1:8080/services?Action=GetObProxyConfig' | jq .
    

    The following output is returned. The ObRootServiceInfoUrlList contains the information of an OceanBase cluster with the name test, which indicates that this cluster has been registered to the obconfigserver:

    {
      "Code": 200,
      "Message": "successful",
      "Success": true,
      "Data": {
        "ObProxyBinUrl": "http://10.10.10.1:8080/client?Action=GetObProxy",
        "ObProxyDatabaseInfo": {
          "DataBase": "***",
          "MetaDataBase": "http://10.10.10.1:8080/services?Action=ObRootServiceInfo&User_ID=alibaba&UID=admin&ObRegion=obdv1",
          "Password": "***",
          "User": "***"
        },
        "ObRootServiceInfoUrlList": [
          {
            "ObRegion": "test",
            "ObRootServiceInfoUrl": "http://10.10.10.1:8080/services?Action=ObRootServiceInfo&ObCluster=test"
          }
        ],
        "Version": "4660b4b1f237893ba1da50a302e4c3e6"
      },
      "Trace": "07a7cac129713d00",
      "Server": "10.10.10.1",
      "Cost": 0
    }
    
  3. View the details of the OceanBase cluster.

    To view the information of the corresponding OceanBase cluster, you can issue the SHOW CLUSTER statement again. Example:

    curl -s 'http://10.10.10.1:8080/services?Action=ObRootServiceInfo&ObCluster=test' | jq .
    

    The output is as follows, successfully parsing the IP and port of the OBServer nodes in the cluster.

    {
      "Code": 200,
      "Message": "successful",
      "Success": true,
      "Data": {
        "ObClusterId": 1,
        "ObRegionId": 1,
        "ObCluster": "test",
        "ObRegion": "test",
        "ReadonlyRsList": [],
        "RsList": [
          {
            "address": "10.10.10.4:2882",
            "role": "LEADER",
            "sql_port": 2881
          },
          {
            "address": "10.10.10.3:2882",
            "role": "FOLLOWER",
            "sql_port": 2881
          },
          {
            "address": "10.10.10.2:2882",
            "role": "FOLLOWER",
            "sql_port": 2881
          }
        ],
        "Type": "PRIMARY",
        "timestamp": 1694084002271443
      },
      "Trace": "2b2ee036276b068e",
      "Server": "10.10.10.1",
      "Cost": 3
    }
    

Start the ODP

OceanBase Database Proxy (ODP) can be started in two modes: rs_list mode and obproxy_config_server_url mode. In rs_list mode, ODP can only connect to one OceanBase cluster specified by the rs_list parameter. In obproxy_config_server_url mode, ODP can connect to all OceanBase clusters registered in the specified obconfigserver.

To start ODP by using obconfigserver, run the obd cluster edit-config command to open the configuration file and directly add the following content in the global module of the obproxy-ce component:

obproxy_config_server_url: http://10.10.10.1:8080/services?Action=GetObProxyConfig

Modify 10.10.10.1:8080 in the example to the access address of your obconfigserver.

Delete cluster registration info

You can run the following command to delete the cluster information registered in obconfigserver, for example, test1.

curl -X DELETE 'http://10.10.10.1:8080/services?Action=ObRootServiceInfo&ObCluster=test1&ObClusterId=1&version=2' |jq .

In the preceding example, 10.10.10.1:8080 is the endpoint of obconfigserver, which can be obtained by executing the obd cluster display command. test1 is the value of appname in the configuration file of the cluster to be deleted, or the value obtained by connecting to the cluster and executing the SHOW PARAMETERS LIKE 'cluster'; command. ObClusterId is the value of cluster_id in the configuration file of the cluster to be deleted, or the value obtained from the cluster details as described in View registered information in obconfigserver.

The output will be as follows:

{
  "Code": 200,
  "Message": "successful",
  "Success": true,
  "Data": "success",
  "Trace": "caba1209b3a00c56",
  "Server": "10.10.10.1",
  "Cost": 4
}

View the cluster information registered in obconfigserver again.

curl -s 'http://10.10.10.1:8080/services?Action=GetObProxyConfig' |jq .

The output is as follows, showing that the information about the test1 cluster is no longer available.

{
  "Code": 200,
  "Message": "successful",
  "Success": true,
  "Data": {
    "ObProxyBinUrl": "http://10.10.10.1:8080/client?Action=GetObProxy",
    "ObProxyDatabaseInfo": {
      "DataBase": "***",
      "MetaDataBase": "http://10.10.10.1:8080/services?Action=ObRootServiceInfo&User_ID=alibaba&UID=admin&ObRegion=obdv1",
      "Password": "***",
      "User": "***"
    },
    "ObRootServiceInfoUrlList": [
      {
        "ObRegion": "test",
        "ObRootServiceInfoUrl": "http://10.10.10.1:8080/services?Action=ObRootServiceInfo&ObCluster=test"
      }
    ],
    "Version": "4840ade8a158753aa5b9ea69ba014fc1"
  },
  "Trace": "d4b4b27fae24e7b4",
  "Server": "10.10.10.1",
  "Cost": 1
}

FAQs

The error prepared statement not supported is returned when obconfigserver is started

Symptom

When OceanBase Database is used as the metadb, the error prepared statement not supported is returned when obconfigserver is started. The log is as follows:

2022-11-16T09:52:14.47799+08:00 ERROR [12258,] caller=cmd/main.go:36:func1: start configserver failed: start config server: create configserver schema: sql/schema: reading schema information Error 1235: while parameter _ob_enable_prepared_statement is disabled, prepared statement not supported
[10.10.10.1:2882] [2022-11-16 09:52:14.459102] [YB42AC1EC731-0005EB5F1D83A0A7] fields: args:="[]"

Possible causes

The prepared statement feature is not enabled for OceanBase Database, which is used as the metadb, when obconfigserver is started.

Solution

You can use the following two methods to solve this issue.

  • Method 1: Add interpolateParams=true to the connection_url parameter of obconfigserver in the configuration file. Here is an example:

    connection_url: "user:password@tcp(IP:PORT)/test?parseTime=true&interpolateParams=true"
    
  • Method 2: Connect to the OceanBase cluster and enable the _ob_enable_prepared_statement parameter.

    • Query whether the _ob_enable_prepared_statement parameter is enabled.

      obclient> select name,value,svr_ip,svr_port from oceanbase.__all_virtual_sys_parameter_stat where name='_ob_enable_prepared_statement';
      +-------------------------------+-------+---------------+----------+
      | name                          | value | svr_ip        | svr_port |
      +-------------------------------+-------+---------------+----------+
      | _ob_enable_prepared_statement | False | 10.10.10.1    |     2882 |
      +-------------------------------+-------+---------------+----------+
      1 row in set
      
    • Enable the _ob_enable_prepared_statement parameter.

      obclient> alter system set _ob_enable_prepared_statement='True';
      

The error is returned when a cluster registered in obconfigserver is connected through ODP

Symptom

The error is returned when a cluster registered in obconfigserver is connected through ODP. Here is an example:

$ obclient -h10.10.10.2 -P2883 -uroot@sys#cluster -p -Doceanbase -A
ERROR 2013 (HY000): Lost connection to MySQL server at 'reading authorization packet', system error: 11

Possible causes

The user and password configured for querying OceanBase Database cannot access the OceanBase cluster to query data.

Solution

You can use the following two methods to solve this issue.

  • Method 1: Execute the obd cluster edit-config command to view the configuration file. You need to check whether the proxyro_password parameter in the OceanBase cluster configuration file and the observer_sys_password parameter in the ODP configuration file are consistent. If they are inconsistent, modify both parameters to be consistent and then execute the corresponding command to restart the cluster. After the restart, you can connect to the cluster through ODP.

  • Method 2: Query whether the proxyro user exists in OceanBase Database.

    • Log in to the sys tenant of OceanBase Database as the root user.

      obclient -h10.10.10.2 -P2881 -uroot@sys -p -Doceanbase -A
      
    • Check whether the proxyro user exists in the cluster.

      select user,password from mysql.user;
      
    • Based on the query result, perform the following operations:

      • If the proxyro user does not exist in the cluster, execute the following command to create the proxyro user and set the password to be consistent with the observer_sys_password parameter in the ODP configuration file:

        create user 'proxyro' identified by '*****';
        
      • If the proxyro user exists in the cluster, execute the following command to modify the password of the proxyro user to be consistent with the observer_sys_password parameter in the ODP configuration file:

        alter user 'proxyro' identified by '*****';
        

Previous topic

Deploy seekdb
Last

Next topic

Deploy OMS
Next
What is on this page
Components
Prerequisites
Procedure
Use obconfigserver
Register an OceanBase cluster
View the registration information of obconfigserver.
Start the ODP
Delete cluster registration info
FAQs
The error prepared statement not supported is returned when obconfigserver is started
The error is returned when a cluster registered in obconfigserver is connected through ODP