OceanBase LogProxy (CE) is a proxy service of OceanBase CE. It is a part of OMS, and it can establish and manage connections with OceanBase for incremental log reading even with a isolated network.
LogProxy is based on libobcdc (former liboblog
), so you should install the corresponding version of it firstly. The libobcdc is packaged in oceanbase-ce-devel
before 4.0.0, and is packaged in oceanbase-ce-cdc
in 4.0.0 and the later version, both of which can be found in the official download page or official mirror.
libobcdc | oblogproxy |
---|---|
3.1.1 | 1.0.0 |
3.1.2 | 1.0.1 |
3.1.3 | 1.0.2 |
3.1.4 | 1.0.3 |
4.0.0 | 1.1.0 |
LogProxy service doesn't need params about OceanBase cluster to get started, one LogProxy can subscribe to multiple OceanBase clusters at the same time, and the connection configuration is passed from the client.
LogProxy will use a lot of memory, so it is strongly recommended to deploy it separately from the OceanBase server.
You can install a released version of LogProxy or build it from the source code.
If you want to install a released version, firstly you need to configure the yum repo.
yum install -y yum-utils
yum-config-manager --add-repo https://mirrors.aliyun.com/oceanbase/OceanBase.repo
Then you can install the rpm file by one of the following way:
- Download from release page, official download page or official mirror, and install it with
yum install -y oblogproxy-{version}.{arch}.rpm
- Install it with
yum install -y oblogproxy-{version}
The installation directory is /usr/local/oblogproxy
by default.
See How to build.
For security reasons, LogProxy needs to configure the username and password of a certain user, which must be a sys tenant user of the OceanBase to connect with. Note that the username here should not contain cluster name or tenant name.
You can configure the username and password by one of the following ways:
- Add it to local conf at
conf/conf.json
. - Set it in the client params. See the client doc for details.
Firstly, get the encrypted username and password.
./bin/logproxy -x username
./bin/logproxy -x password
Then add the outputs to ob_sys_username
and ob_sys_password
at conf/conf.json
.
You can start the service by the following command.
bash ./run.sh start
You can also start LogProxy with customized libobcdc by executing the following command.
export LD_LIBRARY_PATH=$LD_LIBRARY_PATH:/path/to/libobcdc
bash ./run.sh start
Then you can use oblogclient to subscribe the log data from LogProxy, and the service is bind to port 2983
by default.
The service log of LogProxy is located at logs/
, and the service log of LogReader (task thread) is located at run/{client-id}/logs/
.
OceanBase Database is under MulanPubL - 2.0 license. You can freely copy and use the source code. When you modify or distribute the source code, please obey the MulanPubL - 2.0 license.
Contributions are warmly welcomed and greatly appreciated. Here are a few ways you can contribute:
- Raise us an issue.
- Submit Pull Requests.
In case you have any problems when using OceanBase LogProxy, welcome reach out for help: