使用 OBD 进行集群的扩容,执行add server报timeout

【 使用环境 】测试环境
【 OB or 其他组件 】OB
【 使用版本 】4.3.1
【问题描述】使用 OBD 进行集群的扩容,最后执行add server报timeout
【复现路径】
1.新增配置文件add_observer.yaml
[root@ob01 conf]# cat add_observer.yaml
user:
username: admin
password: 111111
port: 22
oceanbase-ce:
servers:

  • name: server4
    ip: 10.0.22.45
  • name: server5
    ip: 10.0.22.46
  • name: server6
    ip: 10.0.22.47
    global:
    devname: ens192
    cluster_id: 1
    memory_limit: 25G
    system_memory: 1G
    datafile_size: 10G
    datafile_maxsize: 180G
    log_disk_size: 80G
    enable_syslog_wf: true
    enable_syslog_recycle: true
    max_syslog_file_count: 4
    appname: obdemo2
    root_password: 8wqBq4XBVYzHRocHAeQQ
    ocp_agent_monitor_password: ceYhPqAcpz
    proxyro_password: 9H7pasTbUg
    ocp_root_password: qb9gp7OG7f
    ocp_meta_password: 2KExFJcwxQ
    server4:
    mysql_port: 2881
    rpc_port: 2882
    obshell_port: 2886
    home_path: /home/admin/observer
    data_dir: /data
    redo_dir: /redo
    zone: zone1
    server5:
    mysql_port: 2881
    rpc_port: 2882
    obshell_port: 2886
    home_path: /home/admin/observer
    data_dir: /data
    redo_dir: /redo
    zone: zone2
    server6:
    mysql_port: 2881
    rpc_port: 2882
    obshell_port: 2886
    home_path: /home/admin/observer
    data_dir: /data
    redo_dir: /redo
    zone: zone3

2.执行obd cluster deploy obdemo2 -c add_observer.yaml 进行初始化
[root@ob01 conf]# obd cluster deploy obdemo2 -c add_observer.yaml
±-------------------------------------------------------------------------------------------+
| Packages |
±-------------±--------±-----------------------±-----------------------------------------+
| Repository | Version | Release | Md5 |
±-------------±--------±-----------------------±-----------------------------------------+
| oceanbase-ce | 4.3.0.1 | 100000242024032211.el7 | c4a03c83614f50c99ddb1c37dda858fa5d9b14b7 |
±-------------±--------±-----------------------±-----------------------------------------+
Repository integrity check ok
Parameter check ok
Cluster status check ok
Initializes observer work home ok
Remote oceanbase-ce-4.3.0.1-100000242024032211.el7-c4a03c83614f50c99ddb1c37dda858fa5d9b14b7 repository install ok
Remote oceanbase-ce-4.3.0.1-100000242024032211.el7-c4a03c83614f50c99ddb1c37dda858fa5d9b14b7 repository lib check !!
Try to get lib-repository
Remote oceanbase-ce-libs-4.3.0.1-100000242024032211.el7-ab78ddc22f64716358a8355fcf8087e65e7556ae repository install ok
Remote oceanbase-ce-4.3.0.1-100000242024032211.el7-c4a03c83614f50c99ddb1c37dda858fa5d9b14b7 repository lib check ok
obdemo2 deployed
Please execute obd cluster start obdemo2 to start
Trace ID: 01c3b68a-24b2-11ef-9ef5-00505686bc68
If you want to view detailed obd logs, please run: obd display-trace 01c3b68a-24b2-11ef-9ef5-00505686bc68

3.重新启动老集群
[root@ob01 conf]# obd cluster start obdemo
Get local repositories ok
Search plugins ok
Load cluster param plugin ok
Cluster status check ok
Check before start observer ok
Check before start obproxy ok
Check before start obagent ok
Check before start ocp-express ok
Start observer ok
observer program health check ok
obshell program health check ok
Connect to observer 10.0.22.41:2881 ok
Start obproxy ok
obproxy program health check ok
Connect to obproxy ok
Initialize obproxy-ce ok
Start obagent ok
obagent program health check ok
Connect to Obagent ok
Start ocp-express ok
ocp-express program health check ok
Connect to ocp-express ok
Initialize ocp-express ok
Wait for observer init ok
±---------------------------------------------+
| observer |
±-----------±--------±-----±------±-------+
| ip | version | port | zone | status |
±-----------±--------±-----±------±-------+
| 10.0.22.41 | 4.3.0.1 | 2881 | zone1 | ACTIVE |
| 10.0.22.42 | 4.3.0.1 | 2881 | zone2 | ACTIVE |
| 10.0.22.43 | 4.3.0.1 | 2881 | zone3 | ACTIVE |
±-----------±--------±-----±------±-------+
obclient -h10.0.22.41 -P2881 -uroot -p’8wqBq4XBVYzHRocHAeQQ’ -Doceanbase -A

±---------------------------------------------+
| obproxy |
±-----------±-----±----------------±-------+
| ip | port | prometheus_port | status |
±-----------±-----±----------------±-------+
| 10.0.22.42 | 2883 | 2884 | active |
±-----------±-----±----------------±-------+
obclient -h10.0.22.42 -P2883 -uroot@proxysys -p’7Az9qLt3Jt’ -Doceanbase -A

