Question

Deploying a Minimal API using plumber on DigitalOcean

Posted December 17, 2018 2.5k views
R

Hello!
I try to deploying a minimal API using plumber on DigitalOcean https://www.r-bloggers.com/deploying-a-minimal-api-using-plumber-on-digitalocean/

I followed the all instruction steps thoroughly
After command id <- do_provision() I have an error (Error: Region is not available), here is the log

THIS ACTION COSTS YOU MONEY!
Provisioning a new server for which you will get a bill from DigitalOcean.
Waiting for authentication in browser…
Press Esc/Ctrl + C to abort
Authentication complete.
Using default ssh keys:
Error: Region is not available
In addition: Warning message:
You have not specified any ssh_keys. This is NOT recommended. (You will receive an email with the root password in a few minutes

Why is my region is not available?

1 comment
  • I have made the all of previous steps. The command doprovision() should make droplet, but it returns the Error. Also I tried to use doprovision(unstable = TRUE) and do_provision(unstable = TRUE, example = TRUE). But I get the same error “Region is not available”.

    My region right now is Singapore

These answers are provided by our Community. If you find them useful, show some love by clicking the heart. If you run into issues leave a comment, or add your own answer to help others.

×
2 answers

Hey friend,

I’m not an expert on this software, but I did some digging and I found a tip on how to expose debugging data from here: https://github.com/trestletech/plumber/issues/224

It seems that running “traceback()” can gather more information. Could you do that and let us know a bit more about the variables behind this attempt to create a droplet?

Jarland

Thank you, Jarland!

I managed to go a little further. I needed to provide region as an argument. But I still could not deploy Plumber. Here is the log and traceback:

plumber::doprovision(region = ‘sgp1’)
THIS ACTION COSTS YOU MONEY!
Provisioning a new server for which you will get a bill from DigitalOcean.
Using default ssh keys: Caelestis, hppc
NB: This costs $0.00744 / hour until you droplet
delete() it
Waiting for create ……………
New server fingerprint: a6:28:21:ec:bf:2c:7f:3e:77:de:da:84:d5:88:5e:70:e9:82:41:4f
2 C:\Users\CAELES~1\AppData\Local\Temp\Rtmp67l0BA\file804066ec378e/cWMJuYpixl
Error in file(con, “wb”) : cannot open the connection
In addition: Warning message:
In file(con, “wb”) :
cannot open file 'C:\Users\CAELES~1\AppData\Local\Temp\Rtmp67l0BA\file804066ec378e/cWMJuYpixl’: No such file or directory

traceback()
9: file(con, “wb”)
8: writeBin(data, target)
7: (function (data, filepath)
{
target <- do.call(file.path, as.list(c(to, filepath)))
if (verbose)
cat(sprintf(“%10d %s\n”, length(data), target))
if (is.null(data))
return(dir.create(target, recursive = TRUE, showWarnings = FALSE))
writeBin(data, target)
})(as.raw(c(0x30, 0x0a)), “cWMJuYpixl”)
6: ssh::scpdownload(session = session, files = remote, to = local,
verbose = TRUE)
5: cat(ssh::scp
download(session = session, files = remote, to = local,
verbose = TRUE), sep = “\n”)
4: doscp(droplet, local, remote, user, scp = “download”, keyfile,
ssh
passwd, verbose = verbose)
3: analogsea::dropletdownload(droplet, paste0(“/tmp/”, randName),
tf)
2: droplet
capture(droplet, “swapon | grep "/swapfile" | wc -l”)
1: plumber::do_provision(region = “sgp1”)

Submit an Answer