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

Failed to create Vultr host as the Public IP of the server became '0.0.0.0' #18

Closed
twang2218 opened this issue Jan 12, 2017 · 11 comments
Closed

Comments

@twang2218
Copy link
Contributor

twang2218 commented Jan 12, 2017

It used to work, but during my test today, I found docker-machine create -d vultr failed to create a Vultr host.

 docker-machine create -d vultr v1
Running pre-create checks...
(v1) Validating Vultr VPS parameters...
(v1) getting client
(v1) getting client
(v1) getting client
Creating machine...
(v1) getting client
(v1) Creating Vultr VPS...
(v1) getting client
(v1) Waiting for IP address to become available...
(v1) Created Vultr VPS ID: 6472698, Public IP: 0.0.0.0, Private IP:
Waiting for machine to be running, this may take a few minutes...
(v1) getting client
(v1) getting client
(v1) getting client
(v1) getting client
(v1) getting client
(v1) getting client
(v1) getting client
(v1) getting client
(v1) getting client
(v1) getting client
(v1) getting client
(v1) getting client
(v1) getting client
(v1) getting client
(v1) getting client
(v1) getting client
(v1) getting client
(v1) getting client
(v1) getting client
(v1) getting client
(v1) getting client
(v1) getting client
(v1) getting client
(v1) getting client
(v1) getting client
(v1) getting client
(v1) getting client
(v1) getting client
(v1) getting client
(v1) getting client
(v1) getting client
(v1) getting client
(v1) getting client
(v1) getting client
(v1) getting client
Detecting operating system of created instance...
Waiting for SSH to be available...
Password:

It began to ask me the password, which should never happen. The SSH key should has been set up already.

@geneticgrabbag
Copy link

Since I don't see an OS specified in your message, can I assume it's deploying RancherOS?

@twang2218
Copy link
Contributor Author

@geneticgrabbag Oh, I'm sorry that I forgot providing the environment variables for the vultr driver. Here it is:

#!/bin/bash
# Install Vultr Driver: https://github.com/janeczku/docker-machine-vultr

export VULTR_API_KEY=<API_KEY>

# 1  - New Jersey
# 12 - Silicon Valley
# 19 - Sydney
# 25 - Tokyo
export VULTR_REGION=12

# Plan 29 - 768 MB RAM,15 GB SSD
export VULTR_PLAN=29

# 160 - Ubuntu 14.04 x64
# 215 - Ubuntu 16.04 x64
# 167 - CentOS 7 x64
export VULTR_OS=215

# IPv6
# export VULTR_IPV6=true

export MACHINE_DRIVER=vultr

Everytime I create a vultr host, I source this file first.

So, I was creating 768MB/15GB host with Ubuntu 16.04 OS in the Silicon Valley region.

@geneticgrabbag
Copy link

@twang2218 ah, thanks.

i tried duplicating it and I get this:

% docker-machine create -d vultr -vultr-api-key=$VULTR_TOKEN --vultr-region-id=12 --vultr-os-id=215 --vultr-plan-id=29 v1
Running pre-create checks...
(v1) Validating Vultr VPS parameters...
Creating machine...
(v1) Creating Vultr VPS...
(v1) Waiting for IP address to become available...
(v1) Created Vultr VPS ID: 6475856, Public IP: 0.0.0.0, Private IP:
Waiting for machine to be running, this may take a few minutes...
Detecting operating system of created instance...
Waiting for SSH to be available...
Error creating machine: Error detecting OS: Too many retries waiting for SSH to be available.  Last error: Maximum number of retries (60) exceeded

I can log in via the Vultr console, but it fails with an SSH call from my terminal:

% ssh root@<ip-address>
Received disconnect from <ip-address>: 2: Too many authentication failures
Disconnected from <ip-address>

@twang2218
Copy link
Contributor Author

The version of my vultr driver was 1.0.6, and I updated to the latest, 1.1.0, the problem is same, here is the output with --debug option:

