Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Cannot create rstudio docklet on windows #114

Closed
studerus opened this issue Jan 20, 2016 · 16 comments
Closed

Cannot create rstudio docklet on windows #114

studerus opened this issue Jan 20, 2016 · 16 comments

Comments

@studerus
Copy link

I'm working on windows 10 with the latest version of R and analogsea from github. Creating and manipulating droplets works fine, but I cannot create an RStudio or shiny server. Running the following command:

droplets()[[1]] %>%
 docklet_rstudio()

results in the following error message:

Error: ssh failed
ssh -o BatchMode=yes -o StrictHostKeyChecking=no -o UserKnownHostsFile=C:\Users\[...]\AppData\Local\Temp\RtmpgVJp1H/hosts root@46.101.209.177 "docker pull rocker/rstudio"
In addition: Warning message:
running command 'ssh -o BatchMode=yes -o StrictHostKeyChecking=no -o UserKnownHostsFile=C:\Users\[...][\AppData\Local\Temp\RtmpgVJp1H/hosts root@46.101.209.177 "docker pull rocker/rstudio"' had status 255 

Is this a bug or am I doing something wrong?

@sckott
Copy link
Collaborator

sckott commented Jan 20, 2016

Do you have SSH keys set up already on your machine? And you can ssh into a DO box?

@studerus
Copy link
Author

How can I check whether I have SSH keys correctly set up? It appears that I have SSH keys because typing keys() shows two different keys.

It would be very helpful if either the vignette or the help file docklet_rstudio() would explain how to use SSH keys for creating an RStudio server.

@sckott
Copy link
Collaborator

sckott commented Jan 20, 2016

How can I check whether I have SSH keys correctly set up?

if you can ssh into your DigitalOcean machine from the command line outside of R, then I think everything should work fine in analogsea in R - can you do that?

It would be very helpful if either the vignette or the help file docklet_rstudio() would explain how to use SSH keys for creating an RStudio server.

Will definitely add more to the docs on using ssh keys

@sckott
Copy link
Collaborator

sckott commented Jan 20, 2016

Note there's a slight problem too when creating docklet's where they aren't actually all the way up even when we think they are #113 - working on fixing that - solution being just creating the droplet with docklet_create() - then check again with droplets() until is says status active, then you can go ahead and do things with it

to be sure, you did create a docker droplet via docklet_create()?

@studerus
Copy link
Author

Sorry, I'm not familiar with using ssh on the command line. Do you have an example command that I could adapt for my needs?

@sckott
Copy link
Collaborator

sckott commented Jan 20, 2016

Do you have an example command that I could adapt for my needs?

e.g., ssh -i .ssh/id_rsa2 root@<IP Address>

  • IP address: e.g., 46.101.209.177 the one you had above in your error message
  • root is the user name - so if you chose a different user name, use that, but most likely it is root
  • the -i is a flag to pass in your ssh key and the .ssh/id_rsa2 is the path to my ssh key

@sckott
Copy link
Collaborator

sckott commented Jan 20, 2016

Note: I don't know much about where windows ssh keys are stored

@studerus
Copy link
Author

Using ssh on the command line seems to have worked, because it says "Welcome to Ubuntu 14.04 ..." at the end. However, it also said before "Could not create directory './home/erich/.ssh'". The authenticity of host ... could not be established. It also said "Failed to add the host to the list of known hosts (...)"

@studerus
Copy link
Author

I created the ssh key pair with RStudio under Global Options - Git/SVN. It's stored in C:/Users/erich/.ssh/id_rsa by default

@studerus
Copy link
Author

Note there's a slight problem too when creating docklet's where they aren't actually all the way up even when we think they are #113 - working on fixing that - solution being just creating the droplet with docklet_create() - then check again with droplets() until is says status active, then you can go ahead and do things with it to be sure, you did create a docker droplet via docklet_create()

I tried that. Unfortunately, It did not help.

@sckott
Copy link
Collaborator

sckott commented Jan 20, 2016

Thanks for the info. Do you have your ssh keys stored in options? what does getOption("do_ssh_keys") give you? We look for that R option and use the key you set as your default

@studerus
Copy link
Author

No, I didn't have stored it in options, but I tried it out now. Unfortunately, it still didn't work.

@sckott
Copy link
Collaborator

sckott commented Jan 22, 2016

Okay, i'll have to test on a windows VM, and get back to you ... 🕥

@trestletech
Copy link

Pro-top for others who might have Googled their way here: remember that if you're using RStudio Server, you are technically trying to SSH from your server, not from your desktop. So make sure your SSH keys are setup to work when using the remote server, not your desktop.

Wasted a few more minutes on that than I'd like to confess.

@sckott
Copy link
Collaborator

sckott commented Feb 23, 2016

Thanks, but isn't the problem here that ssh keys on desktop and server are not configured correctly (which I think doesn't have anything to do with rstudio server)?

@trestletech
Copy link

Sorry, my point was that I had the keys working swimmingly on my desktop and usually use RStudio Desktop. So I was puzzled when I could SSH in from the command line but analogsea could never SSH in to the droplet.

Of course, once I get the SSH keys setup on the server and confirmed that I could SSH into the droplet from the server, then the analogsea commands running in RStudio Server started working.

@sckott sckott added the bug label Mar 6, 2016
@sckott sckott self-assigned this Mar 6, 2016
@sckott sckott added this to the v0.6 milestone Nov 11, 2016
@sckott sckott modified the milestones: v0.6, v0.7 Sep 13, 2017
@sckott sckott added the ssh label Jun 11, 2018
@sckott sckott removed this from the v0.7 milestone Jun 11, 2018
@sckott sckott closed this as completed Jun 11, 2018
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

3 participants