OB4.X集群状态running但是oceanbase-ce is not running

问题描述

查看集群中的租户时无租户反馈,警告oceanbase-ce is not running,但是查询集群状态明明是running

--查看集群中的租户

root@localhost \~# obd cluster tenant show dxjobsingle -g

Get local repositories ok

WARN 192.168.40.110 oceanbase-ce is not running

See https://www.oceanbase.com/product/ob-deployer/error-codes .

Trace ID: 20060750-8ec0-11f0-91da-000c29e13c26

If you want to view detailed obd logs, please run: obd display-trace 20060750-8ec0-11f0-91da-000c29e13c26

问题原因

虚拟机关机再开机后未启动集群

obd 运维的数据库,启停需要使用obd进行操作,停机时候没有使用obd会导致集群状态running但是oceanbase-ce is not running。

分析过程

查看集群状态

dxjobsingle集群状态是ruuning

obd cluster list

输出如下:

root@localhost \~# obd cluster list

±---------------------------------------------------------------+

| Cluster List |

±------------±-------------------------------±----------------+

| Name | Configuration Path | Status (Cached) |

±------------±-------------------------------±----------------+

| dxjobsingle | /root/.obd/cluster/dxjobsingle | running |

±------------±-------------------------------±----------------+

Trace ID: 5bc2bd22-8ebd-11f0-810e-000c29e13c26

If you want to view detailed obd logs, please run: obd display-trace 5bc2bd22-8ebd-11f0-810e-000c29e13c26

查看集群中的租户

无返回租户却返回了WARN 192.168.40.110 oceanbase-ce is not running

查看集群中的租户

root@localhost \~# obd cluster tenant show dxjobsingle -g

Get local repositories ok

WARN 192.168.40.110 oceanbase-ce is not running

See https://www.oceanbase.com/product/ob-deployer/error-codes .

Trace ID: 20060750-8ec0-11f0-91da-000c29e13c26

If you want to view detailed obd logs, please run: obd display-trace 20060750-8ec0-11f0-91da-000c29e13c26

查看当前obd 内指定集群的状态

参数 deploy name 为部署名,可以理解为配置文件的别名。自 V3.2.0 起,若 obd 设置了加密密钥,执行 display 命令输出的集群信息中,密码相关内容为加密状态。若需输出明文密码,可在命令中添加 --epk/--encryption-passkey 指定密钥用于验证。

通过ob-configserver is not runing可推测出数据库集群未启动,集群启动前有以下工作:

1.组件检查顺序:

ob-configserver

obagent

prometheus

grafana

2.启动顺序:

ob-configserver

observer

obshell

obproxy

obagent

prometheus

grafana

root@localhost \~# obd cluster display dxjobsingle

Get local repositories and plugins ok

Open ssh connection ok

WARN 192.168.40.110 ob-configserver is not running

See https://www.oceanbase.com/product/ob-deployer/error-codes .

Trace ID: 0b992440-8ec1-11f0-a576-000c29e13c26

If you want to view detailed obd logs, please run: obd display-trace 0b992440-8ec1-11f0-a576-000c29e13c26

解决办法

启动集群后再次查看租户正常

启动集群

root@localhost \~# obd cluster start dxjobsingle -S

Get local repositories ok

Load cluster param plugin ok

Cluster status check ok

Check before start ob-configserver ok

Check before start obagent ok

Check before start prometheus ok

Check before start grafana ok

Start ob-configserver ok

ob-configserver program health check ok

cluster scenario: htap

Start observer ok

observer program health check ok

Connect to observer 192.168.40.110:2881 ok

obshell start ok

obshell program health check ok

start obproxy ok

obproxy program health check ok

Connect to obproxy ok

Start obagent ok

...

查看租户

root@localhost \~# obd cluster tenant show dxjobsingle -g

Get local repositories ok

Get deployment connections ok

Connect to observer 192.168.40.110:2881 ok

Select tenant ok

±----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+

| tenant basic info |

±------------±------------±-------------------±-------------±--------±--------±------------±--------------------±--------------------±--------------±------------±------------+

| tenant_name | tenant_type | compatibility_mode | primary_zone | max_cpu | min_cpu | memory_size | max_iops | min_iops | log_disk_size | iops_weight | tenant_role |

±------------±------------±-------------------±-------------±--------±--------±------------±--------------------±--------------------±--------------±------------±------------+

| sys | SYS | MYSQL | RANDOM | 2.0 | 2.0 | 2G | 9223372036854775807 | 9223372036854775807 | 2G | 2 | PRIMARY |

| dxj | USER | MYSQL | RANDOM | 1.0 | 1.0 | 2G | 9223372036854775807 | 9223372036854775807 | 6G | 1 | PRIMARY |

±------------±------------±-------------------±-------------±--------±--------±------------±--------------------±--------------------±--------------±------------±------------+

Trace ID: 9d04fd46-8ec1-11f0-be08-000c29e13c26

If you want to view detailed obd logs, please run: obd display-trace 9d04fd46-8ec1-11f0-be08-000c29e13c26

相关推荐
OceanBase数据库官方博客8 天前
OceanBase + Flink 数据集成(第二部分):通过 JDBC 协议实现实时数据同步
大数据·flink·oceanbase
OceanBase数据库官方博客9 天前
OceanBase × Flink 数据集成系列——旁路导入连接器的批量写入能力
架构·kubernetes·oceanbase
OceanBase数据库官方博客12 天前
使用 OceanBase 进行向量 POC 的规划思路(混合搜索)
oceanbase
OceanBase数据库官方博客13 天前
如何用PaddleOCR和OceanBase打通企业资产智能化的第一公里
oceanbase
OceanBase数据库官方博客13 天前
借助OceanBase与LangChain,实现Agent快速投入生产的系统方案
langchain·oceanbase
弗锐土豆15 天前
使用eclipse、java、maven、j60870、oceanbase按照IEC104协议采集、存储电力数据
java·oceanbase·电表·iec104·抄表
OceanBase数据库官方博客16 天前
从OceanBase看AI Agent Harness的构成与设计
人工智能·oceanbase
OceanBase数据库官方博客16 天前
从 HBase 到 OceanBase 的迁移路径:Flink 驱动的实时数据写入
人工智能·oceanbase
OceanBase数据库官方博客18 天前
OceanBase 赋能央国企:从发电到用电的全链路业务承载
数据库·oceanbase
GottdesKrieges19 天前
OceanBase迁移用户及其权限配置
数据库·oceanbase