Pavel Perevezencev
Pavel Perevezencev

Reputation: 2978

Error on create new generic docker machine

I trying to create new docker-machine with driver "generic" on VPS and I get this error:

MacBook-Pro-Pavel:demo pavel$ docker-machine create --driver generic --generic-ssh-key ~/.ssh/id_rsa --generic-ip-address=5.63.154.209 regru
Running pre-create checks...
Creating machine...
(regru) Importing SSH key...
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 debian...
Copying certs to the local machine directory...
Copying certs to the remote machine...
Setting Docker configuration on the remote daemon...
Error creating machine: Error running provisioning: ssh command error:
command : sudo systemctl -f start docker
err     : exit status 1
output  : Job for docker.service failed. See 'systemctl status docker.service' and 'journalctl -xn' for details.

Machine with driver "virtualbox" create normally:

MacBook-Pro-Pavel:~ pavel$ docker-machine ls
NAME           ACTIVE   DRIVER       STATE     URL                         SWARM   DOCKER        ERRORS
regru          -        generic      Running   tcp://5.63.154.209:2376             Unknown       Unable to query docker version: Cannot connect to the docker engine endpoint
swarm-node-0   -        virtualbox   Running   tcp://192.168.99.100:2376           v17.06.0-ce   
swarm-node-1   -        virtualbox   Running   tcp://192.168.99.101:2376           v17.06.0-ce  

systemctl status docker.service и journalctl -xn here.

What am I doing wrong?

UPDATE

$ docker version
Client:
 Version:      17.06.0-ce
 API version:  1.30
 Go version:   go1.8.3
 Git commit:   02c1d87
 Built:        Fri Jun 23 21:31:53 2017
 OS/Arch:      darwin/amd64

Server:
 Version:      17.06.0-ce
 API version:  1.30 (minimum version 1.12)
 Go version:   go1.8.3
 Git commit:   02c1d87
 Built:        Fri Jun 23 21:51:55 2017
 OS/Arch:      linux/amd64
 Experimental: true

Upvotes: 2

Views: 855

Answers (1)

MeIr
MeIr

Reputation: 7326

Chances are, you are doing everything right. It seems there is an issue with docker. I don't have much understanding, however here is a link for details: https://forums.docker.com/t/docker-machine-create-fails-on-digitalocean/34750

Work around is to manually provide older docker engine:

docker-machine create
--driver amazonec2
--engine-install-url=https://web.archive.org/web/20170623081500/https://get.docker.com

Add --engine-install-url to your setup and see if that works.

Upvotes: 3

Related Questions