繁体   English   中英

使用mpi4py的主机密钥验证失败

[英]Host key verification failed using mpi4py

我正在Arch Linux ARM(更具体地说是在Raspberry Pi群集上)中使用mpi4py(1.3.1)和openmpi(1.8.6-1)构建MPI应用程序。 我已经在3个节点(4个进程)上成功运行了程序,并且尝试添加新节点时,会发生以下情况:

Host key verification failed.
--------------------------------------------------------------------------
ORTE was unable to reliably start one or more daemons.
This usually is caused by:

* not finding the required libraries and/or binaries on
  one or more nodes. Please check your PATH and LD_LIBRARY_PATH
  settings, or configure OMPI with --enable-orterun-prefix-by-default

* lack of authority to execute on one or more specified nodes.
  Please verify your allocation and authorities.

* the inability to write startup files into /tmp (--tmpdir/orte_tmpdir_base).
Please check with your sys admin to determine the correct location to use.

*  compilation of the orted with dynamic libraries when static are required
  (e.g., on Cray). Please check your configure cmd line and consider using
  one of the contrib/platform definitions for your system type.

* an inability to create a connection back to mpirun due to a
  lack of common network interfaces and/or no route found between
  them. Please check network connectivity (including firewalls
  and network routing requirements).

有趣的是,ssh键很好,因为我使用的是相同的节点(我可以删除主机文件的任何条目,添加新的节点,并且它可以工作,所以我很确定问题不在ssh设置错误(仅当我使用5个进程时才会发生)。

这可能是某种库中的错误吗?

这是我的主机文件

192.168.1.26 slots=2
192.168.1.188 slots=1
#192.168.1.202 slots=1 If uncommented and run with -np 5, it will raise the error
192.168.1.100 slots=1

提前致谢!

在运行Fedora 22和OpenMPI 1.8的Linux x86_64小型集群上,我遇到了同样的问题。 我可以从启动计算机通过SSH进入我的5台计算机中的任何一台,但是当我尝试使用3个或更多节点启动MPI时,它将给我一个身份验证错误。 就像您一样,3似乎是一个神奇的数字,事实证明它是。 OpenMPI使用基于树的启动,因此,当您有两个以上节点时,一个或多个中间节点将执行ssh。 就我而言,我没有使用无密码设置。 我在添加到密钥链的启动计算机上具有SSH身份。 它能够启动前两个节点,因为我的钥匙链中有经过身份验证的身份。 然后,这些节点中的每一个都尝试启动更多,而这些节点没有经过身份验证的密钥(我将需要在每个节点上添加它)。

因此,解决方案似乎正在转向无密码的SSH身份设置,但是显然您必须小心如何做到这一点。 我在启动计算机上创建了一个特定的身份(密钥对)。 我将密钥添加到了我要使用的节点上的授权密钥中(这很容易,因为它们都使用NFS,但是如果需要,您可以手动分发一次密钥)。 然后,我修改了SSH配置,以在尝试进入节点计算机时使用该无密码身份。 我的〜/ .ssh / config看起来像:

Host node0
    HostName node0
    IdentityFile ~/.ssh/passwordless_rsa
Host node1
    HostName node1
    IdentityFile ~/.ssh/passwordless_rsa
...

我确定有某种方法可以使用通配符将其扩展到N个节点。 或者,您可以考虑在system ssh配置文件中的系统级别更改默认身份文件(我敢打赌那里有类似的选项)。

那就成功了。 现在,我可以启动所有5个节点,而没有任何身份验证问题。 我认为的缺陷在于,启动节点会启动所有其他节点,但是这种基于树的启动意味着您需要链接登录,您无法使用密码验证的身份进行登录,因为您永远都没有机会进行身份验证。

拥有无密码的密钥仍然让我感到吃惊,因此,为了使这些节点在连接到开放网络的节点上更加安全,我更改了sshd config(系统级别)以将登录名限制为除来自启动节点的我之外的任何人。

暂无
暂无

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM