启动命令
docker run --restart=always -p 2881:2881 -v /data/oceanbase:/root/ob --name oceanbase -e MODE=NORMAL -e OB_TENANT_PASSWORD=‘Mysql123!@#’ -e OB_SYS_PASSWORD=‘Mysql123!@#’ -d oceanbase-ce:4.2.1
使用本地磁盘启动没问题
使用nfs启动时报错如下
[ERROR] Traceback (most recent call last):
[2025-12-12 10:06:19.947] [ERROR] File “pymysql/connections.py”, line 613, in connect
[2025-12-12 10:06:19.947] [ERROR] File “socket.py”, line 808, in create_connection
[2025-12-12 10:06:19.947] [ERROR] File “socket.py”, line 796, in create_connection
[2025-12-12 10:06:19.947] [ERROR] ConnectionRefusedError: [Errno 111] Connection refused
[2025-12-12 10:06:19.947] [ERROR]
[2025-12-12 10:06:19.947] [ERROR] During handling of the above exception, another exception occurred:
[2025-12-12 10:06:19.948] [ERROR]
[2025-12-12 10:06:19.948] [ERROR] Traceback (most recent call last):
[2025-12-12 10:06:19.948] [ERROR] File “core.py”, line 2095, in start_cluster
[2025-12-12 10:06:19.948] [ERROR] File “core.py”, line 2142, in _start_cluster
[2025-12-12 10:06:19.948] [ERROR] File “core.py”, line 233, in run_workflow
[2025-12-12 10:06:19.948] [ERROR] File “core.py”, line 275, in run_plugin_template
[2025-12-12 10:06:19.948] [ERROR] File “core.py”, line 320, in call_plugin
[2025-12-12 10:06:19.948] [ERROR] File “_plugin.py”, line 352, in call
[2025-12-12 10:06:19.948] [ERROR] File “_plugin.py”, line 309, in _new_func
[2025-12-12 10:06:19.948] [ERROR] File “/root/.obd/plugins/oceanbase-ce/3.1.0/connect.py”, line 73, in connect
[2025-12-12 10:06:19.948] [ERROR] cursor = Cursor(ip=server.ip, port=server_config.get(‘mysql_port’, 2881), tenant=’’, password=****** if password is not None else ‘’, stdio=stdio)
[2025-12-12 10:06:19.948] [ERROR] File “_stdio.py”, line 1017, in wrapper
[2025-12-12 10:06:19.948] [ERROR] File “_stdio.py”, line 1004, in func_wrapper
[2025-12-12 10:06:19.948] [ERROR] File “tool.py”, line 768, in init
[2025-12-12 10:06:19.948] [ERROR] File “tool.py”, line 798, in _connect
[2025-12-12 10:06:19.948] [ERROR] File “pymysql/connections.py”, line 353, in init
[2025-12-12 10:06:19.948] [ERROR] File “pymysql/connections.py”, line 664, in connect
[2025-12-12 10:06:19.948] [ERROR] pymysql.err.OperationalError: (2003, “Can’t connect to MySQL server on ‘172.17.0.2’ ([Errno 111] Connection refused)”)
[2025-12-12 10:06:19.948] [ERROR]
[2025-12-12 10:06:22.951] [ERROR] OBD-1006: Failed to connect to oceanbase-ce
[2025-12-12 10:06:22.952] [DEBUG] - sub connect ref count to 0
[2025-12-12 10:06:22.952] [DEBUG] - export connect
[2025-12-12 10:06:22.952] [DEBUG] - plugin oceanbase-ce-py_script_connect-3.1.0 result: False
[2025-12-12 10:06:22.954] [INFO] See https://www.oceanbase.com/product/ob-deployer/error-codes .