obd4.5安装,ssh端口非22配置失败

【 使用环境 】测试环境
【 OB or 其他组件 】OB
【 使用版本 】4.5
【问题描述】ssh端口非22,而是2233,尝试多次配置ssh端口均无法识别。
【复现路径】

【附件及日志】

obd.log日志整个文件发一下

fengyouxu@server75:/data/fyx/oceanbase/oceanbase-all-in-one$ obd display-trace c3e6a360-7ff2-11f1-a4ff-9cc2c44df218
[2026-07-15 02:13:27.068] [DEBUG] - cmd: [‘my_ob_cluster’]
[2026-07-15 02:13:27.068] [DEBUG] - opts: {‘config’: ‘distributed-deploy.yaml’, ‘force’: False, ‘clean’: False, ‘unuselibrepo’: None, ‘auto_create_tenant’: None, ‘interactive’: None}
[2026-07-15 02:13:27.068] [DEBUG] - mkdir /home/fengyouxu/.obd/lock/
[2026-07-15 02:13:27.068] [DEBUG] - unknown lock mode
[2026-07-15 02:13:27.069] [DEBUG] - try to get share lock /home/fengyouxu/.obd/lock/global
[2026-07-15 02:13:27.069] [DEBUG] - share lock /home/fengyouxu/.obd/lock/global, count 1
[2026-07-15 02:13:27.069] [DEBUG] - Get Deploy by name
[2026-07-15 02:13:27.069] [DEBUG] - mkdir /home/fengyouxu/.obd/cluster/
[2026-07-15 02:13:27.069] [DEBUG] - mkdir /home/fengyouxu/.obd/config_parser/
[2026-07-15 02:13:27.069] [DEBUG] - try to get exclusive lock /home/fengyouxu/.obd/lock/deploy_my_ob_cluster
[2026-07-15 02:13:27.069] [DEBUG] - exclusive lock /home/fengyouxu/.obd/lock/deploy_my_ob_cluster, count 1
[2026-07-15 02:13:27.069] [DEBUG] - Get deploy info
[2026-07-15 02:13:27.069] [DEBUG] - judge deploy status
[2026-07-15 02:13:27.075] [DEBUG] - config path is None or not
[2026-07-15 02:13:27.075] [DEBUG] - Create deploy by configuration path
[2026-07-15 02:13:27.075] [DEBUG] - exclusive lock /home/fengyouxu/.obd/lock/deploy_my_ob_cluster, count 2
[2026-07-15 02:13:27.075] [DEBUG] - mkdir /home/fengyouxu/.obd/cluster/my_ob_cluster
[2026-07-15 02:13:27.075] [DEBUG] - copy distributed-deploy.yaml /home/fengyouxu/.obd/cluster/my_ob_cluster/config.yaml
[2026-07-15 02:13:27.079] [DEBUG] - Get deploy configuration
[2026-07-15 02:13:27.079] [DEBUG] - Search best suitable repository
[2026-07-15 02:13:27.079] [DEBUG] - Get oceanbase-ce repository
[2026-07-15 02:13:27.080] [DEBUG] - mkdir /home/fengyouxu/.obd/repository
[2026-07-15 02:13:27.080] [DEBUG] - Search repository oceanbase-ce version: None, tag: None, release: None, package_hash: None
[2026-07-15 02:13:27.080] [DEBUG] - try to get share lock /home/fengyouxu/.obd/lock/mirror_and_repo
[2026-07-15 02:13:27.080] [DEBUG] - share lock /home/fengyouxu/.obd/lock/mirror_and_repo, count 1
[2026-07-15 02:13:27.080] [DEBUG] - mkdir /home/fengyouxu/.obd/repository/oceanbase-ce
[2026-07-15 02:13:27.082] [DEBUG] - Found repository oceanbase-ce-4.5.0.0-100000012025112711.el7-ea2a91329c00190d20c01dd73da81b2f081abd4e
[2026-07-15 02:13:27.082] [DEBUG] - share lock /home/fengyouxu/.obd/lock/mirror_and_repo, count 2
[2026-07-15 02:13:27.083] [DEBUG] - Search oceanbase-ce package from mirror
[2026-07-15 02:13:27.084] [DEBUG] - mkdir /home/fengyouxu/.obd/mirror
[2026-07-15 02:13:27.084] [DEBUG] - mkdir /home/fengyouxu/.obd/mirror/remote
[2026-07-15 02:13:27.084] [DEBUG] - mkdir /home/fengyouxu/.obd/mirror/local
[2026-07-15 02:13:27.084] [DEBUG] - try to get exclusive lock /home/fengyouxu/.obd/lock/mirror_and_repo
[2026-07-15 02:13:27.084] [DEBUG] - exclusive lock /home/fengyouxu/.obd/lock/mirror_and_repo, count 1
[2026-07-15 02:13:27.084] [DEBUG] - exclusive lock /home/fengyouxu/.obd/lock/mirror_and_repo, count 2
[2026-07-15 02:13:27.084] [DEBUG] - load repo config: /home/fengyouxu/.obd/mirror/remote/OceanBase.repo
[2026-07-15 02:13:27.084] [DEBUG] - open /home/fengyouxu/.obd/mirror/remote/OceanBase.repo for r
[2026-07-15 02:13:27.085] [WARNING] [WARN] Use centos 7 remote mirror repository for ubuntu 24.04
[2026-07-15 02:13:27.085] [WARNING] [WARN] Use centos 7 remote mirror repository for ubuntu 24.04
[2026-07-15 02:13:27.085] [DEBUG] - exclusive lock /home/fengyouxu/.obd/lock/mirror_and_repo, count 3
[2026-07-15 02:13:27.086] [DEBUG] - md5 is None
[2026-07-15 02:13:27.086] [DEBUG] - name is oceanbase-ce
[2026-07-15 02:13:27.086] [DEBUG] - arch is [‘ia32e’, ‘x86_64’, ‘athlon’, ‘i686’, ‘i586’, ‘i486’, ‘i386’, ‘noarch’]
[2026-07-15 02:13:27.086] [DEBUG] - release is None
[2026-07-15 02:13:27.086] [DEBUG] - version is None
[2026-07-15 02:13:27.086] [DEBUG] - min_version is None
[2026-07-15 02:13:27.086] [DEBUG] - max_version is None
[2026-07-15 02:13:27.086] [DEBUG] - MirrorRepositoryType.LOCAL mirror local found pkg: name: oceanbase-ce
[2026-07-15 02:13:27.086] [DEBUG] version: 4.1.0.0
[2026-07-15 02:13:27.086] [DEBUG] release:101010022023051821.el7
[2026-07-15 02:13:27.086] [DEBUG] arch: x86_64
[2026-07-15 02:13:27.086] [DEBUG] md5: 21271468e0dee7aaf3d4eff4c4bf5e07421ef6fe
[2026-07-15 02:13:27.086] [DEBUG] size: 335064034
[2026-07-15 02:13:27.086] [DEBUG] - md5 is None
[2026-07-15 02:13:27.086] [DEBUG] - name is oceanbase-ce
[2026-07-15 02:13:27.086] [DEBUG] - arch is [‘ia32e’, ‘x86_64’, ‘athlon’, ‘i686’, ‘i586’, ‘i486’, ‘i386’, ‘noarch’]
[2026-07-15 02:13:27.086] [DEBUG] - release is None
[2026-07-15 02:13:27.086] [DEBUG] - version is None
[2026-07-15 02:13:27.086] [DEBUG] - min_version is None
[2026-07-15 02:13:27.086] [DEBUG] - max_version is None
[2026-07-15 02:13:27.086] [DEBUG] - only_download is False
[2026-07-15 02:13:27.087] [DEBUG] - load /home/fengyouxu/.obd/mirror/remote/OceanBase-community-stable-el7/.db
[2026-07-15 02:13:27.096] [DEBUG] - MirrorRepositoryType.REMOTE mirror OceanBase-community-stable-el7 found pkg: oceanbase-ce-4.5.0.0-100000012025112711.el7.x86_64.rpm
[2026-07-15 02:13:27.096] [DEBUG] - md5 is None
[2026-07-15 02:13:27.096] [DEBUG] - name is oceanbase-ce
[2026-07-15 02:13:27.096] [DEBUG] - arch is [‘ia32e’, ‘x86_64’, ‘athlon’, ‘i686’, ‘i586’, ‘i486’, ‘i386’, ‘noarch’]
[2026-07-15 02:13:27.097] [DEBUG] - release is None
[2026-07-15 02:13:27.097] [DEBUG] - version is None
[2026-07-15 02:13:27.097] [DEBUG] - min_version is None
[2026-07-15 02:13:27.097] [DEBUG] - max_version is None
[2026-07-15 02:13:27.097] [DEBUG] - only_download is False
[2026-07-15 02:13:27.097] [DEBUG] - load /home/fengyouxu/.obd/mirror/remote/OceanBase-development-kit-el7/.db
[2026-07-15 02:13:27.099] [DEBUG] - MirrorRepositoryType.REMOTE mirror OceanBase-development-kit-el7 found pkg: None
[2026-07-15 02:13:27.099] [DEBUG] - get RPM package by oceanbase-ce-4.5.0.0-100000012025112711.el7.x86_64.rpm
[2026-07-15 02:13:27.099] [DEBUG] - Found Package oceanbase-ce-4.5.0.0-100000012025112711.el7-ea2a91329c00190d20c01dd73da81b2f081abd4e
[2026-07-15 02:13:27.099] [DEBUG] - name: oceanbase-ce
[2026-07-15 02:13:27.099] [DEBUG] version: 4.5.0.0
[2026-07-15 02:13:27.099] [DEBUG] release:100000012025112711.el7
[2026-07-15 02:13:27.099] [DEBUG] arch: x86_64
[2026-07-15 02:13:27.099] [DEBUG] md5: ea2a91329c00190d20c01dd73da81b2f081abd4e
[2026-07-15 02:13:27.099] [DEBUG] size: 1001699475 as same as oceanbase-ce-4.5.0.0-100000012025112711.el7-ea2a91329c00190d20c01dd73da81b2f081abd4e, Use package name: oceanbase-ce
[2026-07-15 02:13:27.100] [DEBUG] version: 4.5.0.0
[2026-07-15 02:13:27.100] [DEBUG] release:100000012025112711.el7
[2026-07-15 02:13:27.100] [DEBUG] arch: x86_64
[2026-07-15 02:13:27.100] [DEBUG] md5: ea2a91329c00190d20c01dd73da81b2f081abd4e
[2026-07-15 02:13:27.100] [DEBUG] size: 1001699475
[2026-07-15 02:13:27.100] [DEBUG] - Searching install plugin for components …
[2026-07-15 02:13:27.100] [DEBUG] - Search install plugin for oceanbase-ce
[2026-07-15 02:13:27.100] [DEBUG] - mkdir /home/fengyouxu/.obd/plugins
[2026-07-15 02:13:27.100] [DEBUG] - Found for oceanbase-ce-install-4.0.0.0 for oceanbase-ce-4.5.0.0
[2026-07-15 02:13:27.100] [DEBUG] - create instance repository for oceanbase-ce-4.5.0.0
[2026-07-15 02:13:27.103] [DEBUG] - oceanbase-ce-4.5.0.0 is already install
[2026-07-15 02:13:27.103] [DEBUG] - Searching install plugin for components …
[2026-07-15 02:13:27.103] [DEBUG] - Search install plugin for oceanbase-ce
[2026-07-15 02:13:27.103] [DEBUG] - Found for oceanbase-ce-install-4.0.0.0 for oceanbase-ce-4.5.0.0
[2026-07-15 02:13:27.104] [INFO] ±-----------------------------------------------------------------------------------------------+
[2026-07-15 02:13:27.104] [INFO] | Packages |
[2026-07-15 02:13:27.104] [INFO] ±-------------±------------±-----------------------±-----------------------------------------+
[2026-07-15 02:13:27.104] [INFO] | Repository | Version/Tag | Release | Hash |
[2026-07-15 02:13:27.104] [INFO] ±-------------±------------±-----------------------±-----------------------------------------+
[2026-07-15 02:13:27.104] [INFO] | oceanbase-ce | 4.5.0.0 | 100000012025112711.el7 | ea2a91329c00190d20c01dd73da81b2f081abd4e |
[2026-07-15 02:13:27.104] [INFO] ±-------------±------------±-----------------------±-----------------------------------------+
[2026-07-15 02:13:27.104] [INFO] Repository integrity check
[2026-07-15 02:13:27.235] [INFO] Load param plugin
[2026-07-15 02:13:27.236] [DEBUG] - Searching param plugin for components …
[2026-07-15 02:13:27.236] [DEBUG] - Search param plugin for oceanbase-ce
[2026-07-15 02:13:27.237] [DEBUG] - Found for oceanbase-ce-param-4.3.3.0 for oceanbase-ce-4.5.0.0
[2026-07-15 02:13:27.237] [DEBUG] - Applying oceanbase-ce-param-4.3.3.0 for oceanbase-ce-4.5.0.0-100000012025112711.el7-ea2a91329c00190d20c01dd73da81b2f081abd4e
[2026-07-15 02:13:27.519] [INFO] Open ssh connection
[2026-07-15 02:13:27.537] [DEBUG] - host: 10.110.105.77, port: 22, user: fengyouxu, password: ******
[2026-07-15 02:13:27.538] [ERROR] Traceback (most recent call last):
[2026-07-15 02:13:27.538] [ERROR] File “core.py”, line 2039, in deploy_cluster
[2026-07-15 02:13:27.538] [ERROR] File “core.py”, line 2092, in _deploy_cluster
[2026-07-15 02:13:27.538] [ERROR] File “core.py”, line 457, in get_clients
[2026-07-15 02:13:27.538] [ERROR] File “core.py”, line 476, in get_clients_with_connect_status
[2026-07-15 02:13:27.538] [ERROR] File “core.py”, line 512, in ssh_clients_connect
[2026-07-15 02:13:27.538] [ERROR] File “_stdio.py”, line 1185, in func_wrapper
[2026-07-15 02:13:27.538] [ERROR] File “ssh.py”, line 469, in connect
[2026-07-15 02:13:27.538] [ERROR] File “_stdio.py”, line 1185, in func_wrapper
[2026-07-15 02:13:27.538] [ERROR] File “ssh.py”, line 420, in _login
[2026-07-15 02:13:27.538] [ERROR] File “paramiko/client.py”, line 387, in connect
[2026-07-15 02:13:27.538] [ERROR] paramiko.ssh_exception.NoValidConnectionsError: [Errno None] Unable to connect to port 22 on 10.110.105.77
[2026-07-15 02:13:27.538] [ERROR]
[2026-07-15 02:13:27.538] [CRITICAL] [ERROR] OBD-1013: fengyouxu@10.110.105.77 connect failed: time out
[2026-07-15 02:13:27.666] [INFO] [ERROR] OBD-1013: fengyouxu@10.110.105.77 connect failed: time out
[2026-07-15 02:13:27.666] [INFO]
[2026-07-15 02:13:27.666] [INFO] Trace ID: c3e6a360-7ff2-11f1-a4ff-9cc2c44df218
[2026-07-15 02:13:27.666] [INFO] If you want to view detailed obd logs, please run: obd display-trace c3e6a360-7ff2-11f1-a4ff-9cc2c44df218
[2026-07-15 02:13:27.666] [DEBUG] - unlock /home/fengyouxu/.obd/lock/global
[2026-07-15 02:13:27.666] [DEBUG] - unlock /home/fengyouxu/.obd/lock/deploy_my_ob_cluster
[2026-07-15 02:13:27.666] [DEBUG] - unlock /home/fengyouxu/.obd/lock/mirror_and_repo

