docker重启后报错 OBD-1013

ob版本:4.3.5.1
启动命令:sudo docker run -p 2881:2881
–name obstandalone
-e MODE=MINI
-e OB_TENANT_PASSWORD=ob123456
-e OB_SYS_PASSWORD=ob123456
–cpus=“4”
–memory=“8g”
-v /data/zhangx/oceanbase:/var/lib/oceanbase
-d Quay

服务器重启后,使用docker start 重启ob就报错,

find obd deploy information, skip configuring...
start ob cluster ...
Get local repositories ok
Load cluster param plugin ok
Cluster status check x
[ERROR] OBD-1013: root@172.17.0.6 connect failed: time out

Trace ID: f72babb2-1c2f-11f0-be56-0242ac110002
If you want to view detailed obd logs, please run: obd display-trace f72babb2-1c2f-11f0-be56-0242ac110002
boot success!

进入容器内执行了obd display-trace f72babb2-1c2f-11f0-be56-0242ac110002

[2025-04-18 08:34:38.644] [DEBUG] - mkdir /root/.obd/tool/
[2025-04-18 08:34:38.644] [DEBUG] - import status
[2025-04-18 08:34:38.645] [DEBUG] - add status ref count to 1
[2025-04-18 08:34:38.645] [DEBUG] - sub status ref count to 0
[2025-04-18 08:34:38.645] [DEBUG] - export status
[2025-04-18 08:34:38.645] [DEBUG] - plugin oceanbase-ce-py_script_workflow_status-0.1 result: True
[2025-04-18 08:34:38.645] [DEBUG] - Found for oceanbase-ce-py_script_workflow_status-0.1 for oceanbase-ce-0.1
[2025-04-18 08:34:38.645] [DEBUG] - share lock `/root/.obd/lock/mirror_and_repo`, count 2
[2025-04-18 08:34:38.646] [DEBUG] - Searching status plugin for components ...
[2025-04-18 08:34:38.646] [DEBUG] - Searching status plugin for oceanbase-ce-4.3.5.0-100000202024123117.el8-a81cd6413fc9c42f14fdf71c55fc319dfa6cab60
[2025-04-18 08:34:38.646] [DEBUG] - Found for oceanbase-ce-py_script_status-3.1.0 for oceanbase-ce-4.3.5.0
[2025-04-18 08:34:38.646] [DEBUG] - Call plugin oceanbase-ce-py_script_status-3.1.0 for oceanbase-ce-4.3.5.0-100000202024123117.el8-a81cd6413fc9c42f14fdf71c55fc319dfa6cab60
[2025-04-18 08:34:38.648] [DEBUG] - host: 172.17.0.6, port: 22, user: root, password: ******
[2025-04-18 08:34:41.714] [ERROR] Traceback (most recent call last):
[2025-04-18 08:34:41.714] [ERROR]   File "core.py", line 2090, in start_cluster
[2025-04-18 08:34:41.714] [ERROR]   File "core.py", line 2127, in _start_cluster
[2025-04-18 08:34:41.714] [ERROR]   File "core.py", line 1141, in cluster_status_check
[2025-04-18 08:34:41.714] [ERROR]   File "core.py", line 228, in run_workflow
[2025-04-18 08:34:41.714] [ERROR]   File "core.py", line 270, in run_plugin_template
[2025-04-18 08:34:41.714] [ERROR]   File "core.py", line 314, in call_plugin
[2025-04-18 08:34:41.714] [ERROR]   File "core.py", line 302, in _init_call_args
[2025-04-18 08:34:41.714] [ERROR]   File "core.py", line 389, in get_clients
[2025-04-18 08:34:41.714] [ERROR]   File "core.py", line 408, in get_clients_with_connect_status
[2025-04-18 08:34:41.714] [ERROR]   File "core.py", line 444, in ssh_clients_connect
[2025-04-18 08:34:41.714] [ERROR]   File "_stdio.py", line 999, in func_wrapper
[2025-04-18 08:34:41.714] [ERROR]   File "ssh.py", line 438, in connect
[2025-04-18 08:34:41.714] [ERROR]   File "_stdio.py", line 999, in func_wrapper
[2025-04-18 08:34:41.714] [ERROR]   File "ssh.py", line 395, in _login
[2025-04-18 08:34:41.714] [ERROR]   File "paramiko/client.py", line 409, in connect
[2025-04-18 08:34:41.714] [ERROR] paramiko.ssh_exception.NoValidConnectionsError: [Errno None] Unable to connect to port 22 on 172.17.0.6
[2025-04-18 08:34:41.714] [ERROR] 
[2025-04-18 08:34:41.714] [CRITICAL] [ERROR] OBD-1013: root@172.17.0.6 connect failed: time out
[2025-04-18 08:34:41.714] [INFO] [ERROR] OBD-1013: root@172.17.0.6 connect failed: time out
[2025-04-18 08:34:41.714] [INFO] 
[2025-04-18 08:34:41.714] [INFO] Trace ID: f72babb2-1c2f-11f0-be56-0242ac110002
[2025-04-18 08:34:41.714] [INFO] If you want to view detailed obd logs, please run: obd display-trace f72babb2-1c2f-11f0-be56-0242ac110002
[2025-04-18 08:34:41.714] [DEBUG] - unlock /root/.obd/lock/global
[2025-04-18 08:34:41.714] [DEBUG] - unlock /root/.obd/lock/deploy_obcluster
[2025-04-18 08:34:41.715] [DEBUG] - unlock /root/.obd/lock/mirror_and_repo

需求帮助

1 个赞