±--------------------------------------------------------------+
| obagent |
±-----------±-------------------±-------------------±-------+
| ip | mgragent_http_port | monagent_http_port | status |
±-----------±-------------------±-------------------±-------+
| 10.0.22.41 | 8089 | 8088 | active |
| 10.0.22.42 | 8089 | 8088 | active |
| 10.0.22.43 | 8089 | 8088 | active |
±-----------±-------------------±-------------------±-------+
±--------------------------------------------------------------+
| ocp-express |
±-----------------------±---------±-----------------±-------+
| url | username | initial password | status |
±-----------------------±---------±-----------------±-------+
| http://10.0.22.43:8180 | admin | Ly5+C9r_ | active |
±-----------------------±---------±-----------------±-------+
obdemo running
Trace ID: 5b3c25ac-24b3-11ef-95b8-00505686bc68
If you want to view detailed obd logs, please run: obd display-trace 5b3c25ac-24b3-11ef-95b8-00505686bc68

4.执行add server (重新登陆后再次执行还是报错)
obclient [oceanbase]> ALTER SYSTEM ADD SERVER ‘10.0.22.45:2881’ ZONE ‘zone1’;
ERROR 4012 (HY000): Timeout
obclient [oceanbase]> quit
Bye
You have new mail in /var/spool/mail/root
[root@ob01 conf]# obclient -h10.0.22.41 -P2881 -uroot -p’8wqBq4XBVYzHRocHAeQQ’ -Doceanbase -A
Welcome to the OceanBase. Commands end with ; or \g.
Your OceanBase connection id is 3221658901
Server version: OceanBase_CE 4.3.0.1 (r100000242024032211-0193a343bc60b4699ec47792c3fc4ce166a182f9) (Built Mar 22 2024 13:19:48)

Copyright (c) 2000, 2018, OceanBase and/or its affiliates. All rights reserved.

Type ‘help;’ or ‘\h’ for help. Type ‘\c’ to clear the current input statement.

obclient [oceanbase]>
obclient [oceanbase]>
obclient [oceanbase]> ALTER SYSTEM ADD SERVER ‘10.0.22.45:2881’ ZONE ‘zone1’;
ERROR 4012 (HY000): Timeout
obclient [oceanbase]> select * from dba_ob_servers \G;
*************************** 1. row ***************************
SVR_IP: 10.0.22.41
SVR_PORT: 2882
ID: 1
ZONE: zone1
SQL_PORT: 2881
WITH_ROOTSERVER: YES
STATUS: ACTIVE
START_SERVICE_TIME: 2024-06-06 16:03:34.228467
STOP_TIME: NULL
BLOCK_MIGRATE_IN_TIME: NULL
CREATE_TIME: 2024-06-02 11:04:53.827305
MODIFY_TIME: 2024-06-06 16:03:35.851386
BUILD_VERSION: 4.3.0.1_100000242024032211-0193a343bc60b4699ec47792c3fc4ce166a182f9(Mar 22 2024 13:19:48)
LAST_OFFLINE_TIME: NULL
*************************** 2. row ***************************
SVR_IP: 10.0.22.42
SVR_PORT: 2882
ID: 2
ZONE: zone2
SQL_PORT: 2881
WITH_ROOTSERVER: NO
STATUS: ACTIVE
START_SERVICE_TIME: 2024-06-06 16:04:33.664632
STOP_TIME: NULL
BLOCK_MIGRATE_IN_TIME: NULL
CREATE_TIME: 2024-06-02 11:04:53.841050
MODIFY_TIME: 2024-06-06 16:04:35.523547
BUILD_VERSION: 4.3.0.1_100000242024032211-0193a343bc60b4699ec47792c3fc4ce166a182f9(Mar 22 2024 13:19:48)
LAST_OFFLINE_TIME: NULL
*************************** 3. row ***************************
SVR_IP: 10.0.22.43
SVR_PORT: 2882
ID: 3
ZONE: zone3
SQL_PORT: 2881
WITH_ROOTSERVER: NO
STATUS: ACTIVE
START_SERVICE_TIME: 2024-06-06 16:04:35.909968
STOP_TIME: NULL
BLOCK_MIGRATE_IN_TIME: NULL
CREATE_TIME: 2024-06-02 11:04:53.857925
MODIFY_TIME: 2024-06-06 16:04:38.918403
BUILD_VERSION: 4.3.0.1_100000242024032211-0193a343bc60b4699ec47792c3fc4ce166a182f9(Mar 22 2024 13:19:48)
LAST_OFFLINE_TIME: NULL
3 rows in set (0.000 sec)

ERROR:
No query specified

参考文档: OceanBase分布式数据库-海量数据 笔笔算数
【附件及日志】推荐使用OceanBase敏捷诊断工具obdiag收集诊断信息,详情参见链接(右键跳转查看):

【SOP系列 22 】——故障诊断第一步(自助诊断和诊断信息收集)

1 个赞

已解决,新加observer的rpc端口写错了

1 个赞