r - R Google Compute Engine 创建集群错误
问题描述
我正在尝试创建一个包含在 GCE 上的虚拟机上的 R 集群。我遵循了googleComputeEngineR中的示例。我已经粘贴了下面的代码。
######
vm_names <- paste0("cpu",1:2)
## specify the cheapest VMs that may get turned off
preemptible = list(preemptible = TRUE)
## start up 2 VMs with R base on them (can also customise via Dockerfiles using gce_vm_template instead)
fiftyvms <- lapply(vm_names, gce_vm, predefined_type = "n1-standard-1",
template = "r-base", scheduling = preemptible)
## add any ssh details, username etc.
fiftyvms <- lapply(fiftyvms, gce_ssh_setup)
## once all launched, add to cluster
plan(cluster, workers = as.cluster(fiftyvms))
基本上,我可以创建虚拟机并建立对它们的 SSH 访问,但 socketConnection 一直超时。有什么想法可能是错的吗?
这是我得到的输出:
2018-10-10 20:27:20> 创建模板虚拟机
2018-10-10 20:27:22> 检查操作...待处理
2018-10-10 20:27:33> 运行中...
2018-10-10 20:27:53> 操作在 17 秒内完成
2018-10-10 20:27:53> 外部 IP 例如 cpu1:35.240.99.251
2018-10-10 20:27:53> ## VM r-base 在 35.240.99.251 运行
2018-10-10 20:27:53> 等待几分钟,让初始 docker 容器下载并安装,然后再登录。
2018-10-10 20:27:54> 虚拟机运行
2018-10-10 20:27:59> 创建模板虚拟机
2018-10-10 20:28:01> 检查操作...待处理
2018-10-10 20:28:21> 操作在 5 秒内完成
2018-10-10 20:28:22> 外部 IP 例如 cpu2:35.205.28.126
2018-10-10 20:28:22> ## VM r-base 在 35.205.28.126 运行
2018-10-10 20:28:22> 等待几分钟,让初始 docker 容器下载并安装,然后再登录。
2018-10-10 20:28:23> 虚拟机运行
## add any ssh details, username etc.
fiftyvms <- lapply(fiftyvms, gce_ssh_setup)
2018-10-10 20:28:30> SSH 公钥上传到实例
2018-10-10 20:28:38> SSH 公钥上传到实例
## once all launched, add to cluster
plan(cluster, workers = as.cluster(fiftyvms))
2018-10-10 20:28:59> 外部 IP 例如 cpu1:35.240.99.251
socketConnection 中的错误(“localhost”,端口 = 端口,服务器 = TRUE,阻塞 = TRUE,:
已达到已用时间限制
解决方案
推荐阅读
- javascript - 通过 IoT 中心将云到设备的消息从 Azure Function 发送到设备
- android - Android,为什么我不能读取我刚写的文件?
- nginx - nginx /login 与 /login/ 路由
- android - Firebase 电话身份验证中的验证是什么意思
- javascript - 向多个选择 js 添加许多选项时出现问题
- powerbi - Power BI如何计算不同年份的最后一个月
- html - Jupyter Notebook:隐藏/折叠一段文本作为“提示”
- python - 用python平滑线的路径
- ruby - 如何根据一个实例变量在 ruby 中使用 define_method 动态创建方法?
- javascript - Vue.js- 调用函数并使用 v-on 运行表达式:单击