scaleway / docker-machine-driver-scaleway

:whale: Scaleway driver for Docker Machine
MIT License
249 stars 34 forks source link

Error detecting OS: Too many retries waiting for SSH to be available. #49

Closed pascalandy closed 7 years ago

pascalandy commented 8 years ago

Trying to create a machine but I'm stuck with this SSH error.

I re-enter my ssh key in my credentials and it is still the same.

~|⇒ docker-machine create -d scaleway \
> --scaleway-token="$TOKEN" \
> --scaleway-organization="$ORG" \
> --scaleway-name="SVR-98746" \
> --scaleway-commercial-type="VC1S" \
> --scaleway-image="f12312312" \
> --scaleway-user="theuser" \
> SVR-98746
Running pre-create checks...
Creating machine...
(SVR-98746) Creating SSH key...
(SVR-98746) Creating server...
(SVR-98746) Starting server...

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 also Had a similar error on using the docker-machine generic driver.

Hope you can help.

Thank you!

pascalandy commented 8 years ago

Below is the most basic request and have another kind of issue

~|⇒ docker-machine create -d scaleway my-scaleway-docker-machine
Host already exists: "my-scaleway-docker-machine"
~|⇒ docker-machine create -d scaleway test33

Running pre-create checks...
Creating machine...
(test33) Creating SSH key...
(test33) Creating server...
(test33) Starting server...
Waiting for machine to be running, this may take a few minutes...
Detecting operating system of created instance...
Waiting for SSH to be available...
Detecting the provisioner...
Provisioning with ubuntu(systemd)...
Installing Docker...
Copying certs to the local machine directory...
Copying certs to the remote machine...
Setting Docker configuration on the remote daemon...
Checking connection to Docker...

Error creating machine: Error checking the host: Error checking and/or regenerating the certs: There was an error validating certificates for host "163.172.161.204:2376": dial tcp 163.172.161.204:2376: i/o timeout
You can attempt to regenerate them using 'docker-machine regenerate-certs [name]'.
Be advised that this will trigger a Docker daemon restart which will stop running containers.

I desperately want to run a Docker Swarm ... Thank you

pascalandy commented 8 years ago

It's worth mentionning that in SCW GUI, the servers are up.

tdensmore commented 8 years ago

@pascalandy It is worth mentioning that in my AWS VPC I ran into the same issue because my instances were ONLY reachable via a private IP (and by default the AWS driver uses the public IP). I had to use the --amazonec2-private-address-only flag to fix my issue.

alpunch commented 7 years ago

This doesn't seem to be the issue on Scaleway. I tested with and without the "--scaleway" parameter and it works. However, if your issue persist, you might want to deploy from a node inside your private network.

pascalandy commented 7 years ago

Now working! This is my template

# docker-machine on scaleway.sh

### ### ### ### ### ### ### ### ### ### ### ### ### ### ### ### #
#
# --- Define env-var on 3 iTerm2 tabs (local machine)

REG=PAR1
#
NODE_01=N01-$REG
NODE_11=N11-$REG
NODE_12=N12-$REG
#
SCALEWAY_TOKEN="your-token-23g24g34-q3hg345h34h-34h34h34"
SCALEWAY_ORGANIZATION="your-token-23g24g34-q3hg345h34h-34h34h34"
DOCKER_IMAGE="3803a8a7"
SCALEWAY_COMMERCIAL_TYPE="VC1S"
SCALEWAY_REGION="par1"
#
docker-machine ls

### ### ### ### ### ### ### ### ### ### ### ### ### ### ### ### #
#
# --- To provision. On each iTerm2 tabs, run:
docker-machine create -d scaleway \
    --scaleway-region="$SCALEWAY_REGION" \
    --scaleway-image="$DOCKER_IMAGE" \
    --scaleway-token="$SCALEWAY_TOKEN" \
    --scaleway-organization="$SCALEWAY_ORGANIZATION" \
    --scaleway-commercial-type="$SCALEWAY_COMMERCIAL_TYPE" \
    --scaleway-name="$NODE_01-A" "$NODE_01"

docker-machine create -d scaleway \
    --scaleway-region="$SCALEWAY_REGION" \
    --scaleway-image="$DOCKER_IMAGE" \
    --scaleway-token="$SCALEWAY_TOKEN" \
    --scaleway-organization="$SCALEWAY_ORGANIZATION" \
    --scaleway-commercial-type="$SCALEWAY_COMMERCIAL_TYPE" \
    --scaleway-name="$NODE_11-A" "$NODE_11"

docker-machine create -d scaleway \
    --scaleway-region="$SCALEWAY_REGION" \
    --scaleway-image="$DOCKER_IMAGE" \
    --scaleway-token="$SCALEWAY_TOKEN" \
    --scaleway-organization="$SCALEWAY_ORGANIZATION" \
    --scaleway-commercial-type="$SCALEWAY_COMMERCIAL_TYPE" \
    --scaleway-name="$NODE_12-A" "$NODE_12"