pachadotdev / analogsea

Digital Ocean R client
https://pacha.dev/analogsea/
Apache License 2.0
154 stars 24 forks source link

GetConsoleMode on STD_INPUT_HANDLE failed with 6 #177

Closed coryhogan-zz closed 5 years ago

coryhogan-zz commented 5 years ago
Session Info ```r R version 3.5.3 (2019-03-11) Platform: x86_64-w64-mingw32/x64 (64-bit) Running under: Windows >= 8 x64 (build 9200) Matrix products: default locale: [1] LC_COLLATE=English_United States.1252 LC_CTYPE=English_United States.1252 LC_MONETARY=English_United States.1252 [4] LC_NUMERIC=C LC_TIME=English_United States.1252 attached base packages: [1] stats graphics grDevices utils datasets methods base other attached packages: [1] plumber_0.4.6 analogsea_0.6.0 loaded via a namespace (and not attached): [1] Rcpp_1.0.1 compiler_3.5.3 later_0.8.0 prettyunits_1.0.2 base64enc_0.1-3 remotes_2.0.2 [7] tools_3.5.3 aws.s3_0.3.12 testthat_2.0.1 digest_0.6.18 pkgbuild_1.0.3 pkgload_1.0.2 [13] jsonlite_1.6 memoise_1.1.0 rlang_0.3.2 cli_1.1.0 rstudioapi_0.10 curl_3.3 [19] yaml_2.2.0 withr_2.1.2 httr_1.4.0 xml2_1.2.0 fs_1.2.7 desc_1.2.0 [25] askpass_1.1 devtools_2.0.1 rprojroot_1.3-2 glue_1.3.1 R6_2.4.0 processx_3.3.0 [31] sessioninfo_1.1.1 callr_3.2.0 magrittr_1.5 usethis_1.4.0 backports_1.1.3 promises_1.0.1 [37] ps_1.3.0 assertthat_0.2.1 aws.signature_0.4.4 httpuv_1.5.0 stringi_1.4.3 openssl_1.3 [43] crayon_1.3.4 ```

I get this error when I try to run plumbers "do_provision()" function. image

It just hangs immediately and does nothing.

sckott commented 5 years ago

@coryhogan sorry about the error. we're close to submitting a new version to CRAN, see milestone https://github.com/sckott/analogsea/milestone/6 .

Install the development version remotes::install_github("sckott/analogsea") and try it again.

It may still not work as theres some issues to be resolved with the ssh pkg that does the ssh connection - see https://github.com/sckott/analogsea/issues/154 and https://github.com/sckott/analogsea/issues/173

coryhogan-zz commented 5 years ago

Appreciate the quick response! I'll look forward to an update. Just to let you know for your own debugging use this is the error I get when I use the current master branch analogsea.

> debug(plumber::do_provision(region = "sfo2"))
THIS ACTION COSTS YOU MONEY!
Provisioning a new server for which you will get a bill from DigitalOcean.
Using default ssh keys: Work Machine, Home Machine
NB: This costs $0.00744 / hour until you droplet_delete() it
Waiting for create ................
New server key: 3c:blahblahblah
Error in normalizePath(path.expand(path), winslash, mustWork) : 
  path[1]="C:\Users\cahog\AppData\Local\Temp\Rtmpsxvqic\filecb8597e268b": The system cannot find the file specified

Also here is the traceback:

> traceback()
8: normalizePath(to, mustWork = TRUE)
7: ssh::scp_download(session = session, files = remote, to = local, 
       verbose = TRUE)
6: cat(ssh::scp_download(session = session, files = remote, to = local, 
       verbose = TRUE), sep = "\n")
5: do_scp(droplet, local, remote, user, scp = "download", keyfile, 
       ssh_passwd, verbose = verbose)
4: analogsea::droplet_download(droplet, paste0("/tmp/", randName), 
       tf)
3: droplet_capture(droplet, "swapon | grep \"/swapfile\" | wc -l")
2: plumber::do_provision(mydrop)
1: debug(plumber::do_provision(mydrop))`
sckott commented 5 years ago

thanks, i'll have a look soon.

sckott commented 5 years ago

@coryhogan Jeroen has been making some changes to the ssh package that may help here, see https://github.com/ropensci/ssh/blob/master/NEWS#L1-L5 -- Can you reinstall remotes::install_github("ropensci/analogsea") (which will install the dev version of ssh) and try again? Making sure to reaload R session.

coryhogan-zz commented 5 years ago

Still getting the same exact error even with the development version of ssh.

sckott commented 5 years ago

okay, thanks for trying. I'll have a look soon

tomand-uio commented 5 years ago

I'm very much a novice on digital ocean and analogsea but I get stranded with the same error message as coryhogan after the last of the following analogsea commands:

(drops <- droplets()) d <- droplet(drops[[1]]$id) d %>% docklet_rstudio()

I'm running Windows 10 with Rstudio 1.1.463 and R 3.5.3 with analogsea 0.6.0.

sckott commented 5 years ago

@tomand-uio can you try the development version of analogsea please, remotes::install_github("sckott/analogsea"), then try that example again

mathesong commented 5 years ago

Hiya,

I came across this issue while searching. I installed the latest dev version (0.7.0.9100) of analogsea today, and I'm getting exactly this error. The error message is below:

id <- plumber::do_provision(region="ams3", size="s-1vcpu-3gb")
THIS ACTION COSTS YOU MONEY!
Provisioning a new server for which you will get a bill from DigitalOcean.
Using default ssh keys: R_ssh_home, R_SSH_Work, Sbook2, R_SSH_Tablet
NB: This costs $0.02232 / hour until you droplet_delete() it
Waiting for create ...............
New server key: 4c:53:e4:ff:34:bc:35:ec:db:9d:20:67:77:59:b7:55:11:54:00:49
Error in normalizePath(path.expand(path), winslash, mustWork) : 
  path[1]="C:\Users\mathe\AppData\Local\Temp\RtmpWmqiw2\file2f385e3953fa": The system cannot find the file specified

with the following traceback

7: normalizePath(to, mustWork = TRUE)
6: ssh::scp_download(session = session, files = remote, to = local, 
       verbose = TRUE)
5: cat(ssh::scp_download(session = session, files = remote, to = local, 
       verbose = TRUE), sep = "\n")
4: do_scp(droplet, local, remote, user, scp = "download", keyfile, 
       ssh_passwd, verbose = verbose)
3: analogsea::droplet_download(droplet, paste0("/tmp/", randName), 
       tf)
2: droplet_capture(droplet, "swapon | grep \"/swapfile\" | wc -l")
1: plumber::do_provision(region = "ams3", size = "s-1vcpu-3gb")

Happy to try anything else out that you might need to solve this.

mathesong commented 5 years ago

I took a closer look at this this morning. The issue arose in plumber's droplet_capture() command, and the latest development version of plumber fixes this problem, so it works a charm now!

sckott commented 5 years ago

thanks @mathesong sorry about delay was on vacation. Glad it works now!