Open randy3k opened 4 years ago
It can sometimes take a moment for the ssh ports to recognise, does it work connecting to one of the VMs via gce_ssh()
? The logs indicate the ssh key upload was at least successful.
Yes. gce_ssh
works.
Ok then I think its the check that failed, but it is actually all working. I may need to put a longer pause in before the check. You should be able to send up parallel jobs etc using library(future)
For some reasons, I got the following error
r$> plan(cluster, workers = vms)
bash: /usr/local/bin/docker: No such file or directory
I am trying to do this
vm1 <- gce_vm("r-cluster-1")
vm2 <- gce_vm("r-cluster-2")
vm3 <- gce_vm("r-cluster-3")
vms <- list(vm1, vm2, vm3)
# need this otherwise "check_ssh_set(x) is not TRUE"
vms <- lapply(vms, function(v) gce_ssh_setup(v, key.pub = "~/.ssh/id_rsa.pub"))
plan(cluster, workers = vms)
You shouldn't need gce_ssh_setup()
anymore, that should be handled by gce_cluster()
If you run gce_vm_cluster()
again with the same names, does it return? If the cluster is already up it should then just return the existing VM. Then you can use its returned vms
vms <- gce_vm_cluster()
plan(cluster, workers = as.cluster(vms))
Otherwise I think you can do it how you are building it, but need to wrap it in as.cluster(vms)
plan(cluster, workers = as.cluster(vms))
I refer to this documentation https://cloudyr.github.io/googleComputeEngineR/articles/massive-parallel.html - the website is most up to date
Thanks. But I got this if I do not run gce_ssh_setup
first.
> vms <- list(vm1, vm2, vm3)
> plan(cluster, workers = as.cluster(vms))
Error in as.cluster.gce_instance(X[[i]], ...) :
check_ssh_set(x) is not TRUE
Back to the bash: /usr/local/bin/docker: No such file or directory
error,
it seems that it is an issue of the following line
> makeClusterPSOCK("34.71.11.230", rscript = c("docker", "run", "--net=host", "rocker/r-parallel", "Rscript"))
bash: /usr/local/bin/docker: No such file or directory
I have a docker installed on my system, and its path is /usr/local/bin/docker
.
It seems that makeClusterPSOCK
was trying to resolve the path of docker https://github.com/HenrikBengtsson/future/blob/30a01ea4b3a922376549f054059325593163f917/R/makeClusterPSOCK.R#L505.
Filed a bug at future
https://github.com/HenrikBengtsson/future/issues/386
Thanks. But I got this if I do not run gce_ssh_setup first.
If setting up without gce_vm_cluster()
then this is necessary, but if gce_vm_cluster()
completes it does this step for you - I think it should complete the second time if using existing VM names and the ssh is completing manually.
I have a docker installed on my system, and its path is /usr/local/bin/docker.
The call should be calling docker on the VM which should have docker installed
Describe the bug
port 22 is not open when running
gce_vm_cluster
. With the latest release version of googleComputeEngineR 0.3.0.To Reproduce
I am pretty sure the connection is open, when I ssh to it directly
Expected behavior
The command should run without error.
**Session Info