我还尝试了其他的方式,比如
oceanbase-ce:
servers:
- name: server75
ip: 10.110.105.75
- name: server76
ip: 10.110.105.76
- name: worker77
ip: 10.110.105.77
global:
ssh_port: 2233 # 全局设置
cluster_name: my_ob_cluster
admin_password: your_strong_password
data_dir: /data/fyx/oceanbase/data
redo_dir: /data/fyx/oceanbase/logs
memory_limit: 8G
datafile_size: 20G
system_memory: 2G
cpu_count: 4
server75:
- 10.110.105.75
server76:
- 10.110.105.76
worker77:
- 10.110.105.77
或者 servers:
- name: server75
ip: 10.110.105.75
ssh_port: 2233
- name: server76
ip: 10.110.105.76
ssh_port: 2233
- name: worker77
ip: 10.110.105.77
ssh_port: 2233
global:
cluster_name: my_ob_cluster
admin_password: your_strong_password
data_dir: /data/fyx/oceanbase/data
redo_dir: /data/fyx/oceanbase/logs
memory_limit: 8G
datafile_size: 20G
system_memory: 2G
cpu_count: 4
server75:
- 10.110.105.75
server76:
- 10.110.105.76
worker77:
- 10.110.105.77
貌似都不行

host: 10.110.105.77, port: 22, user: fengyouxu, password: ******

