【发布时间】:2020-04-16 02:34:58
【问题描述】:
尝试(仍然)让集群运行。我有两台 Linux (Ubuntu) 计算机,服务器是“笔记本电脑”。很确定 ssh 可以工作,通过密钥身份验证,我可以在没有命令行密码的情况下 ssh 到“笔记本电脑”。 ssh_exec_wait 有效,例如,
session <- ssh_connect("laptop")
a <- ssh_exec_wait(session, command = "whoami")
ssh_disconnect(session)
有效。我已经阅读了文档(R 的未来),在我进入集群期货之前工作正常。
plan(cluster, workers = c("localhost"))
工作正常,但是
plan(cluster, workers = c("laptop"))
给出错误:
Warning: remote port forwarding failed for listen port 11968
List of 2
$ node_idx: int 1
$ node :List of 5
..$ con : 'sockconn' int 3
.. ..- attr(*, "conn_id")=<externalptr>
..$ host : chr "laptop"
.. ..- attr(*, "localhost")= logi FALSE
..$ rank : int 1
..$ rshlogfile : NULL
..$ session_info:List of 6
.. ..$ r :List of 15
.. .. ..$ platform : chr "x86_64-pc-linux-gnu"
.. .. ..$ arch : chr "x86_64"
.. .. ..$ os : chr "linux-gnu"
.. .. ..$ system : chr "x86_64, linux-gnu"
.. .. ..$ status : chr ""
.. .. ..$ major : chr "3"
.. .. ..$ minor : chr "6.3"
.. .. ..$ year : chr "2020"
.. .. ..$ month : chr "02"
.. .. ..$ day : chr "29"
.. .. ..$ svn rev : chr "77875"
.. .. ..$ language : chr "R"
.. .. ..$ version.string: chr "R version 3.6.3 (2020-02-29)"
.. .. ..$ nickname : chr "Holding the Windsock"
.. .. ..$ os.type : chr "unix"
.. ..$ system :List of 8
.. .. ..$ sysname : chr "Linux"
.. .. ..$ release : chr "5.3.0-46-generic"
.. .. ..$ version : chr "#38~18.04.1-Ubuntu SMP Tue Mar 31 04:17:56 UTC 2020"
.. .. ..$ nodename : chr "laptop"
.. .. ..$ machine : chr "x86_64"
.. .. ..$ login : chr "mark"
.. .. ..$ user : chr "mark"
.. .. ..$ effective_user: chr "mark"
.. ..$ libs : chr [1:4] "/home/mark/R/x86_64-pc-linux-gnu-library/3.6" "/usr/local/lib/R/site-library" "/usr/lib/R/site-library" "/usr/lib/R/library"
.. ..$ pkgs : NULL
.. ..$ pwd : chr "/home/mark"
.. ..$ process:List of 1
.. .. ..$ pid: int 2809
..- attr(*, "class")= chr "SOCKnode"
Error: Initialization of plan() failed, because the test future used for validation failed. The reason was: Unexpected result (of class ‘NULL’ != ‘FutureResult’) retrieved for ClusterFuture future (label = ‘future-plan-test’, expression = ‘NA’): . This suggests that the communication with ClusterFuture worker (‘SOCKnode’ #1) is out of sync.
我假设第一行是真正的错误信息:
Warning: remote port forwarding failed for listen port 11968
需要手动设置端口吗?
【问题讨论】:
标签: r linux ssh cluster-computing