【 使用环境 】测试环境
【 OB or 其他组件 】社区版
【 使用版本 】社区版本
【问题描述】
win11电脑安装docker desktop
docker compose启动oceanbase
配置如下
version: “3.8”
volumes:
ob_data:
driver: local
driver_opts:
type: ‘none’
device: ‘D:\oceanbase\data’
o: bind
obd_cluster:
driver: local
driver_opts:
type: ‘none’
device: ‘D:\oceanbase\cluster’
o: bind
redis_data:
driver: local
driver_opts:
type: ‘none’
device: ‘D:\oceanbase\redisdata’
o: bind
services:
redis:
image: redis:latest # 使用最新版本的Redis镜像
container_name: redis # 为容器设置一个名称
restart: always # 容器总是重启
privileged: true
command: [“redis-server”, “–appendonly”, “yes”, “–requirepass”,“Y”]
logging:
driver: “json-file”
options:
max-size: “32M”
ports:
- “6379:6379” # 将容器的6379端口映射到宿主机的6379端口
volumes:
- redis_data:/data # 挂载数据卷,用于持久化数据
oceanbase:
image: Quay
container_name: oceanbase-ce
restart: always
privileged: true
ports:
- “2881:2881” # 租户访问端口
- “2882:2882” # 内部通信端口
environment:
- datafile_size=10G
- MODE=NORMAL
- OB_SYS_PASSWORD=Y
- OB_TENANT_PASSWORD=Y
volumes:
- ob_data:/root/ob
- obd_cluster:/root/.obd/cluster
【复现路径】如果不配置持久化存储数据,则系统可以正常链接,如上配置volumes,则navicat无法链接错误如下:
2013 - Lost connection to server at "handshake: reading initial communication packet’, system error: 0
【附件及日志】推荐使用OceanBase敏捷诊断工具obdiag收集诊断信息,详情参见链接(右键跳转查看):
【备注】基于 LLM 和开源文档 RAG 的论坛小助手已开放测试,在发帖时输入 [@论坛小助手] 即可召唤小助手,欢迎试用!