$ docker-machine --debug create -d vultr v1
Docker Machine Version:  0.9.0-rc2, build 7b19591
Found binary path at /usr/local/bin/docker-machine-driver-vultr
Launching plugin server for driver vultr
Plugin server listening at address 127.0.0.1:60469
() Calling .GetVersion
Using API Version  1
() Calling .SetConfigRaw
() Calling .GetMachineName
(flag-lookup) Calling .GetMachineName
(flag-lookup) Calling .DriverName
(flag-lookup) Calling .GetCreateFlags
Found binary path at /usr/local/bin/docker-machine-driver-vultr
Launching plugin server for driver vultr
Plugin server listening at address 127.0.0.1:60473
() Calling .GetVersion
Using API Version  1
() Calling .SetConfigRaw
() Calling .GetMachineName
(v1) Calling .GetMachineName
(v1) Calling .DriverName
(v1) Calling .GetCreateFlags
(v1) Calling .SetConfigFromFlags
Running pre-create checks...
(v1) Calling .PreCreateCheck
(v1) Validating Vultr VPS parameters...
(v1) Calling .GetConfigRaw
Creating machine...
(v1) Calling .Create
(v1) DBG | Generating SSH key...
(v1) Creating Vultr VPS...
(v1) Waiting for IP address to become available...
(v1) Created Vultr VPS ID: 6475975, Public IP: 0.0.0.0, Private IP:
(v1) Calling .GetConfigRaw
(v1) Calling .DriverName
(v1) Calling .DriverName
Waiting for machine to be running, this may take a few minutes...
(v1) Calling .GetState
(v1) Calling .GetState
(v1) Calling .GetState
(v1) Calling .GetState
(v1) Calling .GetState
(v1) Calling .GetState
(v1) Calling .GetState
(v1) Calling .GetState
(v1) Calling .GetState
(v1) Calling .GetState
(v1) Calling .GetState
(v1) Calling .GetState
(v1) Calling .GetState
(v1) Calling .GetState
(v1) Calling .GetState
Detecting operating system of created instance...
Waiting for SSH to be available...
Getting to WaitForSSH function...
(v1) Calling .GetSSHHostname
(v1) Calling .GetSSHPort
(v1) Calling .GetSSHKeyPath
(v1) Calling .GetSSHKeyPath
(v1) Calling .GetSSHUsername
Using SSH client type: external
Using SSH private key: /Users/taowang/.docker/machine/machines/v1/id_rsa (-rw-------)
&{[-F /dev/null -o PasswordAuthentication=no -o StrictHostKeyChecking=no -o UserKnownHostsFile=/dev/null -o LogLevel=quiet -o ConnectionAttempts=3 -o ConnectTimeout=10 -o ControlMaster=no -o ControlPath=none root@0.0.0.0 -o IdentitiesOnly=yes -i /Users/taowang/.docker/machine/machines/v1/id_rsa -p 22] /usr/bin/ssh <nil>}
About to run SSH command:
exit 0
Password:

I think the reason is that Public IP is returned 0.0.0.0:

(v1) Created Vultr VPS ID: 6475975, Public IP: 0.0.0.0, Private IP:

So, that cause the ssh command is actually trying to connect to my laptop root@0.0.0.0. 😹

&{[-F /dev/null -o PasswordAuthentication=no -o StrictHostKeyChecking=no -o UserKnownHostsFile=/dev/null -o LogLevel=quiet -o ConnectionAttempts=3 -o ConnectTimeout=10 -o ControlMaster=no -o ControlPath=none root@0.0.0.0 -o IdentitiesOnly=yes -i /Users/taowang/.docker/machine/machines/v1/id_rsa -p 22] /usr/bin/ssh <nil>}

Is there any API changes cause the problem?

@geneticgrabbag
Copy link

@twang2218 - I can confirm the attempt to SSH as root into 0.0.0.0. I'm using driver v1.1.0 with docker machine v0.8.2 on OS/X v10.11.6.

@jukkagrao
Copy link

jukkagrao commented Jan 14, 2017

Same problem with Public IP: 0.0.0.0 it has worked before on same system

@twang2218 twang2218 changed the title Failed to create Vultr machine as failed to setup the SSH key on the server Failed to create Vultr host as the Public IP of the server became '0.0.0.0' Jan 14, 2017
twang2218 added a commit to twang2218/docker-machine-vultr that referenced this issue Jan 14, 2017
fixes janeczku#18

Signed-off-by: Tao Wang <twang2218@gmail.com>
twang2218 added a commit to twang2218/docker-machine-vultr that referenced this issue Jan 14, 2017
Fixes janeczku#18

Signed-off-by: Tao Wang <twang2218@gmail.com>
@dmitrym0
Copy link

Thanks for a wonderful plugin. It doesn't seem like it's been released yet. I tried to build it myself, but I"m not familiar with Go, so I failed. Is there any way to extract a build artifact from CircleCI?

@jukkagrao
Copy link

Hi dmitrym0, there is my build for linux based system http://file.sampo.ru/q86239/ (tested on ubuntu)

@janeczku
Copy link
Owner

janeczku commented Feb 5, 2017

@bfosberry
Copy link
Contributor

Came across this, thanks for fixing!

@dmitrym0
Copy link

dmitrym0 commented Feb 6, 2017

Thank you so much, works great! 👍

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

6 participants