Not sure if it's a DigitalOcean problem or docker-machine but I get this error repeatedly while trying to create a droplet on DO
$ docker-machine create --driver digitalocean --digitalocean-access-token=$TOKEN --digitalocean-region=sgp1 --digitalocean-image=ubuntu-14-04-x64 --digitalocean-size "1gb" staging
Running pre-create checks...
Creating machine...
(staging) Creating SSH key...
(staging) Creating Digital Ocean droplet...
(staging) Waiting for IP address to be assigned to the Droplet...
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(upstart)...
Installing Docker...
Copying certs to the local machine directory...
Copying certs to the remote machine...
Error creating machine: Error running provisioning: Get https://api.digitalocean.com/v2/droplets/17900941: dial tcp: lookup api.digitalocean.com on 127.0.1.1:53: read udp 127.0.0.1:40376->127.0.1.1:53: i/o timeout
I am using following docker packages on Ubuntu 14.04
$ docker-machine version
docker-machine version 0.7.0, build a650a40
$ docker version
Client:
Version: 1.11.2
API version: 1.23
Go version: go1.5.4
Git commit: b9f10c9
Built: Wed Jun 1 21:47:50 2016
OS/Arch: linux/amd64
Server:
Version: 1.11.1
API version: 1.23
Go version: go1.5.4
Git commit: 5604cbe
Built: Wed Apr 27 00:34:20 2016
OS/Arch: linux/amd64
Error is: read udp 127.0.0.1:40376->127.0.1.1:53: i/o timeout
Looks like its trying to use localhost as the nameserver and no DNS server is running.
What is your /etc/resolv.conf file looking like?
Two ways to fix this: bring up the DNS server on the local box or, the better way, fix your DNS server setup in that file and use e.g. 8.8.8.8 as the nameserver.
Not 100% sure but I solved the problem as following.
I was developing in virtualbox machine and I ran the command when I started work
eval "$(docker-machine env local)"
So my docker-machine env was set to some variables, because of which running docker-machine create in the same terminal was causing DNS resolution problem.
Just started a new terminal and was able to create a DigitalOcean droplet without any problem.
Related
I'm setting up the selenoid on macOS with podman instead of docker.Below issue happened when connect to the sock.
Got permission denied while trying to connect to the Docker daemon socket at unix:///var/run/docker.sock: Post "http://%2Fvar%2Frun%2Fdocker.sock/v1.12/containers/create": dial unix /var/run/docker.sock: connect: permission denied
For the podman, i use homebrew to install it
Client: Podman Engine
Version: 4.2.0
API Version: 4.2.0
Go Version: go1.18.5
OS/Arch: darwin/amd64
Server: Podman Engine
Version: 4.2.0
API Version: 4.2.0
Go Version: go1.18.4
OS/Arch: linux/amd64
Then start the podman machine and shows below information, also installed the mac helper.
Starting machine "podman-machine-default"
Waiting for VM ...
Mounting volume... /Users:/Users
API forwarding listening on: /var/run/docker.sock
Docker API clients default to this address. You do not need to set DOCKER_HOST.
Machine "podman-machine-default" started successfully
This is the system connection list
podman system connection list
Name URI Identity Default
podman-machine-default ssh://core#localhost:51953/run/user/509218199/podman/podman.sock /Users/xxx/.ssh/podman-machine-default false
podman-machine-default-root ssh://root#localhost:51953/run/podman/podman.sock /Users/xxx/.ssh/podman-machine-default true
I can start the containers successful, but when use it to create driver section. the permission error happen.
I'm not sure if I missed any setup for the podman and cause this error, can someone give the advices?
I am new with the Fiware and docker technologies so I need some help.
I am following the instructions from this link http://simple-docker-hosting-on-fiware-cloud.readthedocs.io/en/v1.0/manuals/install in order to create a docker-host machine on Fiware cloud but when I run the following command:
docker-machine create -d openstack --openstack-flavor-id="2" --openstack-image-name="base_ubuntu_14.04" --openstack-net-name="node-int-net-01" --openstack-floatingip-pool="public-ext-net-01" --openstack-sec-groups="docker-sg" --openstack-ssh-user "ubuntu" docker-host
I receive the following error:
Error creating machine: Error running provisioning: Unable to verify the Docker daemon is listening: Maximum number of retries (10) exceeded
Although, I can see the instance of the docker-host machine on Fiware cloud, but when I run the following command:
eval "$(docker-machine env docker-host)"
the following error comes up:
Error checking TLS connection: Error checking and/or regenerating the certs: There was an error validating certificates for host "147.27.60.136:2376": dial tcp 147.27.60.136:2376: connectex: No connection could be made because the target machine actively refused it.
You can attempt to regenerate them using 'docker-machine regenerate-certs [name]'.
Be advised that this will trigger a Docker daemon restart which might stop running containers.**
I also tried to regenerate the certificates:
docker-machine regenerate-certs docker-host
but I received the following error:
Error getting SSH command to check if the daemon is up: ssh command error:
command : sudo docker version
err : exit status 1
output : Client:
Version: 18.04.0-ce
API version: 1.37
Go version: go1.9.4
Git commit: 3d479c0
Built: Tue Apr 10 18:21:14 2018
OS/Arch: linux/amd64
Experimental: false
Orchestrator: swarm
Cannot connect to the Docker daemon at unix:///var/run/docker.sock. Is the docker daemon running?**
Image with the result for the Command: docker-machine ls
What am I doing wrong?
I use docker community edition for windows 10.
The docker version is:
Client:
Version: 18.03.0-ce
API version: 1.37
Go version: go1.9.4
Git commit: 0520e24
Built: Wed Mar 21 23:06:28 2018
OS/Arch: windows/amd64
Experimental: false
Orchestrator: swarm
Server:
Version: 18.03.0-ce
API version: 1.37 (minimum version 1.12)
Go version: go1.9.4
Git commit: 0520e24
Built: Wed Mar 21 23:14:32 2018
OS/Arch: linux/amd64
Experimental: false
First make sure you've opened your docker port (tcp/2376) in your default security group
Let me suggest you using base_ubuntu_16.04 instead of base_ubuntu_14.04
Anyway, it won't run properly at first. There is a problem with the latests versions of docker and docker-machine. As a workaround, after running your docker-machine command, you can do this to fix the problem:
ssh docker-host 'sudo apt-get -y install linux-image-extra-$(uname -r) linux-image-extra-virtual ; sudo modprobe aufs ; sudo service docker start'
However, you might find furhter problems due to MTU configuration in your docker host. To solve them, you can lower your MTU with these commands:
docker-machine ssh docker-host "sudo sed -i 's/--label provider=openstack/--label provider=openstack\n--mtu=1400/g' /etc/default/docker"
docker-machine ssh docker-host "sudo service docker restart"
docker-machine ssh docker-host "sudo ip link set mtu 1400 dev docker0"
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
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.
I'm behind a corporate firewall and have installed Docker on an Ubuntu 14.04 LTS server. Following instructions at http://docs.docker.com/linux/step_one/.
Things seemed to be OK:-
$ docker version
Client:
Version: 1.9.1
API version: 1.21
Go version: go1.4.2
Git commit: a34a1d5
Built: Fri Nov 20 13:12:04 UTC 2015
OS/Arch: linux/amd64
Server:
Version: 1.9.1
API version: 1.21
Go version: go1.4.2
Git commit: a34a1d5
Built: Fri Nov 20 13:12:04 UTC 2015
OS/Arch: linux/amd64
... but I can't pull and run any images. Example:-
$ docker run hello-world
gives:
Error while pulling image: Get
https://index.docker.io/v1/repositories/library/hello-world/images:
x509: certificate is valid for FG3K6C3A15800002, not index.docker.io
Have spent ages searching around - I don't understand what the issue is - I've set http_proxy and https_proxy env vars but not sure what to try next. The docs don't mention any certificate requirements.
Any help appreciated!
The problem may be the proxy. If you are using a proxy to access the internet, you have to change the file /etc/default/docker and put your proxy on it.
export http_proxy="http://proxy_ip:proxy_port"
export https_proxy="http://proxy_ip:proxy_port"
After do it, restart the service:
sudo service docker restart
It works to me.
Hey Pravins I have the same issue, with my docker 1.11.2 It seems is not taken proxy settings from /etc/default/docker and from env neighter.
So what I did was what it says here
http://docs.master.dockerproject.org/engine/admin/systemd/#http-proxy
Many Linux distributions use systemd to start the Docker daemon.
You need check if the docker.service uses an EnvironmentFile, and/or You can customize the Docker daemon options using override files as explained in the HTTP Proxy example below.
I installed the new version of Docker (1.9.0) on Ubuntu 12.04 yesterday. But when I run any docker command they always show the below logs, maybe the docker client cannot connect to docker daemon:
root#localhost:$docker ps
An error occurred trying to connect: Get `http:///var/run/docker.sock/v1.21/containers/json: read unix /var/run/docker.sock: connection reset by peer`
root#localhost:$ docker version
Client:
Version: 1.9.0
API version: 1.21
Go version: go1.4.2
Git commit: 76d6bc9
Built: Tue Nov 3 17:40:31 UTC 2015
OS/Arch: linux/amd64
An error occurred trying to connect: Get http:///var/run/docker.sock/v1.21/version: read unix /var/run/docker.sock: connection reset by peer
We had the same problem and this solved (on ubuntu trusty): https://github.com/docker/docker/issues/17846#issuecomment-155233858
sudo service docker stop
sudo rm /var/lib/docker/network/files/local-kv.db
sudo service docker start
Finally I found the problem,
With version 1.9, docker change the IP address of its network interface (docker0 you can see it when type ifconfig on host machine) to 172.17.0.1 instead of 172.17.42.1 of previous version