paramiko.ssh_exception.NoValidConnectionsError: Unable to connect to port 22 on 10.110.105.77

OBD-1013: fengyouxu@10.110.105.77 connect failed: time out
看着报错还是因为22端口不可访问导致的
测试一下 是否通

ssh -p 2233 fengyouxu@10.110.105.77 “hostname”

正确的配置应该是这样的
===== SSH 配置:必须在最顶层 =====
user:
username: fengyouxu
port: 2233 # 以实际 SSH 端口为准
key_file: /home/fengyouxu/.ssh/id_rsa
##password: your_password # 密钥登录可省略

oceanbase-ce:
servers:
- name: server75
ip: 10.110.105.75
- name: server76
ip: 10.110.105.76
- name: worker77
ip: 10.110.105.77
global:
cluster_name: my_ob_cluster
admin_password: your_strong_password
data_dir: /data/fyx/oceanbase/data
redo_dir: /data/fyx/oceanbase/logs
memory_limit: 8G
datafile_size: 20G
system_memory: 2G
cpu_count: 4
server75:
zone: zone1
home_path: /data/fyx/oceanbase/observer
server76:
zone: zone2
home_path: /data/fyx/oceanbase/observer
worker77:
zone: zone3
home_path: /data/fyx/oceanbase/observer

2 个赞

实测好用,感谢!

这篇文章写得真不错,很有启发性。

作者的视角很独特,提供了一个新思路。