进入容器内,容器内ip是172.17.0.2
报错中有172.17.0.6 这个ip,是这个问题么

2 个赞

你可以看一下你的yaml文件是不是0.6这个ip的。可能是docker ip变化导致的

2 个赞

我是直接docker run的,对应的yaml在哪里看呢

2 个赞

~/.obd/cluster/xxx下。
应该是重启docker后 ip变化了。建议写死ip

2 个赞

±-----------------------------------------------------------+
| Cluster List |
±----------±-----------------------------±----------------+
| Name | Configuration Path | Status (Cached) |
±----------±-----------------------------±----------------+
| demo | /root/.obd/cluster/demo | stopped |
| obcluster | /root/.obd/cluster/obcluster | running |

目前这样显示我要如何继续排查问题呢

/root/.obd/cluster/obcluster 下ip我改为了172.17.0.2
/root/.obd/cluster/demo 下ip本来就是127.0.0.1 我没动

2 个赞

start ob cluster …
Get local repositories ok
Load cluster param plugin ok
Cluster status check ok
[WARN] OBD-1011: (172.17.0.2) The recommended value of fs.aio-max-nr is 1048576 (Current value: 65536)
[WARN] OBD-1007: (172.17.0.2) The recommended number of stack size is unlimited (Current value: 8192)
[WARN] OBD-1017: (172.17.0.2) The value of the “vm.max_map_count” must be within [327600, 1310720] (Current value: 65530, Recommended value: 655360)
[WARN] OBD-1017: (172.17.0.2) The value of the “fs.file-max” must be greater than 6573688 (Current value: 6519857, Recommended value: 6573688)
cluster scenario: express_oltp
Start observer ok
observer program health check ok

Connect to observer x
[ERROR] OBD-1006: Failed to connect to oceanbase-ce
See https://www.oceanbase.com/product/ob-deployer/error-codes .
Trace ID: 52eab338-1c3c-11f0-853e-0242ac110002
If you want to view detailed obd logs, please run: obd display-trace 52eab338-1c3c-11f0-853e-0242ac110002
boot success!

2 个赞

老师,最新报错是这样的

start ob cluster ...
Get local repositories ok
Load cluster param plugin ok
Cluster status check ok
[WARN] OBD-1011: (172.17.0.2) The recommended value of fs.aio-max-nr is 1048576 (Current value: 65536)
[WARN] OBD-1007: (172.17.0.2) The recommended number of stack size is unlimited (Current value: 8192)
[WARN] OBD-1017: (172.17.0.2) The value of the "vm.max_map_count" must be within [327600, 1310720] (Current value: 65530, Recommended value: 655360)
[WARN] OBD-1017: (172.17.0.2) The value of the "fs.file-max" must be greater than 6573688 (Current value: 6519857, Recommended value: 6573688)
cluster scenario: express_oltp
Start observer ok
observer program health check ok





Connect to observer x
[ERROR] OBD-1006: Failed to connect to oceanbase-ce
See https://www.oceanbase.com/product/ob-deployer/error-codes .
Trace ID: 52eab338-1c3c-11f0-853e-0242ac110002
If you want to view detailed obd logs, please run: obd display-trace 52eab338-1c3c-11f0-853e-0242ac110002
boot success!

2 个赞

–name obstandalone
demo集群不是你的,当前ob不支持该ip。修改ip需要重新安装

2 个赞

目前提示连接不上ce,我这目前配置多么,官方文档说修改密码,可我配置中没有密码

[root@1f86eea88ccf cluster]# cat obcluster/config.yaml 
oceanbase-ce:
  servers:
  - 172.17.0.2
  global:
    home_path: /root/ob
    mysql_port: 2881
    rpc_port: 2882
    zone: zone1
    cluster_id: 1
    appname: obcluster
    memory_limit: 6G
    system_memory: 1G
    datafile_size: 5G
    log_disk_size: 5G
    root_password: ob123456
    scenario: express_oltp
    obconfig_url:
    cpu_count: 16
    production_mode: false
    syslog_level: INFO
    enable_syslog_wf: false
    enable_syslog_recycle: true
    max_syslog_file_count: 4
    enable_rich_error_msg: true

2 个赞

或者可以设置免密登录oceanbase么,我先把服务起来,里面有重要数据

2 个赞

连接超时的错误

1 个赞

目前有个服务还是访问老的ip,请问要改哪里

[2025-04-18 14:15:41.418465] WDIAG [SHARE.PT] do_detect_master_rs_ls_ (ob_rpc_ls_table.cpp:296) [492][T1_TimerWK3][T1][YB42AC110002-0006330E06D8EC4E-0-0] [lt=2][errcode=0] fail to send rpc(tmp_ret=-4122, tmp_ret="OB_RPC_POST_ERROR", cluster_id=1, addr="172.17.0.6:2882", timeout=10305932, arg={addr:"172.17.0.6:2882", cluster_id:1})

1 个赞

:index_pointing_at_the_viewer: :index_pointing_at_the_viewer: :index_pointing_at_the_viewer:

:+1: :+1: :+1: :+1:

1.容器重启后ip变更报错 [ERROR] OBD-1013: root@172.17.0.6 connect failed: time out

2.解决方式 将容器ip改为原来的ip,改配置的话坑比较多

创建个自己的网络

docker network create --subnet=172.17.0.0/16 mynet1

把原有的断网

docker network disconnect bridge 1f86eea88ccf

ip改为之前的

docker network connect --ip 172.17.0.6 mynet1 1f86eea88ccf

在验证在ip生效没有

docker inspect 1f86eea88ccf | grep “IPAddress”

3.重启容器,完活