Closed fmichonneau closed 8 years ago
Thanks for trying this. Sorry about that. I think for some reason it's recently started returning a response object from the API (suggesting the droplet is up), but it's apparently not quite up yet. This used to not happen. I may need to put in an additional wait time
To refresh the droplet object, e.g, your d
, you can just run droplets()
and select the one you want. If it says active
then it's ready, and of course will have an IP
Hmm, I think this is just a problem when creating droplets with Docker installed, i'll keep diggin
Sorry for the delay, getting back to this
No worries. It's easy to get around it. On Jan 15, 2016 6:08 PM, "Scott Chamberlain" notifications@github.com wrote:
Sorry for the delay, getting back to this
— Reply to this email directly or view it on GitHub https://github.com/sckott/analogsea/issues/113#issuecomment-172122459.
After some digging, I think it results from port 22 not being quite open yet when the first ssh command is executed, looks like nmap
is a nice tool to check on the CLI e.g nmap -A <ip address> -p 22
but not sure how portable that is, checking to see if there's a portable R tool
Okay, so we have a new internal fxn from @hrbrmstr for checking whether port 22 is open or not, and if not, we stop with informative error message.
docklet_create() %>% docklet_pull("postgres")
#> NB: This costs $0.01488 / hour until you droplet_delete() it
#> Waiting for create ...........................
#>
#> Error: port 22 is not open; wait a bit (try 5 - 10 sec.) and try again
We could build a toggle-able wait period, but users can easily do that themselves via e.g., Sys.sleep()
, and I don't think this is always a problem, perhaps especially when you're spinning up a machine and docker
any thoughts @fmichonneau @hrbrmstr
:+1: the idea of putting the onus on the user. If they're using this, they clearly know what they're doing/what they want and make them do some work :-)
cool, will go with the this then
@fmichonneau let me know if this sorts you out, if not we'll re-open
Thanks Scott!
On Tue, Mar 8, 2016 at 7:03 PM, Scott Chamberlain notifications@github.com wrote:
Closed #113 https://github.com/sckott/analogsea/issues/113.
— Reply to this email directly or view it on GitHub https://github.com/sckott/analogsea/issues/113#event-582552132.
I'm using the package to spin a shiny app following the instructions here: https://gist.github.com/sckott/ea46be9a1c7cee0eef74
When creating the docklet, it seems that the IP address wasn't assigned to my droplet quite yet, and I ended up with empty lists for the
networkings
slot. Therefore, I couldn't rund %>% docklet_shinyapp(path)
as it resulted in an error message (No network interface registered for this droplet
).I added the IP address manually e.g.:
d$networks$v4 <- list(list(ip_address="xxx.xxx.xxx.xxx"))
but I guess there must be a better way. Maybe there should be function to update the network interfaces if it doesn't exist already (it's the first time I'm using the package).