pachadotdev / analogsea

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

docker: Error parsing reference: ":8787" is not a valid repository #172

Closed dncnbrn closed 5 years ago

dncnbrn commented 5 years ago

Using the default example:

docklet_create() %>%
  docklet_rstudio()

I get this every time:

Using default ssh keys: id_rsa
NB: This costs $0.01488 / hour until you droplet_delete() it
Waiting for create ........................
Error: No network interface registered for this droplet
  Try refreshing like: droplet(d$id)

Not ideal, but if I try to refresh:

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

It then runs through the docker process, but ends here:

docker: Error parsing reference: ":8787" is not a valid repository/tag: invalid reference format.
See 'docker run --help'.
Error: ssh failed
ssh -o BatchMode=yes -o StrictHostKeyChecking=no -o UserKnownHostsFile=/var/folders/nk/vwrxh1rj72b2tflmmqnd5kqw0000gq/T//Rtmp4hGAQj/hosts root@206.189.30.63 'docker run  -d  -p  8787 :8787    -e USER= rstudio  -e PASSWORD= rstudio  -e EMAIL= rstudio@example.com   rocker/rstudio  '

Re the ssh failed, I can ssh into the droplet from terminal. Also worth noting that the plumber do_provision() function seems to run without any problems.

Session Info ```r R version 3.5.1 (2018-07-02) Platform: x86_64-apple-darwin15.6.0 (64-bit) Running under: macOS 10.14 Matrix products: default BLAS: /System/Library/Frameworks/Accelerate.framework/Versions/A/Frameworks/vecLib.framework/Versions/A/libBLAS.dylib LAPACK: /Library/Frameworks/R.framework/Versions/3.5/Resources/lib/libRlapack.dylib locale: [1] en_GB.UTF-8/en_GB.UTF-8/en_GB.UTF-8/C/en_GB.UTF-8/en_GB.UTF-8 attached base packages: [1] stats graphics grDevices utils datasets methods [7] base other attached packages: [1] analogsea_0.6.0 loaded via a namespace (and not attached): [1] Rcpp_1.0.0 cellranger_1.1.0 [3] compiler_3.5.1 later_0.7.5 [5] base64enc_0.1-3 tools_3.5.1 [7] aws.s3_0.3.12 digest_0.6.18 [9] packrat_0.4.9-3 jsonlite_1.5 [11] lattice_0.20-35 rstudioapi_0.8 [13] curl_3.2 yaml_2.2.0 [15] httr_1.3.1 xml2_1.2.0 [17] knitr_1.20 stats4_3.5.1 [19] lmtest_0.9-36 grid_3.5.1 [21] nnet_7.3-12 data.table_1.11.6 [23] R6_2.3.0 flexmix_2.3-14 [25] readxl_1.1.0 Formula_1.2-3 [27] plumber_0.4.6 magrittr_1.5 [29] promises_1.0.1 modeltools_0.2-22 [31] MASS_7.3-50 aws.signature_0.4.4 [33] httpuv_1.4.5 betareg_3.1-1 [35] sandwich_2.5-0 mfx_1.1 [37] stringi_1.2.4 crayon_1.3.4 [39] zoo_1.8-4 ```
sckott commented 5 years ago

sorry about the problems there @dncnbrn

can you install the dev version and try again?

remotes::install_github("sckott/analogsea")

dncnbrn commented 5 years ago

Thanks @sckott - this has solved the problem; it no longer gives the error message, although when it then proceeds to open the droplet on port 8787 I just get 'The site can't be reached' and 'ERR_CONNECTION_REFUSED' on Chrome? (Apologies if this a settings issue I need to fix.)

sckott commented 5 years ago

sounds like there was a problem there. can you give more details of the code used and any error messages

dncnbrn commented 5 years ago

Pretty much as before, but no error messages given:

library(analogsea)
docklet_create(region="lon1") 
d <- droplets()
d[[1]]$id %>% docklet_rstudio()

On the last step, I get New server fingerprint: ..., then Using default tag: latest, then latest: Pulling from rocker/rstudio, then it runs through the Docker instructions, ending with Digest: sha256... and finally Status: Downloaded newer image for rocker/rstudio:latest..., before opening up a tab on Chrome with the IP address and then :8787 appended to it, and Chrome just gives back ERR_CONNECTION_REFUSED.

So it seems like everything is working fine but then it doesn't connect to the session. Added: I've been able to get access to a DO server on port 8787 if I create a droplet and then build an R and RStudio setup through the terminal.

sckott commented 5 years ago

thanks @dncnbrn for the details. I'll see if I can replicate this problem somehow and get back to you

sckott commented 5 years ago

related #170

dncnbrn commented 5 years ago

That works for me - changing from the default password has solved the problem.

sckott commented 5 years ago

@dncnbrn install remotes::install_github("sckott/analogsea") and try again, should work now.

user and password are now required parameters, and rstudio can't be 'rstudio'