【 使用环境 】 测试环境
【 OB 】
【 使用版本 】4.3.5
【问题描述】使用dock compose 部署,之前部署成功,使用docker compose down了,再次使用docker compose up -d 后提示:
[root@bogon new]# docker compose logs -f big-oceanbase
big-oceanbase | do normal boot
big-oceanbase | oceanbase-ce-4.3.5.6 already installed.
big-oceanbase | ±-------------------------------------------------------------------------------------------+
big-oceanbase | | Packages |
big-oceanbase | ±-------------±--------±-----------------------±-----------------------------------------+
big-oceanbase | | Repository | Version | Release | Md5 |
big-oceanbase | ±-------------±--------±-----------------------±-----------------------------------------+
big-oceanbase | | oceanbase-ce | 4.3.5.6 | 106000012026040916.el8 | f2da44c5e7d808daed009e05cc052b23ea522339 |
big-oceanbase | ±-------------±--------±-----------------------±-----------------------------------------+
big-oceanbase | Repository integrity check ok
big-oceanbase | Load param plugin ok
big-oceanbase | Open ssh connection ok
big-oceanbase | Initializes observer work home x
big-oceanbase | [ERROR] OBD-1002: Fail to init 172.20.0.27 home path: /root/ob/observer is not empty.
big-oceanbase |
big-oceanbase | [ERROR] OBD-1027: If you are sure the directory can be emptied, run obd cluster deploy -f obcluster to perform forced deployment.
big-oceanbase |
big-oceanbase | See 错误码及解决方案 - ob-deployer - OceanBase .
big-oceanbase | Trace ID: 6242d416-802a-11f1-a320-0242ac14001b
big-oceanbase | If you want to view detailed obd logs, please run: obd display-trace 6242d416-802a-11f1-a320-0242ac14001b
boot failed!e |
big-oceanbase | find obd deploy information, skip configuring…
big-oceanbase | start ob cluster …
big-oceanbase | [ERROR] Deploy “obcluster” is configured. You could not start an configured cluster.
big-oceanbase | See 错误码及解决方案 - ob-deployer - OceanBase .
big-oceanbase | Trace ID: 653160b6-802a-11f1-8d28-0242ac14001b
big-oceanbase | If you want to view detailed obd logs, please run: obd display-trace 653160b6-802a-11f1-8d28-0242ac14001b
big-oceanbase | Wed Jul 15 16:51:40 CST 2026
big-oceanbase | boot success!
【复现路径】使用dock compose 部署,之前部署成功,使用docker compose down了,再次使用docker compose up -d 出现的问题
【附件】 docker compose 的配置如下:
big-oceanbase:
image: docker.1ms.run/oceanbase/oceanbase-ce:4.3.5-lts
container_name: big-oceanbase
restart: always
privileged: true
ulimits:
core: -1
nofile:
soft: 655350
hard: 655350
ports:
- “12881:2881”
- “12882:2882”
- “12886:2886”
- “12886:2886”
- “13000:3000” #自带 Grafana 监控面板
command: ["/bin/sh", “-c”, “/root/boot.sh”] #[“sleep”, “infinity”] #["/bin/sh", “-c”, “/root/boot.sh -f”] #或者["/bin/sh", “-c”, “echo ‘y’ | /root/boot.sh”]
environment:
- MODE=NORMAL
- EXIT_WHILE_ERROR=true
- OB_DOCKER_ROLE=leader
- OB_CLUSTER_NAME=obcluster
#- OB_TENANT_NAME=lgsettl
- OB_SYS_PASSWORD=Admin@123
#- OB_TENANT_PASSWORD=2026@#@123
- OB_MEMORY_LIMIT=8G # 总内存
- OB_SYSTEM_MEMORY=1G # 系统内存(必须小,才能给租户留空间)
#- OB_TENANT_MEMORY=2G # 租户内存(关键!必须小)
- OB_DATAFILE_SIZE=10G # 数据文件(你磁盘小)
- OB_LOG_DISK_SIZE=20G # 日志盘
# 关键修复点:增加这一行
#- OB_DEPLOY_PARAMETER=-f #里面有旧数据,请直接使用它,不要尝试清空或重新初始化
volumes:
- /data/new/oceanbase/ob:/root/ob ## 数据
#- /data/new/oceanbase/odb:/root/.obd --配置
- /etc/localtime:/etc/localtime:ro # 同步时区
- /etc/timezone:/etc/timezone:ro # 同步时间配置
- /data/new/oceanbase/archive:/root/archive ## 归档日志
- /data/new/oceanbase/backup:/root/backup ## 备份文件
healthcheck:
test: [“CMD”, “obclient”, “-h127.0.0.1”, “-P2881”, “-uroot@sys”, “-pAdmin@123”, “-e”, “SELECT 1”]
interval: 30s
timeout: 10s
retries: 3
start_period: 180s
networks:
bigdata-network:
ipv4_address: 172.20.0.27
5 个赞
提供一下obd.log日志
2 个赞
You could not start an configured cluster.有服务没有启动?
清空确实可以,但是之前的数据库全丢了。
学习了
看着是 deploy 因 /root/ob/observer 非空而中断,集群停在 configured 状态,后续 start 因此被拒绝。确认该目录可清空后,用 deploy -f 或手动清理再完整走一遍 deploy → start 即可。
清空后确实可以,但是之前数据库实例里面,建立好的租户、数据库数据都没有了。
是的 会清空的 符合预期
但是我希望能够保留之前的数据
没有办法 这命令本身就是清空新建的
读完之后感触颇深,感谢作者分享。