首页
学习
活动
专区
圈层
工具
发布
首页
学习
活动
专区
圈层
工具
MCP广场
社区首页 >问答首页 >cephadm:无法将节点添加到ceph集群(错误EINVAL:无法连接到主机)

cephadm:无法将节点添加到ceph集群(错误EINVAL:无法连接到主机)
EN

Stack Overflow用户
提问于 2020-11-11 16:50:49
回答 3查看 2.6K关注 0票数 3

我按照https://docs.ceph.com/en/latest/cephadm/install/中的以下步骤在CentOS8.1上设置了ceph集群

代码语言:javascript
复制
curl --silent --remote-name --location https://github.com/ceph/ceph/raw/octopus/src/cephadm/cephadm
chmod +x cephadm
./cephadm add-repo --release octopus
./cephadm install

执行完上述命令后,我发现ceph需要docker或podman才能运行。因此,我从https://docs.docker.com/engine/install/centos/安装了docker的社区版本,并继续执行以下步骤。

代码语言:javascript
复制
./cephadm install
mkdir -p /etc/ceph
cephadm bootstrap --mon-ip *ip_of_the_current_machine (host1)*
cephadm install ceph-common
ssh-copy-id -f -i /etc/ceph/ceph.pub root@host2*
ceph orch host add host2

上述命令失败,并显示以下错误

代码语言:javascript
复制
[root@host1 home]# ceph orch host add host2
INFO:cephadm:Inferring fsid 12345678-2345-6789-1011-000129110013
INFO:cephadm:Inferring config /var/lib/ceph/12345678-2345-6789-1011-000129110013/mon.host1/config
INFO:cephadm:Using recent ceph image ceph/ceph:v15
Error EINVAL: Failed to connect to host2 (host2).
Check that the host is reachable and accepts connections using the cephadm SSH key
 
you may want to run:
> ceph cephadm get-ssh-config > ssh_config
> ceph config-key get mgr/cephadm/ssh_identity_key > key
> ssh -F ssh_config -i key root@host2

我可以使用上述步骤登录到host2。有没有人能告诉我是不是做错了什么。我该如何解决这个问题。

EN

回答 3

Stack Overflow用户

回答已采纳

发布于 2020-11-20 20:20:33

因此,经过几天的调试,我发现我想添加的节点上缺少python3。我所要做的就是使用命令检查最后几个日志。

代码语言:javascript
复制
ceph log last cephadm

这给出了以下日志消息。

代码语言:javascript
复制
Traceback (most recent call last):
  File "/usr/share/ceph/mgr/cephadm/module.py", line 1036, in _remote_connection
    raise execnet.gateway_bootstrap.HostNotFound(msg)
execnet.gateway_bootstrap.HostNotFound: Can't communicate with remote host `host2`, possibly because python3 is not installed there: cannot send (already closed?)
 
The above exception was the direct cause of the following exception:
 
Traceback (most recent call last):
  File "/usr/share/ceph/mgr/orchestrator/_interface.py", line 295, in _finalize
    next_result = self._on_complete(self._value)
  File "/usr/share/ceph/mgr/cephadm/module.py", line 103, in <lambda>
    return CephadmCompletion(on_complete=lambda _: f(*args, **kwargs))
  File "/usr/share/ceph/mgr/cephadm/module.py", line 1201, in add_host
    return self._add_host(spec)
  File "/usr/share/ceph/mgr/cephadm/module.py", line 1187, in _add_host
    error_ok=True, no_fsid=True)
  File "/usr/share/ceph/mgr/cephadm/module.py", line 1104, in _run_cephadm
    with self._remote_connection(host, addr) as tpl:
  File "/lib64/python3.6/contextlib.py", line 81, in __enter__
    return next(self.gen)
  File "/usr/share/ceph/mgr/cephadm/module.py", line 1055, in _remote_connection
    raise OrchestratorError(msg) from e
orchestrator._interface.OrchestratorError: Failed to connect to host2 (host2).
Check that the host is reachable and accepts connections using the cephadm SSH key

接下来添加我运行的节点。

代码语言:javascript
复制
ceph orch host add host2 ip_address
票数 4
EN

Stack Overflow用户

发布于 2021-01-13 23:59:36

我也遇到过同样的问题,但我最主要的错误信息是

代码语言:javascript
复制
2021-01-13T15:21:13.071913+0000 mgr.ha1.qzzjzw (mgr.18492) 167366 : cephadm [ERR] _Promise failed
Traceback (most recent call last):
  File "/lib/python3.6/site-packages/execnet/gateway_bootstrap.py", line 48, in bootstrap_exec
    s = io.read(1)
  File "/lib/python3.6/site-packages/execnet/gateway_base.py", line 402, in read
    raise EOFError("expected %d bytes, got %d" % (numbytes, len(buf)))
EOFError: expected 1 bytes, got 0

而解决方法也对我很有帮助。

代码语言:javascript
复制
ceph orch host add host2 ip_address
票数 1
EN

Stack Overflow用户

发布于 2021-05-13 00:07:27

在debian 10上使用cephadm时,我遇到了与Oleg相同的问题。

解决方法是添加IP地址。

代码语言:javascript
复制
sudo ./cephadm shell
ceph orch host add host2 ip_address
Added host 'host2'
票数 0
EN
页面原文内容由Stack Overflow提供。腾讯云小微IT领域专用引擎提供翻译支持
原文链接:

https://stackoverflow.com/questions/64783203

复制
相关文章

相似问题

领券
问题归档专栏文章快讯文章归档关键词归档开发者手册归档开发者手册 Section 归档